GNOME Bugzilla – Bug 746746
gtk3-demo 'OpenGL Area' crashes on systems with old OpenGL version
Last modified: 2015-03-25 17:04:55 UTC
Hardware: Intel Ironlake Desktop It only supports OpenGL 2.1 using Mesa 10.4, so it causes gtk3-demo to crash with the following messages: (gtk3-demo:25924): Gdk-ERROR **: The program 'gtk3-demo' received an X Window System error. This probably reflects a bug in the program. The error was 'GLXBadFBConfig'. (Details: serial 4435 error_code 179 request_code 155 (GLX) minor_code 34) (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 GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) Program received signal SIGTRAP, Trace/breakpoint trap. Stack trace:
+ Trace 234890
Taking this up for 3.16.1.
Created attachment 300282 [details] [review] x11/gl: Trap GL context creation Avoid an X11 error in case the context creation fails, so we can avoid a crash and pick it up in the upper layers, and display an error.
This should take care of the crash, and the GtkGLArea should display an error message. Testing on older platforms is appreciated.
Created attachment 300287 [details] [review] x11/gl: Do not try to call MakeCurrent with a NULL context This should not happen, but better safe than sorry.
Created attachment 300288 [details] [review] glarea: Check that the context is not NULL The public API should perform more checks when it comes to an NULL context.
Created attachment 300289 [details] [review] demo/glarea: Check errors on GtkGLArea We should not call OpenGL API if GtkGLArea is in an error state.
15:26 < lantw44> ebassi: It shows error instead of exiting now I'll assume a Tested-by, and push the patches to master. We should cherry-pick them for 3.16.1 as well.
Attachment 300282 [details] pushed as b899a78 - x11/gl: Trap GL context creation Attachment 300287 [details] pushed as 85141bc - x11/gl: Do not try to call MakeCurrent with a NULL context Attachment 300288 [details] pushed as fae3eaf - glarea: Check that the context is not NULL Attachment 300289 [details] pushed as 721134b - demo/glarea: Check errors on GtkGLArea