IllegalStateException: Function is not supported

Started by The_Terminator, July 02, 2010, 23:08:16

Previous topic - Next topic

The_Terminator

Hi,

I'm getting the following exceptions when trying to run my program in NetBeans, and I can't figure out what could be the cause:

Fri Jul 02 23:39:36 BST 2010 ERROR:Invalid operation (1282)
org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
        at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
        at org.lwjgl.opengl.GL11.glGetInteger(GL11.java:1441)
        at org.lwjgl.opengl.GLContext.getSupportedExtensions(GLContext.java:258)
        at org.lwjgl.opengl.ContextCapabilities.initAllStubs(ContextCapabilities.java:4355)
        at org.lwjgl.opengl.ContextCapabilities.<init>(ContextCapabilities.java:4661)
        at org.lwjgl.opengl.GLContext.useContext(GLContext.java:352)
        at org.lwjgl.opengl.Context.makeCurrent(Context.java:183)
        at org.lwjgl.opengl.Display.makeCurrent(Display.java:730)
        at org.lwjgl.opengl.Display.makeCurrentAndSetSwapInterval(Display.java:896)
        at org.lwjgl.opengl.Display.create(Display.java:860)
        at org.lwjgl.opengl.Display.create(Display.java:784)
        at org.newdawn.slick.AppGameContainer.tryCreateDisplay(AppGameContainer.java:299)
        at org.newdawn.slick.AppGameContainer.access$000(AppGameContainer.java:34)
        at org.newdawn.slick.AppGameContainer$2.run(AppGameContainer.java:364)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:345)
        at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
        at proceduralgame.Main.main(Main.java:69)
Fri Jul 02 23:39:36 BST 2010 INFO:Starting display 1280x1024
Exception in thread "main" java.lang.IllegalStateException: Function is not supported
        at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:64)
        at org.lwjgl.opengl.GL11.glEnable(GL11.java:1047)
        at org.newdawn.slick.opengl.renderer.ImmediateModeOGLRenderer.initDisplay(ImmediateModeOGLRenderer.java:34)
        at org.newdawn.slick.GameContainer.initGL(GameContainer.java:723)
        at org.newdawn.slick.GameContainer.initSystem(GameContainer.java:748)
        at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:378)
        at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
        at proceduralgame.Main.main(Main.java:69)


I'm using Slick to create my game, and I've had it working in the past. Recently I reorganised my game's file structure, which involved moving the libraries around a bit, and ever since then, I haven't been able to get it to work (though all the paths etc are correct). I'm using NetBeans 6.8, on Windows 7 x64.

Looking through Slick's source code, the OpenGLException occurs when it calls Display.create. Does anyone have any suggestions for what might be causing it?

kappa

which graphics card are you using and which version of lwjgl do you have?

The_Terminator

I have an ATI HD4890, with the 9.12 drivers (I should really update at some point). That hasn't changed since before LWJGL was last working though.

I'm using LWJGL 2.4, and I also recompiled Slick with that version instead of the 2.3 it normally comes with.

The_Terminator

Found out what the problem was, and as always, it's embarrasingly simple: I was loading both lwjgl.jar and lwjgl-debug.jar at the same time. I thought the debug package was simply a set of extra debugging tools to use on top of the main library, turns out that was a flawed assumption. Everything seems to be working perfectly now anyway.