[SOLVED] SEVERE: Failed to create display org.lwjgl.LWJGLException: Could not create context (WGL_AR

I have an unexpected and unexplained problem… I get the following exception when I try to make a standard Main class run even when a new project is created!



Sep 26, 2011 8:14:57 PM com.jme3.system.JmeSystem initialize

INFO: Running on jMonkey Engine 3 Alpha 0.6

Sep 26, 2011 8:14:57 PM com.jme3.system.Natives extractNativeLibs

INFO: Extraction Directory #1: file:/C:/Program%20Files/jmonkeyplatform/jmonkeyplatform/libs/

Sep 26, 2011 8:14:57 PM com.jme3.system.Natives extractNativeLibs

INFO: Extraction Directory #2: C:UsersJoanDocumentsjMonkeyProjectsfdshgf

Sep 26, 2011 8:14:57 PM com.jme3.system.Natives extractNativeLibs

INFO: Extraction Directory #3: C:UsersJoanDocumentsjMonkeyProjectsfdshgf

Sep 26, 2011 8:14:57 PM com.jme3.system.lwjgl.LwjglAbstractDisplay run

INFO: Using LWJGL 2.7.1

Sep 26, 2011 8:14:57 PM com.jme3.system.lwjgl.LwjglDisplay createContext

INFO: Selected display mode: 640 x 480 x 0 @0Hz

Sep 26, 2011 8:14:58 PM com.jme3.app.Application handleError

SEVERE: Failed to create display

org.lwjgl.LWJGLException: Could not create context (WGL_ARB_create_context)

at org.lwjgl.opengl.WindowsContextImplementation.nCreate(Native Method)

at org.lwjgl.opengl.WindowsContextImplementation.create(WindowsContextImplementation.java:50)

at org.lwjgl.opengl.Context.(Context.java:131)

at org.lwjgl.opengl.Display.create(Display.java:859)

at org.lwjgl.opengl.Display.create(Display.java:825)

at com.jme3.system.lwjgl.LwjglDisplay.createContext(LwjglDisplay.java:132)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:100)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:206)

at java.lang.Thread.run(Thread.java:722)



Sep 26, 2011 8:14:58 PM com.jme3.app.Application handleError

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]

java.lang.IllegalStateException: Cannot determine close requested state of uncreated window

at org.lwjgl.opengl.Display.isCloseRequested(Display.java:583)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:208)

at java.lang.Thread.run(Thread.java:722)



Two days ago everything worked properly, but yesterday this problem appeared and from then and on nothing runs… I use Windows 7 32-bit OS and the NVIDIA GeForce 9600 GT graphics card. Any help would be really appreciated!

Do you pop up the settings dialog for the user to select their settings or do you set them manually?

I actually use the pop up settings menu for the user to select… after the user selects, it crushes and cannot create the display.

Ok… I’ve never really paid much attention to the logs before but this looked odd to me:

INFO: Selected display mode: 640 x 480 x 0 @0Hz



What settings did you select in the dialog and does setting different ones change the outcome at all?

The standard one (640x480, 24bpp, n/a, disabled, the rest two unchecked) but even if I change it, the outcome is the same (not influenced) for all settings.

have you installed latest graphics drivers?

I updated the drivers but I still face problems. Now the display window stays and doesn’t crash but nothing is displayed on the screen and I get this as output:



run-single:

Sep 27, 2011 8:53:26 PM com.jme3.system.JmeSystem initialize

INFO: Running on jMonkey Engine 3 Alpha 0.6

Sep 27, 2011 8:53:26 PM com.jme3.system.Natives extractNativeLibs

INFO: Extraction Directory #1: file:/C:/Program%20Files/jmonkeyplatform/jmonkeyplatform/libs/

Sep 27, 2011 8:53:26 PM com.jme3.system.Natives extractNativeLibs

INFO: Extraction Directory #2: C:UsersJoanDocumentsjMonkeyProjectsfdshgf

Sep 27, 2011 8:53:26 PM com.jme3.system.Natives extractNativeLibs

INFO: Extraction Directory #3: C:UsersJoanDocumentsjMonkeyProjectsfdshgf

Sep 27, 2011 8:53:26 PM com.jme3.system.lwjgl.LwjglAbstractDisplay run

INFO: Using LWJGL 2.7.1

Sep 27, 2011 8:53:26 PM com.jme3.system.lwjgl.LwjglDisplay createContext

INFO: Selected display mode: 640 x 480 x 0 @0Hz

Sep 27, 2011 8:53:27 PM com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

INFO: Display created.

Sep 27, 2011 8:53:27 PM com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

INFO: Adapter: nvd3dum

Sep 27, 2011 8:53:27 PM com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

INFO: Driver Version: 8.17.12.8026

Sep 27, 2011 8:53:27 PM com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

INFO: Vendor: NVIDIA Corporation

Sep 27, 2011 8:53:27 PM com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

INFO: OpenGL Version: 3.3.0

Sep 27, 2011 8:53:27 PM com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

INFO: Renderer: GeForce 9600M GT/PCI/SSE2

Sep 27, 2011 8:53:27 PM com.jme3.system.lwjgl.LwjglAbstractDisplay initInThread

INFO: GLSL Ver: 3.30 NVIDIA via Cg compiler

Sep 27, 2011 8:53:27 PM com.jme3.system.lwjgl.LwjglTimer

INFO: Timer resolution: 1000 ticks per second

Sep 27, 2011 8:53:27 PM com.jme3.renderer.lwjgl.LwjglRenderer initialize

INFO: Caps: [FrameBuffer, FrameBufferMRT, FrameBufferMultisample, TextureMultisample, OpenGL20, OpenGL21, OpenGL30, OpenGL31, OpenGL32, ARBprogram, GLSL100, GLSL110, GLSL120, GLSL130, GLSL140, GLSL150, VertexTextureFetch, TextureArray, TextureBuffer, FloatTexture, FloatColorBuffer, FloatDepthBuffer, PackedFloatTexture, SharedExponentTexture, PackedFloatColorBuffer, TextureCompressionLATC, MeshInstancing, VertexBufferArray]

Sep 27, 2011 8:53:27 PM com.jme3.asset.DesktopAssetManager

INFO: DesktopAssetManager created.

Sep 27, 2011 8:53:27 PM com.jme3.renderer.Camera

INFO: Camera created (W: 640, H: 480)

Sep 27, 2011 8:53:27 PM com.jme3.renderer.Camera

INFO: Camera created (W: 640, H: 480)

Sep 27, 2011 8:53:27 PM com.jme3.input.lwjgl.LwjglMouseInput initialize

INFO: Mouse created.

Sep 27, 2011 8:53:27 PM com.jme3.input.lwjgl.LwjglKeyInput initialize

INFO: Keyboard created.

Sep 27, 2011 8:53:27 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread

INFO: AudioRenderer supports 64 channels

Sep 27, 2011 8:53:27 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread

INFO: Audio effect extension version: 1.0

Sep 27, 2011 8:53:27 PM com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread

INFO: Audio max auxilary sends: 1

Sep 27, 2011 8:53:27 PM com.jme3.material.MaterialDef

INFO: Loaded material definition: Unshaded

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Gui Node)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (BitmapFont) attached to this node (null)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (null) attached to this node (Statistics View)

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (Statistics View) attached to this node (Gui Node)

Sep 27, 2011 8:53:27 PM com.jme3.material.MaterialDef

INFO: Loaded material definition: Solid Color

Sep 27, 2011 8:53:27 PM com.jme3.material.Material checkSetParam

WARNING: Material parameter m_Color uses a deprecated naming convention use Color instead

Sep 27, 2011 8:53:27 PM com.jme3.scene.Node attachChild

INFO: Child (Box) attached to this node (Root Node)

Sep 27, 2011 8:53:27 PM com.jme3.renderer.lwjgl.LwjglRenderer updateUniformLocation

INFO: Uniform m_VertexColor is not declared in shader.

Sep 27, 2011 8:54:05 PM com.jme3.input.lwjgl.LwjglMouseInput destroy

INFO: Mouse destroyed.

Sep 27, 2011 8:54:05 PM com.jme3.input.lwjgl.LwjglKeyInput destroy

INFO: Keyboard destroyed.

