Incompatibility on MacOS Arm64/x64 by JNI/VLC
bastiencantet opened this issue · 28 comments
Hello, i have a problem on my mac arm.
I installed the latest version of VLC (3.0.19).
When i place a water frame (waterframe mod) that use your api, i crash
I'm using watermedia 1.3.35
A solution ?
i close this issue because
- i can't properly test it
- caprica also closes the issue
if someone with the same problem and is a developer want to become into a contributor, please go to my Discord to make proper testing and (if is wanted) add you as an MacOS tester
aparently someone fixes it using VLC 3.0.18. so... here is
https://get.videolan.org/vlc/3.0.18/macosx/vlc-3.0.18-universal.dmg
I think JNA refuses to load (when you have ARM binaries) because it checks what arch is the JVM instead of what arch is the OS.
i am pretty sure problem was the weird conversion between ARM to x86_64 to ARM.
because binaries are 1 thing that works as a normal mac program... and needs the right architectury to work well
@GhostIsBeHere
Try to search any way to load minecraft with the right JVM (Java version) for ARM. because i really don't want to break my head to investigate how to make it work in a weird Arch environment in a OS that i dont have it.
@TheBastosBob
Searching about... your issue is from the JVM itself, no by VLC or any kind of... exclusivelly happens on the JVM. so probably something in your JVM is wrong.
i cannot fix this
i receive A LOT of reports about it, someone suggest to use a optimized JVM for Apple Silicon.
I don't know from where get it. because person who tell me that doesn't give me any link
@TheBastosBob can you open a command-line and type java --version
? And send me what Is the output
Hi! I'm also experiencing this problem, on an M2 mac. When I try to launch the game, it errors with "WaterMedia failed to load correctly." I am using temurin17.0.9 with x86_64 architechture. I am not using aarch/arm architecture because minecraft won't load with it. I am on Minecraft version 1.19.2 and I have tried WaterMedia 1.3.42 and 2.0.10. I hope this helps!
@GhostIsBeHere can you join to my discord and send me a DM? i need your help to fix + enhance
the link not working
@TheBastosBob and @GhostIsBeHere can you test with the new VLC versión (3.0.20)???
When I try to load, Watermedia claims that I do not have VLC installed on my system. I do have VLC installed on my system. Could it be perhaps getting confused because VLC is installed using homebrew?
Edit: issue persists with manual install of VLC
@GhostIsBeHere your issue was you install the wrong VLC version... again
(mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')),
As I stated before, minecraft won't launch on my computer with temurin17 arm builds.
@GhostIsBeHere be careful you are using a x86_64 version of Java, maybe use arm version to have a lot of performance boost
@GhostIsBeHere for curiosity why temurin ?
Most places i've seen recommend temurin/adoptium, both minecraft and non-minecraft java. I've been meaning to look into other providers, but haven't gotten around to it.
@GhostIsBeHere your issue was you install the wrong VLC version... again
(mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')),
Ah, thank you! I'll test this when I get back to my computer.
@GhostIsBeHere for curiosity why temurin ?
@GhostIsBeHere exists a universal binaries version, try using it
/Users/********/Library/Application Support/PrismLauncher/instances/1.19.2(6)/.minecraft/hs_err_pid15934.log
Still crashing vlc 3.0.20
https://mclo.gs/7Kc7Tuj
sorry
STATUS OF THE ISSUE
Issue was originated on macOS (Intel or M1 or M2), jni crashes on jni_CallVoidMethod+0x100
with no aparent reason. and was always caused when volume got changed using SimplePlayer#setVolume(int) before media was started
POSSIBLE CAUSES/FIXES
- Issue becomes more visible when VideoLAN releases a new update (3.0.19+), sadly i can't properly test using 3.0.18. To help with testing first is required to test latest version of VideoLAN, and if it crashes using WATERFrAMES then try downgrading to VLC 3.0.18. If wasn't present on 3.0.18 then means VLC is broken on MacOS or VLCJ bindings are broken and requires an update/fix. Versions to test are
- JNI issue, and probably related java-native-access/jna#1323
WORKARROUND FOR MAC USERS
Disable all usage of VLC on mod config, waterframes includes a client-side config option to disable VLC at all located in .minecraft/config/waterframes-client.toml
. other mods needs to do something arround it.
JAVA 8 concerning
WATERMeDIA on MacOS was officially unsupported using JAVA 8 or Minecraft below 1.16.5, main reason was Microsoft or LWJGL wasn't interested on fix it officially on Minecraft, so i can't fix nothing.