Illarion on OS X

If you found a bug in Illarion or need help ask here. / Wenn Du einen Fehler in Illarion gefunden hast oder Hilfe benötigst, frage hier.

Moderator: Developers

Post Reply
Nevas
Posts: 26
Joined: Tue Jul 04, 2006 6:05 pm
Location: CT, US of A
Contact:

Illarion on OS X

Post by Nevas »

I'm getting some pretty nice Java exceptions thrown at me when I try to run the Illarion client on my brand new (Intel) MacBook Pro. I am indeed running OS X 10.4.7, and I have not done anything to my Java installation.

I can start Illarion up and get the login screen. I bang in my login credentials, set some options, and try to login. That gives me a big, beautiful exception.

Code: Select all

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at com.sun.javaws.Launcher.executeApplication(Launcher.java:1154)
	at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1101)
	at com.sun.javaws.Launcher.continueLaunch(Launcher.java:944)
	at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:515)
	at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:218)
	at com.sun.javaws.Launcher.run(Launcher.java:165)
	at java.lang.Thread.run(Thread.java:613)
Caused by: java.lang.UnsatisfiedLinkError: /Users/nevans/Library/Caches/Java/cache/javaws/http/Ddownload.illarion.org/P80/DMlib_mac/RNlwjgl_lib.jar/liblwjgl.jnilib: 
	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1660)
	at java.lang.Runtime.loadLibrary0(Runtime.java:822)
	at java.lang.System.loadLibrary(System.java:992)
	at org.lwjgl.Sys$1.run(Sys.java:67)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.Sys.<clinit>(Sys.java:65)
	at org.lwjgl.opengl.Display.<clinit>(Display.java:104)
	at illarion.client.IllaClient.a(Unknown Source)
	at illarion.client.IllaClient.b(Unknown Source)
	at illarion.client.IllaClient.<init>(Unknown Source)
	at illarion.client.IllaClient.main(Unknown Source)
	... 11 more
Ouch. Initially, I thought I'd gotten a corrupt version of some library that gets pulled down when Javaws installs Illarion. However, Vilarion told me to try running the test from LJWGL's website.

Code: Select all

172:~/Desktop/lwjgl-1.0beta2 nevans$ java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: -Djava.library.path=native org.lwjgl.test.WindowCreationTest
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at org.lwjgl.Sys$1.run(Sys.java:72)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
        at org.lwjgl.Sys.loadLibrary(Sys.java:81)
        at org.lwjgl.Sys.<clinit>(Sys.java:98)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:103)
        at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:80)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:284)
172:~/Desktop/lwjgl-1.0beta2 nevans$
As you see, it starts off pretty well, printing some help to the terminal. Then it goes to draw a window...and BAM. Not so much.

This forum post seems to mention my issue, and suggest fixes, but I don't speak durkadurka javastani, so I'm having a hard time figuring out if there's a fix I can do or if I need to wait for a new client relase, OR if I need to wait for a proper fix in the library before I can get it running on OS X.

So. Uh. Where do I go from here? I'd love to get rid of some hardware, but I can't start selling it off until Illarion will work for me. =/

And of course, thanks for your time reading my ramblings.
Nevas
Posts: 26
Joined: Tue Jul 04, 2006 6:05 pm
Location: CT, US of A
Contact:

Post by Nevas »

I tried running the tests on the installation page of the lwjgl website with the most recent release (1.0beta3). It still didn't run. (I believe I tested with 1.0beta2 last time).

Code: Select all

172:~/Desktop/lwjgl-1.0beta3 nevans$ java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar: \
>     -Djava.library.path=native org.lwjgl.test.WindowCreationTest
The following keys are available:
ESCAPE:         Exit test
ARROW Keys:     Move window when in non-fullscreen mode
L:              List selectable display modes
0-8:            Selection of display modes
F:              Toggle fullscreen
SHIFT-F:        Toggle fullscreen with Display.destroy()/create() cycle
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:822)
        at java.lang.System.loadLibrary(System.java:992)
        at org.lwjgl.Sys$1.run(Sys.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
        at org.lwjgl.Sys.loadLibrary(Sys.java:84)
        at org.lwjgl.Sys.<clinit>(Sys.java:101)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:103)
        at org.lwjgl.test.WindowCreationTest.initialize(WindowCreationTest.java:80)
        at org.lwjgl.test.WindowCreationTest.main(WindowCreationTest.java:284)
I did a little bit of reading, and then modified the test comand, like so:

Code: Select all

java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/lwjgl_fmod3.jar:jar/lwjgl_devil.jar:jar/jinput.jar:     -Djava.library.path=native/[b]macosx/[/b] org.lwjgl.test.WindowCreationTest
Note the ephasized addition to the library path. This brought up a flashing window.

So it looks like the library (at least 1.0beta3) does in fact work on Intel Macs.

Sooo...why is the Illarion client not working? :>
User avatar
Kevin Lightdot
Posts: 2849
Joined: Sun Oct 16, 2005 8:17 pm
Location: Green again

Post by Kevin Lightdot »

Wait for Nop to pop up, he'll likely be able to help.
He doesn't visit the forums all to much.
Nevas
Posts: 26
Joined: Tue Jul 04, 2006 6:05 pm
Location: CT, US of A
Contact:

Post by Nevas »

I pulled open one of those .jar files to see what's actually going on. I did find something that I *think* may be causing the problem.

Code: Select all

172:~/Library/Caches/Java/cache/javaws/http/Ddownload.illarion.org/P80/DMlib_mac nevans$ file liblwjgl.jnilib 
liblwjgl.jnilib: Mach-O dynamically linked shared library ppc
The version of liblwjgl that came with Illarion does not look like its a universal binary. Of course, I don't know that there's no other version of the file in one of the jars that I didn't touch. I'm not a Java guy by any means, and I know embarassingly little about how it all goes together.

I found a file named smilarly in the native/macosx folder in the lwjgl 1.0beta3 download, and found that it is a universal binary.

Code: Select all

172:~/Desktop/lwjgl-1.0beta3/native/macosx nevans$ file liblwjgl.jnilib
liblwjgl.jnilib: Mach-O universal binary with 2 architectures
liblwjgl.jnilib (for architecture ppc): Mach-O dynamically linked shared library ppc
liblwjgl.jnilib (for architecture i386):        Mach-O dynamically linked shared library i386
Unfortunately, I saw what looked to be an rsa key, so I'm guessing the files are signed. So even if I knew how to repackage the 1.0beta3 files into .jars, and by some miracle they would work dropped-in like that, Javaws probably wouldn't run the hacked up Illarion client.

So I think I'm dead-ended.
User avatar
Nop
Developer
Posts: 2297
Joined: Tue Jul 05, 2005 10:47 am

Post by Nop »

I guess you are right - the version of the library is most likely obsolete.

Since none of us here in the dev team is a mac user I added the mac files, hoping the best, but they were never updated. I can try adding the latest version from lwjgl to the client instead of the current libs that are almost one year old.
Nevas
Posts: 26
Joined: Tue Jul 04, 2006 6:05 pm
Location: CT, US of A
Contact:

Post by Nevas »

First and foremost, thank you for looking at my problem. :D

I would be more than happy to test the changes out if you want me to.
Nevas
Posts: 26
Joined: Tue Jul 04, 2006 6:05 pm
Location: CT, US of A
Contact:

Post by Nevas »

Just posting to say that the changes made in the new client release are working for me.

I have not done any extensive play testing, but I don't envision any troubles.

Thank you very much, Nop. =D
Post Reply