System Halt (jmetest and HelloWorld)

My system (Compaq Evo N800w) halts when I run almost every test. The graphics drivers are the most recent. I am running Windows 2000. Java version 1.5.0_01. I checked the jME source that I am using out of cvs. Both jme and jmetest build fine. I am using the LWJGL that was included in that checkout.



The only test that I have been successful in running is the jmetest.render.TestBoxColor. This works both off of Java Web Start and the code I compiled on my machine.



The tests that fail either produce a completely black screen and halt the system or they produce a window with a title, grab the mouse cursor, and then halt the system.



Tests that have failed:

jmetest.renderer.TestCylinder

jmetest.renderer.state.TestLightState

jmetest.renderer.TestScenegraph



I also tried creating the HelloWorld application, this locks up the system as well.



I had surmised that the props_dialog was causing this trouble, but after removing it from the HelloWorld code it still halts the system.



Any help would be greatly appreciated.

Did you try disabling the lightstate in hello world and it still crashes? If so, then I must be wrong about lights…



Also, did you try enabling the options dialog in the TestBoxColor demo? If it crashed when you did that, I wonder if it is because NOT enabling it forces the use of default values… maybe once it is enabled, the values it uses from the dialog don’t jive well. (maybe the defaults don’t come up as an option or something…)

NEVER_SHOW_PROPS_DIALOG or ALWAYS_SHOW_PROPS_DIALOG makes no difference in TestBoxColor.



lightState.setEnabled(false); when put in HelloWorld does not prevent the halt.

I was able to execute that LWJGL code without a problem (after defining buffer).



I also tried detaching all of the lights from the lightState in HelloWorld. It still crashed.

I’m at a loss, I went through the LWJGLLightState code and there is nothing there out of the ordinary. All GL calls are 1.1 compliant (every card would support).



what is really strange is you said you detached all lights. In the code there is:



if (quantity > 0 && isEnabled())



so detaching all lights is the same as setEnabled(false). Which is the state the color box test is in when it starts.

So when you see and select prefs on the option box for TestBoxColors, it still works fine?



Hmm, I really don’t know then. The only other thing I can think of is to take the source code for TestBoxColor and slowly change it to match the HelloWorld example. When does it break?

Sure, but we do a lot more with lighting than simply enabling LIGHT0… If hitting L kills the demo then it definitely seems like some component of lighting is the culprit on your machine. If you wanted to troubleshoot further, I’d recommend making some changes to LWJGLLightState… or testing those same calls with your LWJGL code. The SimpleGame apps use one PointLight. The LWJGL calls we make for a basic point light (without any fancy settings on the state) are:


GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_LIGHT0);
int index = GL11.GL_LIGHT0;
GL11.glLight(index, GL11.GL_AMBIENT, buffer);
GL11.glLight(index, GL11.GL_DIFFUSE, buffer);
GL11.glLight(index, GL11.GL_SPECULAR, buffer);
GL11.glLightf(index, GL11.GL_CONSTANT_ATTENUATION, 1.0f);
GL11.glLightf(index, GL11.GL_LINEAR_ATTENUATION, 0.0f);
GL11.glLightf(index, GL11.GL_QUADRATIC_ATTENUATION, 0.0f);
GL11.glLight(index, GL11.GL_POSITION, buffer);
GL11.glLightf(index, GL11.GL_SPOT_CUTOFF, 180.0f);
GL11.glLight(index, GL11.GL_SPOT_DIRECTION, buffer); // 0,0,-1
GL11.glLightf(index, GL11.GL_SPOT_EXPONENT, 0.0f);

GL11.glLightModel(GL11.GL_LIGHT_MODEL_AMBIENT, buffer);



can you try doing something similar in pure lwjgl?

I hit the ‘l’ button and the TestBoxColor stopped.



In my LWJGL test code I have enabled both GL_LIGHTING and GL_LIGHT0. This runs fine.

The only special think I can think of about the color box test is that it has lighting turned off and it doesn’t show the props box by default.



It sounds like you get past the properties dialog before it bombs… is that true? Make sure you select something low, like 640x480 and NOT fullscreen as that should be the easiest on your hardware.



Try these tests:

    * run TestBoxColor and hit 'L' (lower cose though) to turn ON the lights (off by default.) You should see a grey cube with the monkey logo on it. If it crashes though, your culprit is probably lighting.
    * change the source code of TestBoxColor so that in main it says ALWAYS_SHOW_PROPS_DIALOG instead of NEVER_SHOW_PROPS_DIALOG. When you run it next, the props dialog will show. Does it bomb?
    * Try other monitor refresh rates and bit depths. One setting to try would be to match the settings currently used by windows and use full screen... so if windows is running 800x600 with colors at 16 bits and the monitor at 60Hz, you follow suit and also use full screen.[/list:u]

    Depending on how those run, it may give some clues as to what's up.

Yep, it takes a hard reboot to get it back.



I can run some of the demos. The GLGears works fine. Some fail Web Start.



I have also done a moving sphere under their framework and that is fine (if very slow).



The DisplayTest ends up with my system looking really weird… the title bars don’t have a gradient; they have 4 blocks of color from black to white. It takes a restart to fix.



The graphics hardware:

Adaptor string: MOBILITY FIRE GL 9000

Chip: Mobility Radeon 900 (LF)

Wow, you mean it halts the system such that you have to reset? Have you tried running the pure LWJGL demos? http://www.lwjgl.org/demos.php Just to get an idea if it is something we are doing, or something they are doing.



What really confuses me is that color box does work, while everything else doesn’t.



What graphics device is in that laptop?

I remember having issues with mobility radeon in my old laptop. The drivers from ati where unstable and most problems where solved only when i installed the updated drivers for my notebook from compaq's site. The system halted and during dvd playback. In general my memories from laptop's graphic chipset are not the best in the world since there are many drivers issues and the general drivers from NVIDIA and ATI never seem to work on these!

If you want the latest drivers to work on your laptop for nVidia or Ati, http://www.omegadrivers.net/



If you have an Ati card and want to update the drivers yourself (or run 64 bit windows on your laptop): http://www.driverheaven.net/patje/

Another big up to http://www.omegadrivers.net/ stopped my Radeon9700 (non pro) from blue screening XP for some custom JME code.



tis an amazing forum for an amazing project - keep up the good work :slight_smile: