After 20-30 minutes of running my gtk app, it dies with an X windows error as follows:
The program '.' received an X Window System error. This probably reflects a bug in the program. The error was 'BadRequest (invalid request code or no such operation)'. (Details: serial 8424308 error_code 1 request_code 0 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 if you break on the gdk_x_error() function.) I am running GTK 2.10.6 and Xorg 7.1.1. My distrib is based on fedora core 6. I got a backtrace (attached below), but the crash is just inside the gtk main loop so it doesn't really help me too much. My application does a lot of continuous updates and redraws to the screen and so I suspect that may be part of the problem. The backtrace shows the crash occured inside the XAllocIDs function (and it always seems to be inside this same function). Is there a limited number of IDs that can be allocated or do they get recycled in any way? I do have multiple threads but I have been pretty careful about using the gdk_threads_enter/exit functions where necessary. When I run the same app under Fedora Core 5 using the same GTK version but Xorg7.0.0 I don't seem to see any problem.. Backtrace: #0 gdk_x_error (display=0x892a9d8, error=0xbfa0bdc8) at gdkmain-x11.c:608 #1 0xb76dddda in _XError () from /usr/lib/libX11.so.6 #2 0xb76df8a4 in _XReply () from /usr/lib/libX11.so.6 #3 0xb76dfc2c in _XFlush () from /usr/lib/libX11.so.6 #4 0xb76dfe9c in _XAllocIDs () from /usr/lib/libX11.so.6 #5 0xb754bfb5 in XRenderCreatePicture () from /usr/lib/libXrender.so.1 #6 0xb7c01481 in gdk_x11_drawable_get_picture (drawable=0x8a8b430) at gdkdrawable-x11.c:350 #7 0xb7c02c62 in gdk_x11_draw_pixbuf (drawable=0x8a8b430, gc=0x8a18a90, pixbuf=0x89f0d70, src_x=0, src_y=0, dest_x=34, dest_y=342, width=20, height=20, dither=GDK_RGB_DITHER_NORMAL, x_dither=0, y_dither=0) at gdkdrawable-x11.c:1440 #8 0xb7bde899 in gdk_draw_pixbuf (drawable=0x8a8b430, gc=0x8a18a90, pixbuf=0x89f0d70, src_x=0, src_y=0, dest_x=34, dest_y=342, width=20, height=20, dither=GDK_RGB_DITHER_NORMAL, x_dither=0, y_dither=0) at gdkdraw.c:759 #9 0xb7be8781 in gdk_pixmap_draw_pixbuf (drawable=0x892a9d8, gc=0x8a18a90, pixbuf=0x89f0d70, src_x=0, src_y=0, dest_x=34, dest_y=342, width=20, height=20, dither=GDK_RGB_DITHER_NORMAL, x_dither=0, y_dither=0) at gdkpixmap.c:427 #10 0xb7bde899 in gdk_draw_pixbuf (drawable=0x8a474b0, gc=0x8a18a90, pixbuf=0x89f0d70, src_x=0, src_y=0, dest_x=34, dest_y=342, width=20, height=20, dither=GDK_RGB_DITHER_NORMAL, x_dither=0, y_dither=0) at gdkdraw.c:759 #11 0xb7bf4012 in gdk_window_draw_pixbuf (drawable=0x8940780, gc=0x8a18a90, pixbuf=0x89f0d70, src_x=0, src_y=0, dest_x=34, dest_y=342, width=20, height=20, dither=GDK_RGB_DITHER_NORMAL, x_dither=0, y_dither=0) at gdkwindow.c:2046 #12 0xb7bde899 in gdk_draw_pixbuf (drawable=0x8940780, gc=0x8a18a90, pixbuf=0x89f0d70, src_x=0, src_y=0, dest_x=34, dest_y=342, width=20, height=20, dither=GDK_RGB_DITHER_NORMAL, x_dither=0, y_dither=0) at gdkdraw.c:759 #13 0xb7d403eb in gtk_image_expose (widget=0x89a5408, event=0xbfa0c210) at gtkimage.c:1755 #14 0xb7d5d06e in _gtk_marshal_BOOLEAN__BOXED (closure=0x89670d0, return_value=0xbfa0c3d0, n_param_values=2, param_values=0xbfa0c4ac, invocation_hint=0xbfa0c3bc, marshal_data=0xb7d40154) at gtkmarshalers.c:84 #15 0xb7a9f6f9 in g_value_set_static_boxed () from /lib/libgobject-2.0.so.0 #16 0xb7aa0fed in g_closure_invoke () from /lib/libgobject-2.0.so.0 #17 0xb7ab24d3 in g_signal_override_class_closure () from /lib/libgobject-2.0.so.0 .... #135 0xb7d569b4 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0 #136 0xb7bca64f in gdk_window_is_viewable () from /usr/lib/libgdk-x11-2.0.so.0 #137 0xb7bca897 in gdk_window_process_all_updates () from /usr/lib/libgdk-x11-2.0.so.0 #138 0xb7cc6522 in gtk_container_check_resize () from /usr/lib/libgtk-x11-2.0.so.0 #139 0xb79d35e1 in g_source_is_destroyed () from /lib/libglib-2.0.so.0 #140 0xb79d5342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #141 0xb79d831f in g_main_context_check () from /lib/libglib-2.0.so.0 #142 0xb79d86c9 in g_main_loop_run () from /lib/libglib-2.0.so.0 #143 0xb7d56c14 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0 #144 0x08183733 in main (argc=2, argv=0xbf919694) at main.c:278 _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list