wxGTK can crash when starting a drag while the drag icon is animating (3.3) (Issue #24677)

7 views
Skip to first unread message

pieter3d

unread,
Jul 4, 2024, 11:34:01 PM (10 hours ago) Jul 4
to wx-...@googlegroups.com, Subscribed

Seen at top-of-tree as of today, ubuntu 22.04 LTS.

When starting a drag from (in my experiment) a wxListBox, a little document icon appears by the mouse to indicate something is being dragged. When the drag is released within the same originating wxWindow (the list in my case), the document icon fades out to indicate end-of-drag. If however a new drag is started while that animation is going on, the application crashes. The crash originates from src/gtk/bitmap.cpp line 1403:

void wxBitmap::Draw(cairo_t* cr, int x, int y, bool useMask, const wxColour* fg, const wxColour* bg) const
{
    wxCHECK_RET(IsOk(), "invalid bitmap");

The calling function is in dnd.cpp, the draw call in

#ifdef __WXGTK3__
extern "C" {
static gboolean draw_icon(GtkWidget*, cairo_t* cr, wxIcon* icon)
{
    icon->Draw(cr, 0, 0);
    return true;
}
}
#endif

Moving up the stack trace is all system GTK lib calls until eventually the wxWidgets event loop.

This doesn't happen if I use the system installed wxWidgets library, but that's version 3.0.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/issues/24677@github.com>

Reply all
Reply to author
Forward
0 new messages