GNOME Bugzilla – Bug 588174
gdm crashes in libgtk2 with SIGSEGV at _gdk_visual_init (gdkvisual-x11.c:249)
Last modified: 2009-07-09 17:56:28 UTC
Steps to reproduce: Originally reported on launchpad: https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/397309 1. Setup a triplehead setup with NVIDIA drivers 1.73 2. Start X 3. Watch gdmgreeter segfault in libgdk Stack trace: Core was generated by `/usr/lib/gdm/gdmgreeter'. Program terminated with signal 11, Segmentation fault. [New process 19761]
+ Trace 216370
Thread 1 (process 19761)
Other information: [pasted from launchpad bug report] System information: Ubuntu 9.04 Package Version: 2.16.1-0ubuntu2 I have two NVidia cards installed with the 1.73 restricted drivers. My setup is two screens on a 6600GT, and a single screen on a FX 5200. I rebuilt gtk from source with no optimizations, and used apport to obtain a core dump. gdmgreeter does a SIGSEGV at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkvisual-x11.c:249. Examination of the core dump with GDB shows that default_xvisual is a NULL pointer, thus why there is a segfault when it tries to dereference the pointer. default_xvisual is derived from the X11 screen structure for that screen, which appears to be filled out correctly except that root_visual is NULL, which is where default_xvisual comes from. Its not clear to me whether the root_visual screen is allowed to be NULL, but also its clear that GTK doesn't check for a NULL pointer there either before using it, which seems to me to be a bug. However, I don't have any X11 experience so I'm not quite sure what the action should be if it does not have a default_xvisual (I noticed that it enumerated 72 visuals, so maybe it could just pick one as the system visual?). The fact that the root_visual isn't filled in seems to me (without any actual knowledge here) that its a bug in the NVidia driver (which I realize isn't supported by Ubuntu), but if that is an acceptable to be NULL then it should be fixed in GTK. I would just like some direction on how GTK should be fixed (if it should), and I'll patch it and test. Its quite annoying because I can't start X until fixing this. :)
DefaultVisual returning NULL is not OK. Not our bug.