LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: meriley on February 16, 2011, 21:54:35

Title: Error While launching a game i am working on using LWJGL
Post by: meriley on February 16, 2011, 21:54:35
I am coding using the following:
IDE: Eclipse
OS: OSX Darwin Leopard 10.5.8
Processor Architecture: 32 Bit
Java JDK: Soylatte JDK 1.6

I have verified that the native library is being referenced appropriately for LWJGL

The Error I am getting when executing code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.lwjgl.DefaultSysImplementation.getPointerSize()I
at org.lwjgl.DefaultSysImplementation.getPointerSize(Native Method)
at org.lwjgl.Sys.<clinit>(Sys.java:100)
at org.lwjgl.opengl.Display.<clinit>(Display.java:130)
at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
at rts.core.Game.launch(Game.java:126)
at rts.Launch.main(Launch.java:20)


If i use the JDK: openJDK6 then I get the error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1698)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at org.lwjgl.Sys$1.run(Sys.java:73)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:82)
at org.lwjgl.Sys.<clinit>(Sys.java:99)
at org.lwjgl.opengl.Display.<clinit>(Display.java:130)
at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
at rts.core.Game.launch(Game.java:126)
at rts.Launch.main(Launch.java:20)

Title: Re: Error While launching a game i am working on using LWJGL
Post by: kappa on February 17, 2011, 09:52:16
which version of LWJGL are you using? if your using the one that comes by default with Slick2D then that is too old, you need to use the latest version, LWJGL 2.7.1 as it has support for Darwin.
Title: Re: Error While launching a game i am working on using LWJGL
Post by: meriley on February 17, 2011, 17:45:10
I have updated to the latest version of lwjgl and updated my native files and the two errors above are gone.

I have a new issue though!

Thu Feb 17 10:39:11 PST 2011 ERROR:Unable to determine Slick build number
Thu Feb 17 10:39:12 PST 2011 ERROR:Could not create pixel format
org.lwjgl.LWJGLException: Could not create pixel format
at org.lwjgl.opengl.MacOSXPeerInfo.nChoosePixelFormat(Native Method)
at org.lwjgl.opengl.MacOSXPeerInfo.choosePixelFormat(MacOSXPeerInfo.java:55)
at org.lwjgl.opengl.MacOSXPeerInfo.<init>(MacOSXPeerInfo.java:50)
at org.lwjgl.opengl.MacOSXCanvasPeerInfo.<init>(MacOSXCanvasPeerInfo.java:49)
at org.lwjgl.opengl.MacOSXDisplayPeerInfo.<init>(MacOSXDisplayPeerInfo.java:48)
at org.lwjgl.opengl.MacOSXDisplay.createPeerInfo(MacOSXDisplay.java:247)
at org.lwjgl.opengl.Display.create(Display.java:855)
at org.lwjgl.opengl.Display.create(Display.java:785)
at org.newdawn.slick.AppGameContainer.tryCreateDisplay(AppGameContainer.java:299)
at org.newdawn.slick.AppGameContainer.access$0(AppGameContainer.java:295)
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 rts.core.Game.launch(Game.java:137)
at rts.Launch.main(Launch.java:20)
org.newdawn.slick.SlickException: Failed to initialise the LWJGL display
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:375)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
at rts.core.Game.launch(Game.java:137)
at rts.Launch.main(Launch.java:20)


Then after updating slick
Thu Feb 17 10:46:54 PST 2011 INFO:Slick Build #274
Thu Feb 17 10:46:54 PST 2011 ERROR:Could not create pixel format
org.lwjgl.LWJGLException: Could not create pixel format
at org.lwjgl.opengl.MacOSXPeerInfo.nChoosePixelFormat(Native Method)
at org.lwjgl.opengl.MacOSXPeerInfo.choosePixelFormat(MacOSXPeerInfo.java:55)
at org.lwjgl.opengl.MacOSXPeerInfo.<init>(MacOSXPeerInfo.java:50)
at org.lwjgl.opengl.MacOSXCanvasPeerInfo.<init>(MacOSXCanvasPeerInfo.java:49)
at org.lwjgl.opengl.MacOSXDisplayPeerInfo.<init>(MacOSXDisplayPeerInfo.java:48)
at org.lwjgl.opengl.MacOSXDisplay.createPeerInfo(MacOSXDisplay.java:247)
at org.lwjgl.opengl.Display.create(Display.java:855)
at org.lwjgl.opengl.Display.create(Display.java:785)
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 rts.core.Game.launch(Game.java:137)
at rts.Launch.main(Launch.java:20)
org.newdawn.slick.SlickException: Failed to initialise the LWJGL display
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:375)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
at rts.core.Game.launch(Game.java:137)
at rts.Launch.main(Launch.java:20)


This appears to be a slick issue so i dont expect an answer since this is outside of LWJGL; but i figured it throw it out there.

Using Soylatte JDK, i have not tried openJDK. These chain of errors are very strange because i cannot replicate any of these errors on my windows PC.
Title: Re: Error While launching a game i am working on using LWJGL
Post by: kappa on February 17, 2011, 17:48:47
are you creating a pixel format supported by your computer?

Do you have opengl acceleration on the computer? If you don't, try running with the following VM parameter
Quote-Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true
If software mode works, its likely your missing opengl drivers or hardware acceleration on the computer.
Title: Re: Error While launching a game i am working on using LWJGL
Post by: meriley on February 17, 2011, 18:04:06
With that VM argument I do get a bit further. X11 Starts up then program terminates.

I may have to download XCode if you think its a problem with openGL. If i remember correctly you get the openGL headers from that. Not sure if that matters necessarily.

Thu Feb 17 10:50:11 PST 2011 INFO:Slick Build #274
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
Thu Feb 17 10:50:13 PST 2011 ERROR:Could not get the JAWT interface
org.lwjgl.LWJGLException: Could not get the JAWT interface
at org.lwjgl.opengl.AWTSurfaceLock.lockAndInitHandle(Native Method)
at org.lwjgl.opengl.AWTSurfaceLock.access$100(AWTSurfaceLock.java:49)
at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:88)
at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:86)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:86)
at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:64)
at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:53)
at org.lwjgl.opengl.MacOSXDisplayPeerInfo.doLockAndInitHandle(MacOSXDisplayPeerInfo.java:56)
at org.lwjgl.opengl.PeerInfo.lockAndGetHandle(PeerInfo.java:85)
at org.lwjgl.opengl.MacOSXContextImplementation.create(MacOSXContextImplementation.java:47)
at org.lwjgl.opengl.Context.<init>(Context.java:131)
at org.lwjgl.opengl.Display.create(Display.java:859)
at org.lwjgl.opengl.Display.create(Display.java:785)
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 rts.core.Game.launch(Game.java:137)
at rts.Launch.main(Launch.java:20)
org.newdawn.slick.SlickException: Failed to initialise the LWJGL display
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:375)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
at rts.core.Game.launch(Game.java:137)
at rts.Launch.main(Launch.java:20)
Title: Re: Error While launching a game i am working on using LWJGL
Post by: meriley on February 21, 2011, 15:59:38
Sadly I am still stuck with this last error on the mac OS. Tried a few things such and lowering the resolution of the game with no resolve.

Any suggestions?