After installing the necessary dbg packages (libglib2.0-0-dbg, libgtk2.0-0-dbg, libx11-6-dbg), I could generate the following stack trace after breaking at the gdk_x_error() function as instructed in the original error message: #0 gdk_x_error (display=0x20bbf20, error=0x7fffff71cd20) at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkmain-x11.c:613 No locals. #1 0x00007f50f03165b4 in _XError (dpy=0x20bbf20, rep=0x22892b0) at ../../src/XlibInt.c:2931 rtn_val = event = {type = 0, xany = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995}, xkey = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, root = 32, subwindow = 58358944, time = 139985577120026, x = 34774768, y = 0, x_root = -9319008, y_root = 32767, state = 34326944, keycode = 0, same_screen = 34327008}, xbutton = { type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, root = 32, subwindow = 58358944, time = 139985577120026, x = 34774768, y = 0, x_root = -9319008, y_root = 32767, state = 34326944, button = 0, same_screen = 34327008}, xmotion = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, root = 32, subwindow = 58358944, time = 139985577120026, x = 34774768, y = 0, x_root = -9319008, y_root = 32767, state = 34326944, is_hint = 0 '\0', same_screen = 34327008}, xcrossing = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, root = 32, subwindow = 58358944, time = 139985577120026, x = 34774768, y = 0, x_root = -9319008, y_root = 32767, mode = 34326944, detail = 0, same_screen = 34327008, focus = 0, state = 34327004}, xfocus = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, mode = 32, detail = 0}, xexpose = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, x = 32, y = 0, width = 58358944, height = 0, count = -291958502}, xgraphicsexpose = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, drawable = 33556995, x = 32, y = 0, width = 58358944, height = 0, count = -291958502, major_code = 32592, minor_code = 34774768}, xnoexpose = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, drawable = 33556995, major_code = 32, minor_code = 0}, xvisibility = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, state = 32}, xcreatewindow = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, parent = 33556995, window = 32, x = 58358944, y = 0, width = -291958502, height = 32592, border_width = 34774768, override_redirect = 0}, xdestroywindow = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, event = 33556995, window = 32}, xunmap = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, event = 33556995, window = 32, from_configure = 58358944}, xmap = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, event = 33556995, window = 32, override_redirect = 58358944}, xmaprequest = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, parent = 33556995, window = 32}, xreparent = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, event = 33556995, window = 32, parent = 58358944, x = -291958502, y = 32592, override_redirect = 34774768}, xconfigure = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, event = 33556995, window = 32, x = 58358944, y = 0, width = -291958502, height = 32592, border_width = 34774768, above = 140737479036320, override_redirect = 34326944}, xgravity = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, event = 33556995, window = 32, x = 58358944, y = 0}, xresizerequest = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, width = 32, height = 0}, xconfigurerequest = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, parent = 33556995, window = 32, x = 58358944, y = 0, width = -291958502, height = 32592, border_width = 34774768, above = 140737479036320, detail = 34326944, value_mask = 34327008}, xcirculate = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, event = 33556995, window = 32, place = 58358944}, xcirculaterequest = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, parent = 33556995, window = 32, place = 58358944}, xproperty = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, atom = 32, time = 58358944, state = -291958502}, xselectionclear = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, selection = 32, time = 58358944}, xselectionrequest = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, owner = 33556995, requestor = 32, selection = 58358944, target = 139985577120026, property = 34774768, time = 140737479036320}, xselection = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, requestor = 33556995, selection = 32, target = 58358944, property = 139985577120026, time = 34774768}, xcolormap = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, colormap = 32, new = 58358944, state = 0}, xclient = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, message_type = 32, format = 58358944, data = {b = "\032\021\231�P\177\000\000�\236\022\002\000\000\000\000��q�", s = {4378, -4455, 32592, 0, -24848, 530, 0, 0, -12896, -143}, l = {139985577120026, 34774768, 140737479036320, 34326944, 34327008}}}, xmapping = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, request = 32, first_keycode = 0, count = 58358944}, xerror = { type = 0, display = 0x20bbf20, resourceid = 14680102, serial = 4517, error_code = 3 '\003', request_code = 10 '\n', minor_code = 0 '\0'}, xkeymap = {type = 0, serial = 34324256, send_event = 14680102, display = 0x11a5, window = 33556995, key_vector = " \000\000\000\000\000\000\000�|z\003\000\000\000\000\032\021\231�P\177\000\000�\236\022\002\000\000\000"}, pad = {0, 34324256, 14680102, 4517, 33556995, 32, 58358944, 139985577120026, 34774768, 140737479036320, 34326944, 34327008, 34327004, 34331168, 34331120, 34326996, 34326904, 139985577118244, 34326904, 140737479036480, 34326880, 139985712048640, 4001, 34324256}} async = next = (_XAsyncHandler *) 0xfa1 #2 0x00007f50f031d8f9 in process_responses (dpy=0x20bbf20, wait_for_first_event=0, current_error=0x0, current_request=0) at ../../src/xcb_io.c:207 req = (PendingRequest *) 0x0 event_sequence = 0 reply = (void *) 0x0 event = (xcb_generic_event_t *) 0x22892b0 error = (xcb_generic_error_t *) 0x0 c = (xcb_connection_t *) 0x20bc960 __PRETTY_FUNCTION__ = "process_responses" #3 0x00007f50f031e345 in _XEventsQueued (dpy=0x20bbf20, mode=) at ../../src/xcb_io.c:256 No locals. #4 0x00007f50f0306e4d in XPending (dpy=0x20bbf20) at ../../src/Pending.c:56 ret_val = 0 #5 0x00007f50f28e0833 in gdk_event_prepare (source=, timeout=) at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkevents-x11.c:154 display = (GdkDisplay *) 0x20c8000 retval = 0 #6 0x00007f50f3e461e2 in IA__g_main_context_prepare (context=0x20d26b0, priority=0x7fffff71cf74) at /build/buildd/glib2.0-2.20.1/glib/gmain.c:2134 result = prepare = (gboolean (*)(GSource *, gint *)) 0x7f50f28e07d0 source_timeout = -1 i = n_ready = 0 current_priority = 2147483647 source = (GSource *) 0x20d2630 #7 0x00007f50f3e465ff in g_main_context_iterate (context=0x20d26b0, block=1, dispatch=1, self=) at /build/buildd/glib2.0-2.20.1/glib/gmain.c:2428 max_priority = timeout = some_ready = nfds = allocated_nfds = fds = (GPollFD *) 0x23930f0 __PRETTY_FUNCTION__ = "g_main_context_iterate" #8 0x00007f50f3e46dad in IA__g_main_loop_run (loop=0x2697890) at /build/buildd/glib2.0-2.20.1/glib/gmain.c:2656 self = (GThread *) 0x20b7430 __PRETTY_FUNCTION__ = "IA__g_main_loop_run" #9 0x00007f50f2c69bc7 in IA__gtk_main () at /build/buildd/gtk+2.0-2.16.1/gtk/gtkmain.c:1205 tmp_list = (GList *) 0x7f50f35a7150 functions = (GList *) 0x0 init = (GtkInitFunction *) 0x228ef30 loop = #10 0x00007f50f32bd772 in ?? () from /var/lib/python-support/python2.6/gtk-2.0/gtk/_gtk.so No symbol table info available. #11 0x00000000004a2d39 in PyEval_EvalFrameEx ()