Game Development Community

Segfault at demo startup :(

by Clemens Eisserer · in Torque Game Engine · 02/21/2004 (12:25 am) · 4 replies

Hi there!

I've just received, that my CVS access is now opened - yes!

However, the first thing I did was to compile the whole thing in debug mode and try it out. I try to try it out now for about 3 hours, I always get the same error.

If I do:
ce@linux:~/Development/3d/torque/torque/example> ./torqueDemo_DEBUG.bin -game starter.racing -mission starter.racing/data/missions/racing.mis

the application crashes with a segfault, gdb says its here:

Starting program: /home/ce/Development/3d/torque/torque/example/torqueDemo_DEBUG.bin
[New Thread 16384 (LWP 3786)]
[New Thread 32769 (LWP 3788)]
[New Thread 16386 (LWP 3789)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 3786)]
0xd07d642c in ?? ()
(gdb) bt
#0 0xd07d642c in ?? ()
#1 0x083d1339 in glLoadMatrixf ()

I know that doesnt help much, but the program was compilied with debug enabled, so it seems this problem is a little bit hard to find.
I have SuSE Linux9.0 with the NVIDIA-Drivers 5336 and GCC3.3.1 . All OpenGL applications I know work without any problems (except java2d opengl pipeline) so I guess it's not my opengl setup. I'm a little bit sad, not a good start :(
It looks like a problem in a external library, am I right? What can I do to make it work, are there any known problems?

Thanks a lot, lg Clemens

#1
02/21/2004 (9:35 am)
What version of torque are you using? The head or an older version?

It looks like it is crashing when calling glLoadMatrixf, which does suggest a problem with your opengl driver installation. Try running "glxinfo" to make sure that it is using your nvidia drivers and not mesa.
#2
02/21/2004 (10:06 am)
Hi there!

I'm using head, I just co'ed CVS last night.

No, I'm 100% sure that all my OpenGL-Stuff is installed correctly.
glxinfo says that:

name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.3
server glx extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control
client glx vendor string: NVIDIA Corporation
client glx version string: 1.3
client glx extensions:
GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
GLX_NV_swap_group, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
GLX_SGI_swap_control, GLX_NV_float_buffer
GLX extensions:
GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce4 488 Go/AGP/SSE2
OpenGL version string: 1.4.1 NVIDIA 53.36
..........
glu extensions:
GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess


Because I had some trouble with my GLU-Libs I reinstalled the sample-implementation of GLU created by SCI, now I get another backtrace but again a segfault:

Starting program: /home/ce/Development/3d/torque/torque/example/torqueDemo_DEBUG.bin
[New Thread 16384 (LWP 7671)]
[New Thread 32769 (LWP 7673)]
[New Thread 16386 (LWP 7674)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 7671)]
0x083ce37c in glBegin ()
(gdb) bt
#0 0x083ce37c in glBegin ()
#1 0x419e4caf in _nv000077gl () from /usr/lib/tls/libGLcore.so.1
#2 0xbffff0e0 in ?? ()
#3 0x080a832f in dglDrawBitmapStretchSR(TextureObject*, RectI const&, RectI const&, unsigned) (texture=0x40c16ef8,
dstRect=@0xbfffefc0, srcRect=@0xbfffef50, in_flip=0) at dgl/dgl.cc:108
#4 0x080a855a in dglDrawBitmapStretch(TextureObject*, RectI const&, unsigned) (texture=0x40c16ef8, dstRect=@0xbfffefc0,
in_flip=0) at dgl/dgl.cc:153
#5 0x080eb60e in GuiBitmapCtrl::onRender(Point2I, RectI const&) (this=0x40bf9c28, offset={x = 0, y = 0},
updateRect=@0xbffff0b0) at gui/guiBitmapCtrl.cc:138
#6 0x081041ff in GuiFadeinBitmapCtrl::onRender(Point2I, RectI const&) (this=0x40bf9c28, offset={x = 0, y = 0},
updateRect=@0xbffff0b0) at gui/guiFadeinBitmapCtrl.cc:55
#7 0x080f281f in GuiCanvas::renderFrame(bool) (this=0x40af0528, preRenderOnly=false) at gui/guiCanvas.cc:1102
#8 0x08134b36 in DemoGame::processTimeEvent(TimeEvent*) (this=0x846f664, event=0xbffff1f8) at game/main.cc:684
#9 0x08242906 in GameInterface::processEvent(Event*) (this=0x846f664, event=0xbffff1f8) at platform/gameInterface.cc:71
#10 0x08242a16 in GameInterface::postEvent(Event&) (this=0x846f664, event=@0xbffff1f8) at platform/gameInterface.cc:153
#11 0x08308e78 in TimeManager::process() () at platformX86UNIX/x86UNIXWindow.cc:833
#12 0x08134420 in DemoGame::main(int, char const**) (this=0x846f664, argc=1, argv=0x407172e8) at game/main.cc:480
#13 0x08309059 in main (argc=1, argv=0xbffff2c4) at platformX86UNIX/x86UNIXWindow.cc:886


Any ideas?
#3
02/21/2004 (1:32 pm)
Run the game with -console. It will still crash, but you should hopefully get some text messages from the game as well. Look for lines that look like this, and post those lines here:

OpenGL driver information:
  Vendor: NVIDIA Corporation
  Renderer: GeForce4 Ti 4200/AGP/SSE2
  Version: 1.4.0 NVIDIA 44.96
#4
02/22/2004 (10:19 am)
It was a wrong configured build-system. I didnt have a static version of libGLU so I simply linked libGLU.so statically, because normally this does work.

Thanks a lot for the help, sorry for nervnig.

PS: It seems Torque was worth all the money. I didnt have enough time to play with it, but a simply switch to Terrain-Editor during carracing said me, that this is the engine I searched forever for.