Crash when alt-tabbing back to windows

I’ve had a bug report from a tester that I can’t reproduce. When running full screen on his laptop if he alt-tabs back to windows the game crashes.

He’s sent in two crash reports:

System Details OsName:Windows 7 OsArchitecture: x86 OsVersion: 6.1 JavaVersion: 1.6.0_35 JavaVender: Sun Microsystems Inc. DisplayAdaptor: igdumd64 DisplayVersion: null Vendor:Intel OpenGLVersion: 3.1.0 - Build 9.17.10.2867 Renderer:Intel(R) HD Graphics 3000 Gfx Capabilities: FrameBuffer FrameBufferMRT FrameBufferMultisample OpenGL20 OpenGL21 OpenGL30 OpenGL31 ARBprogram GLSL100 GLSL110 GLSL120 GLSL130 GLSL140 VertexTextureFetch TextureArray FloatTexture FloatColorBuffer FloatDepthBuffer PackedFloatTexture SharedExponentTexture PackedFloatColorBuffer NonPowerOfTwoTextures MeshInstancing VertexBufferArray Multisample PackedDepthStencilBuffer ErrMsg: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main] Exception: java.lang.IllegalStateException: Display not created at org.lwjgl.opengl.Display.processMessages(Display.java:595) at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:181) 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(Unknown Source)

And from the same user, a slightly different exception:

System Details OsName:Windows 7 OsArchitecture: x86 OsVersion: 6.1 JavaVersion: 1.6.0_35 JavaVender: Sun Microsystems Inc. DisplayAdaptor: igdumd64 DisplayVersion: null Vendor:Intel OpenGLVersion: 3.1.0 - Build 9.17.10.2867 Renderer:Intel(R) HD Graphics 3000 Gfx Capabilities: FrameBuffer FrameBufferMRT FrameBufferMultisample OpenGL20 OpenGL21 OpenGL30 OpenGL31 ARBprogram GLSL100 GLSL110 GLSL120 GLSL130 GLSL140 VertexTextureFetch TextureArray FloatTexture FloatColorBuffer FloatDepthBuffer PackedFloatTexture SharedExponentTexture PackedFloatColorBuffer NonPowerOfTwoTextures MeshInstancing VertexBufferArray Multisample PackedDepthStencilBuffer ErrMsg: Error while swapping buffers Exception: java.lang.IllegalStateException: Display not created at org.lwjgl.opengl.Display.update(Display.java:638) at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:162) 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(Unknown Source)

Any thoughts?

Thanks,
Z

Can’t say much about that one - “Display not created” sounds like the display wasn’t created yet, but if he’s alt-tabbing to windows, presumably the game already started.
Is he running in windowed or in fullscreen mode? In windows mode, maybe somehow the window gets disposed, destroying the display. I guess that could trigger that “Display not create” exception as well.

Does jme3 have logging for Display creation and destruction? That would give you a hint what code paths might be killing the Display (or creating too late).

If there is no logging, bytecode enhancement can add log statements at class load time.
Executive summary is on http://stackoverflow.com/questions/8493056/java-byte-code-injection .
(Warning: I haven’t used that myself, I found it easier to explicitly add log statements :slight_smile: )

He’s US timezone so I can’t get more feedback yet :slight_smile: He said he was running in fullscreen mode and it happened when he alt tabbed out but other than that I don’t have many details so far.

Ok, I’ve just been talking with the tester in question. There has been another case where it has happened and while the previous ones have all been on an alt tab this one just happened in the middle of playing. At the time the game had been up and running for at least a couple of hours. I asked him to check the logs and there was another exception just before the one that we have seen before:

Jan 25, 2013 10:54:45 PM net.herodex.client.main.Main handleError SEVERE: Unhandled error An OpenGL error has occured! org.lwjgl.opengl.OpenGLException: Invalid framebuffer operation (1286) at org.lwjgl.opengl.Util.checkGLError(Util.java:59) at com.jme3.system.lwjgl.LwjglAbstractDisplay.checkGLError(LwjglAbstractDisplay.java:136) at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:157) 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(Unknown Source) Jan 25, 2013 10:54:46 PM net.herodex.client.main.Main handleError SEVERE: Unhandled error Error while swapping buffers java.lang.IllegalStateException: Display not created at org.lwjgl.opengl.Display.update(Display.java:638) at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:162) 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(Unknown Source) Jan 25, 2013 10:54:46 PM net.herodex.client.main.Main handleError SEVERE: Unhandled error Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main] java.lang.IllegalStateException: Display not created at org.lwjgl.opengl.Display.processMessages(Display.java:595) at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:181) 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(Unknown Source)

Every other case has been when alt-tabbing, this is the first one while the game is running usually.

Every case has been on this same hardware, always when in full-screen mode.

The alt-tab crash is repeatable. Every time he tabs out it crashes. He’s going to try the jme demo later and see if he gets the same crash.

I asked him to turn shadows off and try and it fixed the crash. - Shadows off, tab 6 times no problems. Shadows Standard, crashed 3 times in a row.

Shadow settings are:
[java] dlsRenderer = new DirectionalLightShadowRenderer(AppContext.getJme3().getAssetManager(), 1024, 1);
dlsRenderer.setLight(sun);
dlsRenderer.setLambda(0.55f);
dlsRenderer.setShadowIntensity(0.4f);
dlsRenderer.setShadowCompareMode(CompareMode.Software);
dlsRenderer.setEdgeFilteringMode(EdgeFilteringMode.PCFPOISSON);

            AppContext.getJme3().getViewPort().addProcessor(dlsRenderer);

[/java]

This is most likely the issue:

Renderer:Intel(R) HD Graphics 3000

I’m sure it’s not helping, but still I’d like to stop it crashing :wink:

It’s fine on his main computer, crashes on his laptop…

if( rendererVendor.indexOf( “Intel”) >= 0 ) turn off shadows;

:slight_smile:

@zarch said: I'm sure it's not helping, but still I'd like to stop it crashing ;)

It’s fine on his main computer, crashes on his laptop…

Buy your beta tester a new laptop? :wink:

Seriously though, any possibility his video drivers are not up to date? Maybe a revert or downgrade could help. Since you’re having that problem from seemingly only 1 user, odds are it’s his setup and nothing is wrong with HeroDex.

Some things can’t be helped.

Yeah, well at least I know to recommend turning off shadows if other people report it :smiley:

He’s going to check his driver versions.