Sun 07 Oct 2007 02:41:24 AM UTC, original submission:
$ ./src/glob2
Segmentation fault
$ gdb ./src/glob2
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) r
Starting program: /tmp/glob2-0.9.1/src/glob2
[Thread debugging using libthread_db enabled]
[New Thread 46912498449088 (LWP 2139)]
[New Thread 1084246352 (LWP 2142)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912498449088 (LWP 2139)]
0x0000000000601c6a in GAGCore::GraphicContext::setRes (this=0x953bf0, w=2560,
h=1024, flags=19) at libgag/src/GraphicContext.cpp:1903
1903 if ((optionFlags & USEGPU) && (_gc->sdlsurface->format->BitsPerPixel != 32))
(gdb) bt full
#0 0x0000000000601c6a in GAGCore::GraphicContext::setRes (this=0x953bf0,
w=2560, h=1024, flags=19) at libgag/src/GraphicContext.cpp:1903
sdlFlags = 2415919122
#1 0x0000000000604869 in GraphicContext (this=0x953bf0, w=2560, h=1024,
flags=19) at libgag/src/GraphicContext.cpp:1851
No locals.
#2 0x0000000000633ca4 in GAGCore::Toolkit::initGraphic (w=2560, h=1024,
flags=19) at libgag/src/Toolkit.cpp:51
No locals.
#3 0x00000000004d820b in GlobalContainer::load (this=0x933110)
at src/GlobalContainer.cpp:452
_PRETTY_FUNCTION_ = "void GlobalContainer::load()"
#4 0x00000000004d3deb in Glob2::run (this=0x7fff1d19199f, argc=1,
argv=0x7fff1d191a88) at src/Glob2.cpp:257
_PRETTY_FUNCTION_ = "int Glob2::run(int, char**)"
#5 0x00000000004d4ce7 in main (argc=1, argv=0x7fff1d191a88)
at src/Glob2.cpp:502
glob2 = {static verbose = false, isRunning = false}
Looks like the return value of SDL_SetVideoMode wasn't checked.
I realized that this happened after I switched from using two monitors giving me a 2560x1024 X screen to a single monitor giving me 1280x1024 X screen. However, ~/.glob2/preferences.txt still said this:
$ grep screen ~/.glob2/preferences.txt
screenWidth=2560
screenHeight=1024
screenFlags=19
This doesn't seem to be a problem in windowed mode since the game just creates a huge window.
$ ./src/glob2 --version
Globulation 2 - 0.9.1
...
The game was compiled from http://dl.sv.nongnu.org/releases/glob2/0.9.1/glob2-0.9.1.tar.gz on Fedora 7.
|