Thanks Matthew, It looks to me like the refcount is being decremented, but this doesn't necessarily remove all references to the object and associated gdk/X drawables. I expect that this X error occurs if others have references to this glcontext object when the containing window is destroyed.
Sam and I have been discussing using a mutex to reduce resource constraints on the OpenGL pipeline (represented by the glcontext object). Queuing up requests for the glcontext would have the secondary effect of removing the need to refcount the object. GLX is still mostly black magic to me, so I'm concerned that this approach would have unforeseen consequences. But that's what sid and guinea pigs are for, right? :) Cheers, C.J. On Fri, 2008-03-21 at 12:49 +0000, Matthew King wrote: > Package: gtkgl2 > Version: 2.0.0-1 > X-Debbugs-CC: C.J. Adams-Collier <[EMAIL PROTECTED]> > > When the GL area is destroyed either via the window manager or in code > with gtk_destroy_widget, X complains with: > > The program 'gtkgltest' 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 231 error_code 9 request_code 128 minor_code 9) > (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've narrowed it down only as far as gtk_gl_area_destroy in gtkglarea.c, > line 176: > if (gl_area->glcontext) > g_object_unref(gl_area->glcontext); > > I know too little of Gtk (and its relatives) and GtkGL to dig any > further. > > This occurs in i386 and amd64 distributions of sid, kernel > 2.6.24-1-amd64. > > libc6 2.7-9 > libgtk2.0-0 2.12.8-1 > libatk1.0-0 1.20.0-1 > libglib2.0-0 2.14.6-1 > libglu1-mesa 7.0.3~rc2-1 > xserver-xorg 1:7.3+10 > libx11-6 2:1.0.3-7 > > Matthew >
signature.asc
Description: This is a digitally signed message part