Default Client - Crash with ARM64

The worst monsters in the Hearthlands warp the fabric of space and time...

Default Client - Crash with ARM64

Postby Noid » Thu Oct 05, 2023 9:26 am

Tried to launch the default client on MacOS 14.0, using Oracle JDK for ARM64 since the device runs an Apple Silicon M1.

https://www.oracle.com/java/technologie ... #jdk21-mac

The client won't launch returning this:

Code: Select all
java.lang.UnsatisfiedLinkError: /private/var/folders/_d/skfz5x_n55vg51zpd3rytkbw0000gn/T/jogamp_0000/file_cache/jln7067984779505716289/jln2214937736967459327/natives/macosx-universal/libgluegen_rt.dylib: dlopen(/private/var/folders/_d/skfz5x_n55vg51zpd3rytkbw0000gn/T/jogamp_0000/file_cache/jln7067984779505716289/jln2214937736967459327/natives/macosx-universal/libgluegen_rt.dylib, 0x0001): tried: '/private/var/folders/_d/skfz5x_n55vg51zpd3rytkbw0000gn/T/jogamp_0000/file_cache/jln7067984779505716289/jln2214937736967459327/natives/macosx-universal/libgluegen_rt.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/_d/skfz5x_n55vg51zpd3rytkbw0000gn/T/jogamp_0000/file_cache/jln7067984779505716289/jln2214937736967459327/natives/macosx-universal/libgluegen_rt.dylib' (no such file), '/private/var/folders/_d/skfz5x_n55vg51zpd3rytkbw0000gn/T/jogamp_0000/file_cache/jln7067984779505716289/jln2214937736967459327/natives/macosx-universal/libgluegen_rt.dylib' (ma
   at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
   at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
   at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
   at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
   at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
   at java.base/java.lang.Runtime.load0(Runtime.java:852)
   at java.base/java.lang.System.load(System.java:2021)
   at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:604)
   at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
   at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:107)
   at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:488)
   at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:427)
   at com.jogamp.common.os.Platform$1.run(Platform.java:321)
   at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
   at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
   at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
   at haven.JOGLPanel.mkcaps(JOGLPanel.java:67)
   at haven.JOGLPanel.<init>(JOGLPanel.java:87)
   at haven.MainFrame.renderer(MainFrame.java:176)
   at haven.MainFrame.<init>(MainFrame.java:195)
   at haven.MainFrame.main2(MainFrame.java:431)
   at haven.MainFrame.lambda$main$0(MainFrame.java:458)
   at java.base/java.lang.Thread.run(Thread.java:1583)


If someone out there can help me translate this in an actionable solution would be greatly appreciated.
User avatar
Noid
 
Posts: 105
Joined: Sun May 26, 2013 4:12 pm

Re: Default Client - Crash with ARM64

Postby Mashadar » Thu Oct 12, 2023 12:42 pm

The JOGL library which the game uses does not support M1, that is why you're getting the error.
In theory, it should work if you install the x64 JDK instead and run it via Rosetta.

There is also an experimental LWJGL branch (which does support M1), but that would require you to checkout the branch and build the client yourself.
User avatar
Mashadar
 
Posts: 379
Joined: Thu Jan 20, 2011 9:34 am

Re: Default Client - Crash with ARM64

Postby loftar » Thu Oct 12, 2023 10:29 pm

Mashadar wrote:but that would require you to checkout the branch and build the client yourself.

Not exactly, there's a launcher available these days:
https://www.havenandhearth.com/java/hafen-lwjgl-launcher.jar
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9051
Joined: Fri Apr 03, 2009 7:05 am

Re: Default Client - Crash with ARM64

Postby Mashadar » Thu Oct 12, 2023 11:47 pm

loftar wrote:Not exactly, there's a launcher available these days:
https://www.havenandhearth.com/java/hafen-lwjgl-launcher.jar

Ah, that's neat. Although the LWJGL version crashes on Mac with "-[NSOpenGLContext setView:] must be called from the main thread.".

But I can confirm that the standard client works fine with Rosetta. When using the Oracle Java installer, one needs to make sure the installer itself also runs with Rosetta, otherwise it will refuse to install. This can be done with (after mounting the .dmg file):
Code: Select all
arch -x86_64 /System/Library/CoreServices/Installer.app/Contents/MacOS/Installer /Volumes/JDK\ 21/JDK\ 21.pkg
User avatar
Mashadar
 
Posts: 379
Joined: Thu Jan 20, 2011 9:34 am

Re: Default Client - Crash with ARM64

Postby loftar » Fri Oct 13, 2023 5:12 pm

Mashadar wrote:Ah, that's neat. Although the LWJGL version crashes on Mac with "-[NSOpenGLContext setView:] must be called from the main thread.".

Hm, that is quite unfortunate. I thought modern OpenGL drivers were free from those kinds of threading issues. Not sure how easy that will be to fix.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9051
Joined: Fri Apr 03, 2009 7:05 am

Re: Default Client - Crash with ARM64

Postby Nolokor » Mon Oct 23, 2023 12:18 am

I haven't checked with the default client yet, but with custom clients I get the same error. But if I update jogamp to the newest version, it's all good. I suggest investigating if that works for the default client too, as it's as easy as copying jar files to the lib/ext/jogl/.
Nolokor
 
Posts: 5
Joined: Thu Feb 16, 2012 12:44 am

Re: Default Client - Crash with ARM64

Postby ubersheva » Sun Aug 25, 2024 2:31 pm

I confirm default client launches if I replace gluegen-rt.jar, jogl-all.jar and their corresponding natives jars with those from version 2.5.0 of jogl.
Screenshot 2024-08-25 at 14.26.23.jpg
You do not have the required permissions to view the files attached to this post.
ubersheva
 
Posts: 68
Joined: Thu Apr 15, 2010 8:13 am

Re: Default Client - Crash with ARM64

Postby Razikus » Fri Nov 01, 2024 1:44 pm

For everyone that have this problem - LWJGL launcher doesn't work for me

But updating to latest JOGL libraries works and it allows to run latest client

Or using rosetta as described here
viewtopic.php?f=49&t=40754&start=2427

Here is a little script
https://gist.githubusercontent.com/Razi ... temacos.sh

you can use it like this in terminal (before try to first run official client at least once)
Code: Select all
curl https://gist.githubusercontent.com/Razikus/01bc4a187eaa5077d3456222c1a51857/raw/27047a5e91b58dea3d289a3fc88f93c730d1b51c/joglupdatemacos.sh | bash
User avatar
Razikus
 
Posts: 27
Joined: Sun Apr 10, 2011 8:04 pm

Re: Default Client - Crash with ARM64

Postby loftar » Mon Nov 04, 2024 6:19 am

The reason I haven't updated the default client to JOGL 2.5.0 is because they dropped 32-bit Windows JVM support, which a lot of people still use. There's talk about them bringing that back in 2.6.0 though, which hasn't been released yet.

The Steam client does use 2.5.0, however, since it ships with its own JVM and therefore 32-bit JVMs aren't an issue, so it should work on OSC out of the box.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9051
Joined: Fri Apr 03, 2009 7:05 am


Return to Bugs

Who is online

Users browsing this forum: Claude [Bot] and 28 guests