Multiple light sources with multiple shadows crashes

Report bugs, bug fixes and workarounds here.
Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Multiple light sources with multiple shadows crashes

Post #1by selden » 01.09.2010, 18:03

This crash is seen in both Celestia v1.6.0 and when built from the most recent svn download (r5050)

The attached zip file contains an addon, with instructions, which demonstrates this problem. I have only tested it under Windows XP Pro, SP3, with the most recent patches.

It shows a moon orbiting around a planet in a multi-star system (Castor -- I don't claim that the stellar orbits are realistic, though.) When the moon reaches a particular position in its orbit, Celestia crashes.
Selden

Boux
Posts: 435
Joined: 25.08.2004
With us: 20 years 2 months
Location: Brittany, close to the Ocean

Re: Multiple light sources with multiple shadows crashes

Post #2by Boux » 02.09.2010, 15:26

I just gave it a go (build 5050).
- native Win32 --> instant crash
- Win Qt4 --> no crash
Possible suspect(s): Windows OpenGL Api and/or bug in Celestia code
Qt uses its own QtOpenGL4.dll interface which may explain why it is not crashing.
Selden I believe you are running an Nvidia graphic card.
I am running ATIs.
This would exclude both drivers then...
Intel core i7 3770 Ivy Bridge @ 4.4 GHz -16 GB ram - 128 GB SSD cache - AMD Radeon 7970 3 GB o'clocked - Windows 7 64 Ultimate / Linux Kubuntu

Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Multiple light sources with multiple shadows crashes

Post #3by selden » 02.09.2010, 15:58

Sorry, yes, the system with the crash does have an Nvidia card.

System specs:
2GB, 1.86 GHz Core2Duo E6300, 32bit WinXP Pro SP3
256MB, Nvidia Quadro NVS 290, ForceWare v191.78
Selden

Boux
Posts: 435
Joined: 25.08.2004
With us: 20 years 2 months
Location: Brittany, close to the Ocean

Re: Multiple light sources with multiple shadows crashes

Post #4by Boux » 02.09.2010, 16:20

Did you try the Qt version on your side?
Intel core i7 3770 Ivy Bridge @ 4.4 GHz -16 GB ram - 128 GB SSD cache - AMD Radeon 7970 3 GB o'clocked - Windows 7 64 Ultimate / Linux Kubuntu

Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Multiple light sources with multiple shadows crashes

Post #5by selden » 02.09.2010, 17:39

No, I didn't test it with the QT version. I don't have a working version of the Windows QT version of Celestia and really don't the time available that seems to be needed to get it to build from scratch.
Selden

Boux
Posts: 435
Joined: 25.08.2004
With us: 20 years 2 months
Location: Brittany, close to the Ocean

Re: Multiple light sources with multiple shadows crashes

Post #6by Boux » 02.09.2010, 19:06

The attached zip contains an SVN 5050 celestia-qt4 build with its associated dlls.
Just drop all the files in your Celestia installation directory.
http://www.quickfixcomm.com/Celestia/Celestia-Qt4-5050.zip
Intel core i7 3770 Ivy Bridge @ 4.4 GHz -16 GB ram - 128 GB SSD cache - AMD Radeon 7970 3 GB o'clocked - Windows 7 64 Ultimate / Linux Kubuntu

Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Multiple light sources with multiple shadows crashes

Post #7by selden » 02.09.2010, 19:31

Thanks!

The QT version doesn't crash on my system, either.

It has other issues, but I think they're irrelevant for this particular problem.
Selden

Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Multiple light sources with multiple shadows crashes

Post #8by selden » 03.09.2010, 10:37

Celestia v1.6.0 and r5050 also crash in this rather different configuration:

8GB, 1.6GHz, Core i7-720QM; 64bit Win7 Pro
512MB, Nvidia Quadro NVS 3100M; ForceWare v258.96

The Qt version does not.
Selden

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Multiple light sources with multiple shadows crashes

Post #9by John Van Vliet » 04.09.2010, 01:48

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 22:58, edited 1 time in total.

Boux
Posts: 435
Joined: 25.08.2004
With us: 20 years 2 months
Location: Brittany, close to the Ocean

Re: Multiple light sources with multiple shadows crashes

Post #10by Boux » 04.09.2010, 07:48

Nice shader error...

Code: Select all

Fragment shader source:
  1: #version 110
  2: uniform sampler2D diffTex;
  3: varying vec2 diffTexCoord;
  4: uniform vec3 ambientColor;
  5: uniform float opacity;
  6: vec4 diff = vec4(ambientColor, opacity);
  7: varying vec4 diffFactors;
  8: uniform vec3 lightcolor0;
  9: uniform vec3 lightcolor1;
 10: uniform vec3 lightcolor2;
 11: uniform vec3 lightcolor3;
 12: varying vec3 position_obj;
 13: uniform vec4 shadowTexGenS1_0;
 14: uniform vec4 shadowTexGenT1_0;
 15: uniform float shadowFalloff1_0;
 16: uniform float shadowMaxDepth1_0;
 17: uniform sampler2D cloudShadowTex;
 18: varying vec2 cloudShadowTexCoord0;
 19: varying vec2 cloudShadowTexCoord1;
 20: varying vec2 cloudShadowTexCoord2;
 21: varying vec2 cloudShadowTexCoord3;
 22:
 23: void main(void)
 24: {
 25: vec4 color;
 26: float shadow;
 27: shadow = diffFactors.x;
 28: shadow *= 1.000000-texture2D(cloudShadowTex, cloudShadowTexCoord0).a*0.750000;
 29: diff.rgb += shadow * lightcolor0;
 30: shadow = diffFactors.y;
 31: shadowCenter.s = dot(vec4(position_obj, 1.0), shadowTexGenS1_0) - 0.5;
 32: shadowCenter.t = dot(vec4(position_obj, 1.0), shadowTexGenT1_0) - 0.5;
 33: shadowR = clamp((2.0 * sqrt(dot(shadowCenter, shadowCenter)) - 1.0) * shadowFalloff1_0, 0.0, shadowMaxDepth1_0);
 34: shadow *= 1.0 - shadowR;
 35: diff.rgb += shadow * lightcolor1;
 36: shadow = diffFactors.z;
 37: diff.rgb += shadow * lightcolor2;
 38: shadow = diffFactors.w;
 39: diff.rgb += shadow * lightcolor3;
 40: color = texture2D(diffTex, diffTexCoord.st);
 41: gl_FragColor = color * diff;
 42: }

Error compiling fragment shader:
Fragment shader failed to compile with the following errors:
ERROR: 0:31: 'shadowCenter' : undeclared identifier
ERROR: 0:31: 's' :  field selection requires structure, vector, or matrix on left hand side
ERROR: 0:32: 't' :  field selection requires structure, vector, or matrix on left hand side
ERROR: 0:33: 'shadowR' : undeclared identifier
ERROR:  compilation errors.  No code generated.
Intel core i7 3770 Ivy Bridge @ 4.4 GHz -16 GB ram - 128 GB SSD cache - AMD Radeon 7970 3 GB o'clocked - Windows 7 64 Ultimate / Linux Kubuntu


Return to “Bugs”