Ubuntu 9.04 | java.lang.IllegalStateException: Function is not supported

Started by lainmaster, September 30, 2009, 14:03:13

Previous topic - Next topic

lainmaster

I get the following output when running my game on Ubuntu. It runs perfecly fine in Windows XP.

run:
Xrandr extension version 1.3
Using Xrandr for display mode switching
XF86VidMode extension version 2.2
Initial mode: 1280 x 1024 x 24 @50Hz
Pixel format info: r = 8, g = 8, b = 8, a = 0, depth = 24, stencil = 0, sample buffers = 0, samples = 0
java.lang.IllegalStateException: Function is not supported
        at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:64)
        at org.lwjgl.opengl.GL11.glGetError(GL11.java:1360)
        at org.lwjgl.opengl.Util.checkGLError(Util.java:52)
        at org.lwjgl.opengl.GL11.glGetString(GL11.java:1795)
        at org.lwjgl.opengl.GLContext.getSupportedExtensions(GLContext.java:185)
        at org.lwjgl.opengl.ContextCapabilities.initAllStubs(ContextCapabilities.java:3438)
        at org.lwjgl.opengl.ContextCapabilities.<init>(ContextCapabilities.java:3684)
        at org.lwjgl.opengl.GLContext.useContext(GLContext.java:328)
        at org.lwjgl.opengl.Context.makeCurrent(Context.java:183)
        at org.lwjgl.opengl.Display.makeCurrent(Display.java:713)
        at org.lwjgl.opengl.Display.makeCurrentAndSetSwapInterval(Display.java:865)
        at org.lwjgl.opengl.Display.create(Display.java:843)
        at org.lwjgl.opengl.Display.create(Display.java:767)
        at org.lwjgl.opengl.Display.create(Display.java:748)
        at ecl.client.Main.initializeGears(Main.java:270)
        at ecl.client.Main.run(Main.java:138)
        at java.lang.Thread.run(Thread.java:636)
Exception in thread "Thread-0" java.lang.IllegalStateException: Function is not supported
        at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:64)
        at org.lwjgl.opengl.GL11.glEnable(GL11.java:1031)
        at ecl.client.Main.initializeGears(Main.java:276)
        at ecl.client.Main.run(Main.java:138)
        at java.lang.Thread.run(Thread.java:636)
Mode 0: 1280x1024 @50
java: ../../src/xcb_io.c:445: _XReply: Assertion `!dpy->xcb->reply_data' failed.
Java Result: 134
BUILD SUCCESSFUL (total time: 1 second)


I just noticed Ubuntu is set to use 24bpp for the screen, and won't allow me to chose 32. In XP, I had 32. Might that be the reason? I just read that Ubuntu's 24 bit depth is equal to Window's 32...

By the way, the line that actually generates the error is:

Display.create();


No GL methods are called before that line, actually, no lwjgl methods at all, except for the Display ones.

static public final String WINDOW_TITLE = "Ex Calce Liberatus Online";
static public final int SCREEN_WIDTH = 640;
static public final int SCREEN_HEIGHT = 480;
private boolean _bFullscreen = false;

...

	public void initializeGears(){
		try {
			Display.setTitle(WINDOW_TITLE);
			setDisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT, _bFullscreen);
			Display.create();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		...
	}
	private void setDisplayMode(int iWidth, int iHeight, boolean bFullscreen) throws Exception{
		if(!bFullscreen){
			Display.setDisplayMode(new DisplayMode(iWidth, iHeight));
		}else{
			Display.setFullscreen(true);
			try{
				DisplayMode dm[] = org.lwjgl.util.Display.getAvailableDisplayModes(320, 240, -1, -1, -1, -1, 60, 85);
				org.lwjgl.util.Display.setDisplayMode(dm, new String[]{
							"width=" + iWidth, "height=" + iHeight, "freq=85",
							"bpp=" + Display.getDisplayMode().getBitsPerPixel()
						});
			} catch(Exception e){
				Sys.alert("Error", "Could not start full screen, switching to windowed mode");
				Display.setDisplayMode(new DisplayMode(iWidth, iHeight));
			}
		}
	}

Ciardhubh

Are you using an older nightly build of 2.2.0 on Linux? This looks like a bug that was fixed recently.

lainmaster

That's right, I'm using a one or two months 2.2 lwjgl nightly build. I'll try downloading again and see what happens.

EDIT

Where can I download nightly builds? I lost the link >_>