After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 600891 - BadDrawable (invalid Pixmap or Window parameter error when using GtkPlug
BadDrawable (invalid Pixmap or Window parameter error when using GtkPlug
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-11-05 22:28 UTC by Pooja
Modified: 2015-01-11 20:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pooja 2009-11-05 22:28:50 UTC
Hi All

I am using GtkPlug/GtkSocket in my application but whenever there is key press event ..i get a gdk_x_error with following parameters 
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 26960 error_code 9 request_code 53 minor_code 0)

This piece of code used to work perfectly on gtk2.16 ,but crashes on gtk 2.18 and I am using gtk_socket_get_id to get Native window id of socket window and passing this to the GtkPlug to create a plug using gtk_plug_construct .Could it be because of client side window functionality?
Comment 1 Tony Houghton 2009-12-07 00:20:16 UTC
I think this might be the same bug I and other Rox users have been experiencing. It uses GtkPlug/Socket to implement panel applets, and it keeps crashing with "X Window System errors" when adding a new applet.

I found that in an applet I was developing I could greatly reduce the frequency of the crashes by calling gtk_widget_show on the plug before adding child widgets, but I'm not sure it entirely cured the problem.

IIRC I did see the BadDrawable error sometimes, but the one I trapped a few weeks ago had a different error:

** (rox:12764): WARNING **: The program 'rox' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 27704 error_code 2 request_code 53 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger.)

...

Program terminated with signal 6, Aborted.
  • #0 raise
    from /lib/libc.so.6
  • #0 raise
    from /lib/libc.so.6
  • #1 abort
    from /lib/libc.so.6
  • #2 ??
  • #3 _XError
    from /usr/lib/libX11.so.6
  • #4 ??
    from /usr/lib/libX11.so.6
  • #5 _XReply
    from /usr/lib/libX11.so.6
  • #6 _XGetWindowAttributes
    from /usr/lib/libX11.so.6
  • #7 XGetWindowAttributes
    from /usr/lib/libX11.so.6
  • #8 gdk_window_impl_x11_get_colormap
    at /tmp/buildd/gtk+2.0-2.18.1/gdk/x11/gdkwindow-x11.c line 376
  • #9 _gdk_pixmap_new
    at /tmp/buildd/gtk+2.0-2.18.1/gdk/x11/gdkpixmap-x11.c line 186
  • #10 gdk_window_begin_implicit_paint
    at /tmp/buildd/gtk+2.0-2.18.1/gdk/gdkwindow.c line 2542
  • #11 gdk_window_process_updates_internal
    at /tmp/buildd/gtk+2.0-2.18.1/gdk/gdkwindow.c line 5204
  • #12 IA__gdk_window_process_all_updates
    at /tmp/buildd/gtk+2.0-2.18.1/gdk/gdkwindow.c line 5326
  • #13 gtk_container_idle_sizer
    at /tmp/buildd/gtk+2.0-2.18.1/gtk/gtkcontainer.c line 1353
  • #14 gdk_threads_dispatch
    at /tmp/buildd/gtk+2.0-2.18.1/gdk/gdk.c line 506
  • #15 g_main_dispatch
    at /tmp/buildd/glib2.0-2.22.1/glib/gmain.c line 1960
  • #16 IA__g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.22.1/glib/gmain.c line 2513
  • #17 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.22.1/glib/gmain.c line 2591
  • #18 IA__g_main_loop_run
    at /tmp/buildd/glib2.0-2.22.1/glib/gmain.c line 2799
  • #19 IA__gtk_main
    at /tmp/buildd/gtk+2.0-2.18.1/gtk/gtkmain.c line 1205
  • #20 ??
  • #21 __libc_start_main
    from /lib/libc.so.6
  • #22 ??
  • #23 ??
  • #24 ??
  • #25 ??
  • #26 ??
  • #27 ??
  • #28 ??

Comment 2 Tony Houghton 2009-12-07 00:26:50 UTC
I couldn't get it to crash today by adding applets, but I found that by quitting a certain applet I got a crash every time, but only if I ran Rox with --sync. FYI the following backtrace is for gtk 2.18.4-1 from debian sid, I think the previous one was from 2.18.1.

** (rox:3409): WARNING **: The program 'rox' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
  (Details: serial 18588 error_code 9 request_code 53 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger.)

** (rox:3409): WARNING **: We got a BadWindow error from the X server. This might be due to this GTK bug (during drag-and-drop?):
http://bugzilla.gnome.org/show_bug.cgi?id=152151
Trying to continue...

** (rox:3409): WARNING **: The program 'rox' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadPixmap (invalid Pixmap parameter)'.
  (Details: serial 18589 error_code 4 request_code 54 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger.)
/home/tony/Rox/PanelClock/clock.py:18: GtkDeprecationWarning: gtk.timeout_remove is deprecated, use gobject.source_remove instead
  g.timeout_remove(timeout)
Aborted

  • #0 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 *__GI_abort
    at abort.c line 88
  • #2 ??
  • #3 _XError
    at ../../src/XlibInt.c line 3103
  • #4 process_responses
    at ../../src/xcb_io.c line 214
  • #5 _XReply
    at ../../src/xcb_io.c line 464
  • #6 XSync
    at ../../src/Sync.c line 48
  • #7 _XSyncFunction
    at ../../src/Synchro.c line 37
  • #8 XFreePixmap
    at ../../src/FreePix.c line 43
  • #9 gdk_pixmap_impl_x11_dispose
    at /tmp/buildd/gtk+2.0-2.18.4/gdk/x11/gdkpixmap-x11.c line 103
  • #10 IA__g_object_unref
    at /tmp/buildd/glib2.0-2.22.3/gobject/gobject.c line 2441
  • #11 gdk_pixmap_finalize
    at /tmp/buildd/gtk+2.0-2.18.4/gdk/gdkpixmap.c line 231
  • #12 IA__g_object_unref
    at /tmp/buildd/glib2.0-2.22.3/gobject/gobject.c line 2472
  • #13 gdk_window_end_implicit_paint
    at /tmp/buildd/gtk+2.0-2.18.4/gdk/gdkwindow.c line 2644
  • #14 gdk_window_process_updates_internal
    at /tmp/buildd/gtk+2.0-2.18.4/gdk/gdkwindow.c line 5264
  • #15 IA__gdk_window_process_all_updates
    at /tmp/buildd/gtk+2.0-2.18.4/gdk/gdkwindow.c line 5351
  • #16 gtk_container_idle_sizer
    at /tmp/buildd/gtk+2.0-2.18.4/gtk/gtkcontainer.c line 1353
  • #17 gdk_threads_dispatch
    at /tmp/buildd/gtk+2.0-2.18.4/gdk/gdk.c line 506
  • #18 g_main_dispatch
    at /tmp/buildd/glib2.0-2.22.3/glib/gmain.c line 1960
  • #19 IA__g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.22.3/glib/gmain.c line 2513
  • #20 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.22.3/glib/gmain.c line 2591
  • #21 IA__g_main_loop_run
    at /tmp/buildd/glib2.0-2.22.3/glib/gmain.c line 2799
  • #22 IA__gtk_main
    at /tmp/buildd/gtk+2.0-2.18.4/gtk/gtkmain.c line 1218
  • #23 ??
  • #24 __libc_start_main
    at libc-start.c line 222
  • #25 ??
  • #26 ??
  • #27 ??
  • #28 ??
  • #29 ??
  • #30 ??
  • #31 ??

Comment 3 Matthias Clasen 2015-01-11 20:31:02 UTC
This may have been fixed by commit 430ea2fff639f31b868e025002a32ba473c7bd07