Tutorial 3 Assets Problems with: rootNode.addLight(sun);

I get the following error dump (in JME3) when running this tutorial (copied unmodified from the tutorial). To try to locate the problem, I have deleted most of the code and added back parts at a time so now the teapot, wall and text appear, but on adding the last line rootNode.addLight(sun); the blank scree appears for three seconds and then the error occurs.

run:
Oct 22, 2013 4:30:06 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.0.2
Oct 22, 2013 4:30:06 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Lwjgl 2.9.0 context running on thread LWJGL Renderer Thread
Oct 22, 2013 4:30:06 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Adapter: nv4_disp
Oct 22, 2013 4:30:06 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Driver Version: 6.14.10.7743
Oct 22, 2013 4:30:06 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Vendor: NVIDIA Corporation
Oct 22, 2013 4:30:06 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: OpenGL Version: 2.0.0
Oct 22, 2013 4:30:06 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: Renderer: GeForce Go 6400/PCI/SSE2
Oct 22, 2013 4:30:06 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: GLSL Ver: 1.10 NVIDIA via Cg 1.3 compiler
Oct 22, 2013 4:30:07 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.blender.BlenderModelLoader
Oct 22, 2013 4:30:07 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio Device: OpenAL Soft
Oct 22, 2013 4:30:07 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio Vendor: OpenAL Community
Oct 22, 2013 4:30:07 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio Renderer: OpenAL Soft
Oct 22, 2013 4:30:07 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio Version: 1.1 ALSOFT 1.15.1
Oct 22, 2013 4:30:07 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: AudioRenderer supports 64 channels
Oct 22, 2013 4:30:07 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio effect extension version: 1.0
Oct 22, 2013 4:30:07 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio max auxilary sends: 4
Oct 22, 2013 4:30:08 PM com.jme3.renderer.lwjgl.LwjglRenderer updateShaderSourceData
WARNING: Bad compile of:
1 #define DIFFUSEMAP 1
2 #define MATERIAL_COLORS 1
3 #if (defined(PARALLAXMAP) || (defined(NORMALMAP_PARALLAX) && defined(NORMALMAP))) && !defined(VERTEX_LIGHTING)
4 vec2 steepParallaxOffset(sampler2D parallaxMap, vec3 vViewDir,vec2 texCoord,float parallaxScale){
5 vec2 vParallaxDirection = normalize( vViewDir.xy );
6
7 // The length of this vector determines the furthest amount of displacement: (Ati’s comment)
8 float fLength = length( vViewDir );
9 float fParallaxLength = sqrt( fLength * fLength - vViewDir.z * vViewDir.z ) / vViewDir.z;
.
(I deleted intervening lines)
.
.
// Interpolate light specularity toward reflection color
380 // Multiply result by specular map
381 specularColor = mix(SpecularSum2 * light.y, refColor, refVec.w) * specularColor;
382
383 SpecularSum2 = vec4(1.0);
384 light.y = 1.0;
385 #endif
386
387 gl_FragColor.rgb = AmbientSum * diffuseColor.rgb +
388 DiffuseSum.rgb * diffuseColor.rgb * vec3(light.x) +
389 SpecularSum2.rgb * specularColor.rgb * vec3(light.y);
390 #endif
391 gl_FragColor.a = alpha;
392 }

Oct 22, 2013 4:30:08 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment, language=GLSL100] error:(292) : error C0105: Syntax error in #if
(292) : error C0105: Syntax error in #if
(305) : error C0105: Syntax error in #if
(305) : error C0105: Syntax error in #if

at com.jme3.renderer.lwjgl.LwjglRenderer.updateShaderSourceData(LwjglRenderer.java:1018)
at com.jme3.renderer.lwjgl.LwjglRenderer.updateShaderData(LwjglRenderer.java:1041)
at com.jme3.renderer.lwjgl.LwjglRenderer.setShader(LwjglRenderer.java:1107)
at com.jme3.material.Material.renderMultipassLighting(Material.java:837)
at com.jme3.material.Material.render(Material.java:1107)
at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:523)
at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:322)
at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:374)
at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:763)
at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:719)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:983)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1029)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:252)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:185)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:228)
at java.lang.Thread.run(Thread.java:722)

BUILD SUCCESSFUL (total time: 12 seconds)

Any suggestions appreciated.

Dave

@Dave-Ellison said: (I deleted intervening lines)
well that too bad because errors seems to be on line 292 and 305, and are in the part you removed
@Dave-Ellison said: com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment, language=GLSL100] error:(292) : error C0105: Syntax error in #if (292) : error C0105: Syntax error in #if (305) : error C0105: Syntax error in #if (305) : error C0105: Syntax error in #if

Ooops, sorry, yes. I thought 300 odd lines were a bit long. Here they are:

#ifndef VERTEX_LIGHTING

290 float spotFallOff = 1.0;
291
292 #if VERSION >= 110
293 // allow use of control flow
294 if(g_LightDirection.w != 0.0){
295 #endif
296
297 vec3 L = normalize(lightVec.xyz);
298 vec3 spotdir = normalize(g_LightDirection.xyz);
299 float curAngleCos = dot(-L, spotdir);
300 float innerAngleCos = floor(g_LightDirection.w) * 0.001;
301 float outerAngleCos = fract(g_LightDirection.w);
302 float innerMinusOuter = innerAngleCos - outerAngleCos;
303 spotFallOff = (curAngleCos - outerAngleCos) / innerMinusOuter;
304
305 #if VERSION >= 110
306 if(spotFallOff <= 0.0){
307 gl_FragColor.rgb = AmbientSum * diffuseColor.rgb;
308 gl_FragColor.a = alpha;
309 return;
310 }else{
311 spotFallOff = clamp(spotFallOff, 0.0, 1.0);
312 }
313 }
314 #else
315 spotFallOff = clamp(spotFallOff, step(g_LightDirection.w, 0.001), 1.0);
316 #endif
317 #endif

Looks like your card doesn’t support the VERSION glsl macro…which is weird to be honest…
It seems to support opengl2.0 though.
Maybe try to update your drivers

The GLSL 1.10 specification (which this card claims to support based on the provided log) requires VERSION to be defined with constant 110. Looks like a non-compliant driver …