GNOME Bugzilla – Bug 152151
BadWindow error during drag and drop
Last modified: 2014-03-24 03:04:51 UTC
Bug report from a user: "I've upgraded to GTK 2.4.7, [...] but i'm still getting crashes. Usually when i go to drag a file/folder to another window, but i can't reliably reproduce it. Using Filer 2.1.3 from /uri/0install/rox.sourceforge.net/testing/" We've managed to get a stacktrace:
+ Trace 49976
rox_x_error is set in main() as the toplevel error handler. It replaces GDK's default handler with one that calls abort() instead of exit(). The comments suggest that _XReply is expected to call a special error handler, but is actually calling the default one. The discussion is here, and includes the output from 'bt full' in the 8 sep post: http://thread.gmane.org/gmane.comp.desktop.rox.devel/5435
Hmm, the question is: how can screen be NULL in frame 9
I guess that's just a compiler optimisation messing up the variables. The code does several checked casts on screen before it gets to _XReply, so I don't think it can have been NULL on entry.
Hmm, inside _gdk_x11_get_window_child_info() you can see that we do call gdk_error_trap_push()/pop() around the call to list_children_and_wm_state(), which in turn also uses the async GetResReq()/_XReply(), so we're inconsistent here. Either error trapping is necessary, in which case we need it around the _XReply() in _gdk_x11_get_window_child_info() as well, or it is not, in which case it it redundant around _gdk_x11_get_window_child_info().
list_children_and_wm_state() doesn't push an async handler when wm_state_atom() is NULL, so the error trap is needed there. One possibility is that the XError that is being received is something other than BadWindow/BadDrawable get_child_info_handler() only ignores those. Does your special error handler actually dump the error information? - that would be very useful information to have.
The error message was "BadWindow (invalid Window parameter)", according to the 'bt full' output here: http://article.gmane.org/gmane.comp.desktop.rox.devel/5645
Created attachment 38696 [details] Another backtrace Here another backtrace from a crash during a drag and drop operation, this time seen on my own machine (using Debian's GTK 2.6.2-4).
Created attachment 39333 [details] backtrace for gnome dnd bug Here's another backtrace with debian sid gtk 2.6.2-4 during a drag-n-drop operation. This happens *often*, but is inpredictable enough that I don't know precisely how to trigger it.
closing out ancient bugs