gnubik fails to launch; prints "cannot get suitable visual" to terminal and exits

Bug #318180 reported by Martin Olsson
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnubik (Ubuntu)
Fix Released
Undecided
I. De Marchi
Nominated for Intrepid by George Stephanos
Nominated for Jaunty by George Stephanos

Bug Description

Repro steps:
1. sudo apt-get install gnubik
2. launch "gnubik" from Applications::Games::Gnubik and nothing happens
3. start a terminal and type "gnubik", then it prints this error:

mnemo@kingfish:~$ gnubik

** ERROR **: Cannot get a suitable visual
aborting...
Trace/breakpoint trap (core dumped)

Revision history for this message
Martin Olsson (mnemo) wrote :

GDB says something goes wrong in function create_gl_area()

(gdb) r
Starting program: /usr/games/gnubik
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0x7f79f3b327f0 (LWP 4837)]

** ERROR **: Cannot get a suitable visual
aborting...

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x7f79f3b327f0 (LWP 4837)]
IA__g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=0x412465 "Cannot get a suitable visual", args1=0x7ffffbb6ad20)
    at /build/buildd/glib2.0-2.19.4/glib/gmessages.c:503
503 /build/buildd/glib2.0-2.19.4/glib/gmessages.c: No such file or directory.
 in /build/buildd/glib2.0-2.19.4/glib/gmessages.c
(gdb) bt
#0 IA__g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=0x412465 "Cannot get a suitable visual", args1=0x7ffffbb6ad20)
    at /build/buildd/glib2.0-2.19.4/glib/gmessages.c:503
#1 0x00007f79eeedb413 in IA__g_log (log_domain=0x7f79ee7a0a00 "", log_level=-296291000, format=0x31 <Address 0x31 out of bounds>)
    at /build/buildd/glib2.0-2.19.4/glib/gmessages.c:517
#2 0x000000000040ed38 in create_gl_area ()
#3 0x0000000000409349 in c_main ()
#4 0x00007f79eec2c84f in scm_boot_guile () from /usr/lib/libguile.so.12
#5 0x0000000000409290 in main ()
(gdb)

Revision history for this message
Martin Olsson (mnemo) wrote :

This bug happens on both Jaunty pre-release as of jan 17th and also on intrepid.

Revision history for this message
Martin Olsson (mnemo) wrote :

The error is printed by g_error from glarea-gtk.c line 165:

  int attribs[]={GDK_GL_RGBA,
                 GDK_GL_RED_SIZE, 1,
                 GDK_GL_GREEN_SIZE, 1,
                 GDK_GL_BLUE_SIZE, 1,

                 GDK_GL_DOUBLEBUFFER,

                 GDK_GL_DEPTH_SIZE ,1,

                 GDK_GL_ACCUM_RED_SIZE, 1,
                 GDK_GL_ACCUM_GREEN_SIZE, 1,
                 GDK_GL_ACCUM_BLUE_SIZE, 1,

                 GDK_GL_ATTRIB_LIST_NONE
  };

  glconfig = gdk_gl_config_new(attribs);

  if ( !glconfig )
    g_error("Cannot get a suitable visual");

So it seems that gdk_gl_config_new() returns NULL. The documentation for this function doesn't clearly say what will cause it to return NULL though:
http://gtkglext.sourceforge.net/reference/gtkglext/gtkglext-gdkglconfig.html#gdk-gl-config-new

Revision history for this message
Martin Olsson (mnemo) wrote :

FWIW, I can repro this bug both on intel hardware and on ATI graphics card hardware so it's unlikely to be a driver bug. Probably this package or some lib it uses is just packaged incorrectly?

Revision history for this message
Phil Sung (psung) wrote :

For what it's worth... upstream gnubik 2.2 (tarball from gnu.org), when compiled with the latest versions of libgl1-mesa-dev, libglu1-mesa-dev, and libgtkglext1-dev in intrepid, gives the same error.

Revision history for this message
Martin Olsson (mnemo) wrote :

Here is some lspci lines for three different machines that exhibit this bug. The desktop machine with the ATI radeon card is pretty old but it runs World of Warcraft etc smoothly and it's not an integrated chipset like the two first machines).

Desktop with integrated intel graphics (bought this summer with a Gigabyte GA-EG45M-DS2H motherboard)
(it's an Intel G45 chipset with a X4500HD graphics card)
00:02.0 VGA compatible controller [0300]: Intel Corporation 4 Series Chipset Integrated Graphics Controller [8086:2e22] (rev 03)
00:02.1 Display controller [0380]: Intel Corporation 4 Series Chipset Integrated Graphics Controller [8086:2e23] (rev 03)

Normal (non-netbook) laptop with integrated intel (GM965 gfx chipset):
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller [8086:2a02] (rev 0c)
00:02.1 Display controller [0380]: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller [8086:2a03] (rev 0c)

Another desktop machine with a decent (but pretty old) radeon card:
01:00.0 VGA compatible controller [0300]: ATI Technologies Inc RV350 AP [Radeon 9600] [1002:4150]
01:00.1 Display controller [0380]: ATI Technologies Inc RV350 AP [Radeon 9600] (Secondary) [1002:4170]

Revision history for this message
Martin Olsson (mnemo) wrote :
Revision history for this message
Martin Olsson (mnemo) wrote :
Revision history for this message
Martin Olsson (mnemo) wrote :
Revision history for this message
George Stephanos (gaf-stephanos) wrote :

I have the same on an Intel 945GM. The thing is the new X doesn't prepare visuals for all the glxfbconfigs it gets. From my glxinfo and the ones above, i found that there are only 3 which get loaded and gnubik needs another. I tried the "GLXVisuals all" option which prepares all glxvisuals but this makes me lose those 3 and that makes compiz saying it can't find a visual thought gnubik works with that option.

Revision history for this message
George Stephanos (gaf-stephanos) wrote :

I think the apps are the ones who should adopt to X and not the opposite. This patch makes gnubik work for a while.... till someone does something serious about it.

Revision history for this message
Guillaume Bottex (danmcgoo) wrote :

The bug appends on both my laptop and my PC.
But it happens only when I use the ATI open driver.
With fglrx on gnubik runs correctly.

Revision history for this message
I. De Marchi (tangram-peces) wrote :

Hi,
I have adopted the gnubik package in Debian and I have not been able to reproduce this error. The report is very old and new versions of the program have been published.
Please check if we can reproduce the error with the latest version of the package (2.4.3-2 on Debian).
If the error does not occur, close the report

Regards!

I. De Marchi

Changed in gnubik (Ubuntu):
status: New → Fix Released
assignee: nobody → I. De Marchi (tangram-peces)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.