Page 1 of 1

C. v1.4.0pre5: extremely dim AbsMag exits

Posted: 09.11.2004, 12:15
by selden
Problem:

If one selects a Star which has an extremely dim AbsMag, Celestia v1.4.0pre5 exits immediately with no error messages of any kind, not even a math error of some kind (which presumably is what is happening).

It should set the star's brightness to a minimum value and continue.

e.g. If DIM.STC contains

Code: Select all

Star "Dim" {
   RA 2.0
   Dec 2.0
   Distance 20.0
   SpectralType "G"
   AbsMag 100.0
}

and one runs Celestia with the command
./celestia --verbose >error.log
and types the command
<return>dim<return>
Celestia exits immediatly. error.log contains

Code: Select all

Error getting joystick caps.
Initializing ARB vertex programs . . .
Loading ARB vertex program: shaders/diffuse_arb.vp
Loading ARB vertex program: shaders/specular_arb.vp
Loading ARB vertex program: shaders/haze_arb.vp
Loading ARB vertex program: shaders/bumpdiffuse_arb.vp
Loading ARB vertex program: shaders/bumphaze_arb.vp
Loading ARB vertex program: shaders/shadowtex_arb.vp
Loading ARB vertex program: shaders/diffuse_texoff_arb.vp
Loading ARB vertex program: shaders/rings_arb.vp
Loading ARB vertex program: shaders/ringshadow_arb.vp
Loading ARB vertex program: shaders/night_arb.vp
Loading ARB vertex program: shaders/glossmap_arb.vp
Loading ARB vertex program: shaders/diffuse2_arb.vp
Loading ARB vertex program: shaders/haze2_arb.vp
Loading ARB vertex program: shaders/diffuse_texoff2_arb.vp
Loading ARB vertex program: shaders/specular2_arb.vp
Loading ARB vertex program: shaders/night2_arb.vp
Loading ARB vertex program: shaders/multishadow_arb.vp
Loading ARB vertex program: shaders/texphong_arb.vp
Loading ARB vertex program: shaders/texphong_alpha_arb.vp
All ARB vertex programs loaded successfully.
Initializing NV fragment programs . . .
Loading NV fragment program: shaders/shadow_on_rings_nv.fp
Loading NV fragment program: shaders/eclipse1_nv.fp
Loading NV fragment program: shaders/eclipse2_nv.fp
Loading NV fragment program: shaders/diffuse_nv.fp
Loading NV fragment program: shaders/bumpdiffuse_nv.fp
Loading NV fragment program: shaders/texphong_nv.fp
Loading NV fragment program: shaders/texphong_alpha_nv.fp
All NV fragment programs loaded successfully.
render path: 5

Posted: 09.11.2004, 14:00
by symaski62
selden :oops:

Code: Select all

Star "Dim" {
   RA 2.0
   Dec 2.0
   Distance 20.0
   SpectralType "G"
   AbsMag 87   # (88 ? 100   ERREUR )
}


:wink: selden

Posted: 12.11.2004, 07:45
by chris
I checked a fix for this bug into CVS. There was a buffer overflow when Celestia printed very small values. Celestia doesn't use scientific notation for the luminosity, and values like 0.000000000000000000001 would overflow the small, fixed-size buffer. Stupid bug.

--Chris

Posted: 12.11.2004, 12:00
by selden
Thanks!