Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 327965 - games-simulation/gl117-1.3.2 segfaults on startup
Summary: games-simulation/gl117-1.3.2 segfaults on startup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-12 17:35 UTC by Nick White
Modified: 2011-10-15 20:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
paludis --info gl117 (gl117-info,13.50 KB, text/plain)
2010-07-12 17:36 UTC, Nick White
Details
paludis --info libsdl (libsdl-info,13.02 KB, text/plain)
2010-07-13 01:27 UTC, Nick White
Details
Patch to work around mode-setting problem (resolution-workaround.patch,395 bytes, patch)
2010-07-13 08:32 UTC, Nick White
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick White 2010-07-12 17:35:18 UTC
After installing gl117-1.3.2, I found that it doesn't get very far before a segfault. At all.

Console output:
~ > gl-117 -d5
Info: Entering debug level 5
Info: Found gl-117 data directory /usr/share/games/gl-117 
Info: Startup gl-117, V1.3 ... 
Debug: Getting directory locations
Info: Loading /home/nick/.gl-117/conf 
Warning: Could not load /home/nick/.gl-117/conf
Debug: Creating new configuration
Info: No configuration file found. Testing...
Info: Using SDL and GLUT
Segmentation fault

GDB backtrace:
Program received signal SIGSEGV, Segmentation fault.
0xb7fc9776 in glViewport () from //usr/lib/opengl/xorg-x11/lib/libGL.so.1
(gdb) bt
#0  0xb7fc9776 in glViewport () from //usr/lib/opengl/xorg-x11/lib/libGL.so.1
#1  0x0804da21 in setScreen(int, int, int, int) ()
#2  0x0804db04 in config_test(int, char**) ()
#3  0x0806095f in main ()

I'll attach paludis --info in a moment.
Comment 1 Nick White 2010-07-12 17:36:47 UTC
Created attachment 238473 [details]
paludis --info gl117
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2010-07-12 21:42:02 UTC
you're probably missing some use flags.  resync and try again.
Comment 3 Nick White 2010-07-12 22:52:58 UTC
Resynced, and the problem remains I'm afraid. I checked and I meet all the use flag requirements in the ebuild.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2010-07-12 23:12:43 UTC
What version of the ebuild?
Comment 5 Nick White 2010-07-12 23:17:13 UTC
(In reply to comment #4)
> What version of the ebuild?

games-simulation/gl177-1.3.2, the last entry in the Changelog is:

12 Jul 2010; Michael Sterrett <mr_bones_@gentoo.org> gl117-1.3.2.ebuild:
  add more use deps for libsdl
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2010-07-12 23:21:44 UTC
I don't see opengl in your use flags.
Comment 7 Nick White 2010-07-13 01:27:51 UTC
Created attachment 238543 [details]
paludis --info libsdl

(In reply to comment #6)
> I don't see opengl in your use flags.

I think that's just because paludis only shows the use flags it considers directly relevant to the package. However opengl is enabled globally, as should be plain from the attached output of paludis --info libsdl
Comment 8 Mr. Bones. (RETIRED) gentoo-dev 2010-07-13 02:36:04 UTC
Dunno.  Works fine for me on (mostly) stable x86.  Could be something like -Os or maybe your intel opengl.
Comment 9 Nick White 2010-07-13 08:28:13 UTC
Aha. Found it. It's that it tries to change to mode 1024x768, whereas my netbook can only 1024x600. The function setGlutScreen in main.cpp should fail if the mode isn't possible, but for some reason it doesn't.

I'm not experienced with GLUT at all, but I'll attach a workaround bug which does the job for me, which tries 800x600 first if no configuration file is found (it's still easy to turn up in the game).
Comment 10 Nick White 2010-07-13 08:32:24 UTC
Created attachment 238597 [details, diff]
Patch to work around mode-setting problem

(In reply to comment #9)
> I'm not experienced with GLUT at all, but I'll attach a workaround bug which
> does the job for me, which tries 800x600 first if no configuration file is
> found (it's still easy to turn up in the game).

Here's the workaround. If someone with any glut experience wants to take a look at the setGlutScreen function, they could fix it properly (looks quite simple), but if not, I suggest we adopt this patch.
Comment 11 Nick White 2010-07-13 09:01:01 UTC
I just checked, and the bug is still present even with the latest ~x86 freeglut, 2.6.0.

It's the function glutGameModeGet that's segfaulting; it doesn't even get as far as glutEnterGameMode. Though I don't know why it should. As I said, I'm not familiar with glut, but my inexperienced guess would be that glutGameModeGet doesn't play well with newer x.org (the function in the source of freeglut states "This highly depends on the XFree86 extensions, not approved as X Consortium standards"). I'm using the latest stable xorg-server, by the way; 1.7.6.
Comment 12 Nick White 2010-07-13 09:25:11 UTC
(In reply to comment #11)
> It's the function glutGameModeGet that's segfaulting; it doesn't even get as
> far as glutEnterGameMode.

I'm actually not sure this is true. It might be, but my Glut/C++ debugging skills are weak. I'll really have to leave any further investigation to someone else.

This is also affecting ubuntu: https://bugs.launchpad.net/ubuntu/+source/gl-117/+bug/596468
Comment 13 Mark Nighswonger 2011-02-08 02:50:09 UTC
Hi,
I ran across this bug researching the same problem. I am running an ACER Aspire One netbook with Ubuntu 10.10. Out of desperation I went into my PC running 8.04. I copied all the .gl-177 files and pasted them in the same folder in my netbook. Worked like a charm. I realise I didn't fix anything but I am playing the game. Just thought folks might like to know.




(In reply to comment #12)
> (In reply to comment #11)
> > It's the function glutGameModeGet that's segfaulting; it doesn't even get as
> > far as glutEnterGameMode.
> 
> I'm actually not sure this is true. It might be, but my Glut/C++ debugging
> skills are weak. I'll really have to leave any further investigation to someone
> else.
> 
> This is also affecting ubuntu:
> https://bugs.launchpad.net/ubuntu/+source/gl-117/+bug/596468
> 

Comment 14 Nick White 2011-02-08 09:09:30 UTC
(In reply to comment #13)
> I am running an ACER Aspire
> One netbook with Ubuntu 10.10. Out of desperation I went into my PC running
> 8.04. I copied all the .gl-177 files and pasted them in the same folder in my
> netbook. Worked like a charm.

Yep. That's thanks to a configuration file being present which has a usable (i.e. probably height <= 600) resolution. The game crashes if it tries the default resolution (1024x768) and the screen is too small.
Comment 15 Mr. Bones. (RETIRED) gentoo-dev 2011-10-15 20:14:05 UTC
in portage.  thanks for the bug report and patch.