Sep 27, 2011 8:54:05 PM com.jme3.system.lwjgl.LwjglAbstractDisplay deinitInThread

INFO: Display destroyed.

BUILD SUCCESSFUL (total time: 43 seconds)







for the standard main of the Basic Project:



package mygame;



import com.jme3.app.SimpleApplication;

import com.jme3.material.Material;

import com.jme3.math.ColorRGBA;

import com.jme3.math.Vector3f;

import com.jme3.renderer.RenderManager;

import com.jme3.scene.Geometry;

import com.jme3.scene.shape.Box;



/**

  • test
  • @author normenhansen

    */

    public class Main extends SimpleApplication {



    public static void main(String[] args) {

    Main app = new Main();

    app.start();

    }



    @Override

    public void simpleInitApp() {

    Box b = new Box(Vector3f.ZERO, 1, 1, 1);

    Geometry geom = new Geometry(“Box”, b);

    geom.updateModelBound();



    Material mat = new Material(assetManager, “Common/MatDefs/Misc/SolidColor.j3md”);

    mat.setColor(“m_Color”, ColorRGBA.Blue);

    geom.setMaterial(mat);



    rootNode.attachChild(geom);

    }



    @Override

    public void simpleUpdate(float tpf) {

    //TODO: add update code

    }



    @Override

    public void simpleRender(RenderManager rm) {

    //TODO: add render code

    }

    }

That code looks a bit old. SolidColor is now deprecated, and not sure if it even still works. You also shouldn’t need the updateModelBound() either.

Replace your code with this and see if it works.



[java]

package mygame;



import com.jme3.app.SimpleApplication;

import com.jme3.material.Material;

import com.jme3.math.ColorRGBA;

import com.jme3.math.Vector3f;

import com.jme3.scene.Geometry;

import com.jme3.scene.shape.Box;



public class Main extends SimpleApplication {



public static void main(String[] args) {

Main app = new Main();

app.start();

}



@Override

public void simpleInitApp() {

Box b = new Box(Vector3f.ZERO, 1, 1, 1);

Geometry geom = new Geometry(“Box”, b);



Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);

mat.setColor(“Color”, ColorRGBA.Blue);

geom.setMaterial(mat);



rootNode.attachChild(geom);

}

} [/java]



replace the quote marks, they don’t seem to work properly inside java tags now :s

Thanks for the response. After running your code (also replacing &quot with ") I still get the same output and the same result (empty window display), so I don’t think that the code is the problem here… I believe that is something relevant to my graphics card and jmonkey3 opengl stuff but I haven’t located where the problem lies yet…

I have already installed and uninstalled the platform about 4-5 times and made different configurations such as download the Nightly updates, or the standard updates, or not updating after installation and in all cases I still face the problem with the display window. And I have to underline that everything was working properly till Sunday…

SolidColor.j3md is definitely deprecated and could cause all kinds of issues.

not sure, you may have updated something which interfered, idk. Try uninstalling jmp again, and make sure to delete the settings folder when it asks you. To be sure make sure this folder doesn’t exist: documents/.appdata/local/.jmonkeyengine (i think thats the correct path for windows, “appdata” is hidden by default). If “.jmonkeyengine” exists delete it, and then reinstall jmp and update accordingly.

Unfortunately, still after making sure that everything is uninstalled and deleted, after installing again the same problem appears…

I know it will be painful (from experience) but if you build from SVN then you might be able to step back in revisions until you figure out what change causes things to break. Given the timeline you say I’m guessing you shouldn’t have to go back very far.



…I once stepped one at a time through two months worth of revisions hunting for something. So I understand the pain. :slight_smile:

Since you apparently were using the stable jME SDK build (Alpha-4) and not the nightly, theres really nothing that could have changed in jme or the SDK in the time you mentioned. It must be something on your machine…

I solved the problem “the hardcore way”! I just restored my laptop to the last configuration before the weird behavior… and works as it should! :smiley:

Glad you got it working, I guess Microsoft knows why they add such an option to their OS xD

hahahah!! nice one! :stuck_out_tongue: thank you all for your responses

windows > dirt > mac

You mean complexity? Yeah, definitely :stuck_out_tongue: I was sick configuring computers instead of using them before I switched ^^