On 08/12/10 15:21, Alvin wrote: > Hello all, > > I have updated my working-copy of 1.3.x to r7979. Since doing that I am > experiencing a segfault when I drag 'n drop a file (from Dolphin in KDE > 4.5.4) onto my app. > > I have managed to track down the location of the segfault using > KDevelop4+GDB. > > The segfault occurs in: > > Fl_x.cxx: > > int fl_handle(const XEvent& thisevent): line 964. > > Sepecifically with: > > int bytesnew = strlen(*text_list)+1; > > Looks like 'text_list' contains 0 items (as confirmed by 'list_count'). > > Therefore, this is effectively doing: strlen(0) which is where the segfault > occurs. > > I guess a fix would be to check that list_count> 0 before calling strlen(), > however, would this just result in an empty DND playload? It looks like > X_HAVE_UTF8_STRING is defined in Xlib.h. > > Using the GDB, I can see that the DND payload I want is actually in > 'portion' however, to get 'text_list' to point to 'portion' I need to > undefine X_HAVE_UTF8_STRING. I do not use UTF8 right now, but like the idea > of having it in case I do need it in the future. > > Any ideas of what I can do to fix this? I'm willing to produce create an STR > and submit a patch if that would help. I thought I should post here first > just in case the people incorporating the UTF8 support can see an obvious > fix before I dive head first.
Alvin, might be best to file an STR anyway, with all your observations etc, and maybe others can then post there... I don't grok the X DnD mechanism well enough to comment on this - I have tried to figure it out several times but invariably get lost in amomgst all the various different selection buffers and clipboards and DnD stuff that have been layered on over the years... _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

