Page 1 of 1

1.2.4preview (Linux): crashes on ring planets

Posted: 29.03.2002, 12:41
by t00fri
Compilation of the Linux 1.2.4 preview version went without problems. However, whenever I approach either of the two ring planets (Saturn, Uranus), Celestia crashes. Does not happen in 1.2.2.

My setup: SUSE 7.3 (with all upgrades), kernel 2.4.18, gcc 2.95.3, XF86 4.2.0, Nvidia Geforce 2 GTS/32MB, latest NV-1.0-2802 drivers (OpenGL 1.3).

Fridger

1.2.4preview (Linux): crashes on ring planets

Posted: 29.03.2002, 16:55
by chris
t00fri wrote:Compilation of the Linux 1.2.4 preview version went without problems. However, whenever I approach either of the two ring planets (Saturn, Uranus), Celestia crashes. Does not happen in 1.2.2.

My setup: SUSE 7.3 (with all upgrades), kernel 2.4.18, gcc 2.95.3, XF86 4.2.0, Nvidia Geforce 2 GTS/32MB, latest NV-1.0-2802 drivers (OpenGL 1.3).

Fridger

If there's any possibility that you could build a debug version of Celestia and give me some more details about the crash, it would be incredibly helpful. I can't reproduce the problem on my Linux system (RedHat 7.1, GeForce3, gcc 2.96)

If not, you can try this modification. In src/celengine/render.cpp, look for this line:

Code: Select all

        glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB,
                      (GLint*) &nSimultaneousTextures);

Immediately after it, add the line:

Code: Select all

        nSimultaneousTextures = 1;

Recompile, run Celestia, and see if you can visit a ringed planet. The change will disable ring shadows, but may least keep Celestia from crashing. It will also provide me with some clue about what to do to fix the problem.

--Chris

Posted: 29.03.2002, 19:38
by Guest

nSimultaneousTextures = 1;

avoids the SEGFAULTS both for Saturn and Uranus. I had also run a debug version of Celestia 1.2.4 in my ddd debugger, but did not get anywhere yet, since the SEGFAULT appears to occur within a system lib that I do not have installed with debug info.

I shall try to narrow the bug further down ...

Fridger


Posted: 02.04.2002, 04:38
by Silh
Also reproduced with Mesa3.5/Software/Xfree 3.3.6/Linux 2.2.20/gcc 2.95.2:
(Couldn't get it to compile with Mesa 3.2.1/Utah-GLX ... will have to try Xfree 4 another time).

(gdb) run
Starting program: celestia
StarDatabase::read: nStars = 112521
Parent body 'BD -10 3166' of 'b' not found.
Warning duplicate definition of Iota Hor b!
Could not open font file fonts/sansbold20.txf
Loading texture: textures/medres/jupiter.jpg
Loading texture: textures/medres/io.jpg
Loading texture: textures/medres/saturn.jpg

Program received signal SIGSEGV, Segmentation fault.
0x8161408 in glActiveTextureARB ()
(gdb) bt
#0 0x8161408 in glActiveTextureARB ()
#1 0x80acf44 in renderRings (rings=@0x81f1bf0, ri=@0xbffff430, planetRadius=60330, textureResolution=1, renderShadow=true)
at render.cpp:1993
#2 0x80aeb48 in Renderer::renderObject (this=0x8165a80, pos={x = -1.9996748, y = 22236702, z = 2.53378391e+14},
distance=22236702, now=2452366.6828139131, cameraOrientation={w = -1.99966335, x = 11023931, y = 24614370, z = -1.99967623},
nearPlaneDistance=11023931, farPlaneDistance=24614370, sunDirection={x = -1.99967623, y = -NaN(0x7fffff), z = -1.99967766},
sunColor={static Black = {static Black = <same as static member of an already seen type>, static White = {
static Black = <same as static member of an already seen type>,
static White = <same as static member of an already seen type>, c = "????"}, c = "\000\000\000?"},
static White = <same as static member of an already seen type>, c = "????"}, obj=@0xbffff570) at render.cpp:2528
#3 0x80af55a in Renderer::renderPlanet (this=0x8165a80, body=@0x81f0aa8, pos=0xbffff75c, sunDirection={x = -1.99975252,
y = 22236702, z = -6.78817272}, distance=22236702, appMag=-6.78817272, now=2452366.6828139131, orientation=0xbffff6d4,
nearPlaneDistance=11023931, farPlaneDistance=24614370) at render.cpp:2726
#4 0x80aa982 in Renderer::render (this=0x8165a80, observer=@0x822a7f0, universe=@0x8195cb0, faintestMagNight=6, sel=@0x822a7e0,
now=2452366.6828139131) at render.cpp:1198
#5 0x80b477f in Simulation::render (this=0x822a7b8, renderer=@0x8165a80) at simulation.cpp:208
#6 0x8093247 in CelestiaCore::draw (this=0x8165908) at celestiacore.cpp:959
#7 0x8099b51 in Display () at glutmain.cpp:77
#8 0x8099b98 in Idle () at glutmain.cpp:89
#9 0x4007576a in idleWait () at glut_event.c:962
#10 0x40532a42 in __libc_start_main () from /lib/libc.so.6
(gdb)

Adding nSimultaneousTextures = 1; stops the crash.