WATERMeDIA: Multimedia API

WATERMeDIA: Multimedia API

551k Downloads

Incompatibility on MacOS Arm64/x64 by JNI/VLC

bastiencantet opened this issue · 28 comments

commented

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 ?

commented

i close this issue because

  1. i can't properly test it
  2. 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

commented

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

commented

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

commented

tested with 1.3.43 same thing

commented

working on 1.20.1 with same version

commented

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

commented

@TheBastosBob can you open a command-line and type java --version? And send me what Is the output

commented

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!

commented

@GhostIsBeHere can you join to my discord and send me a DM? i need your help to fix + enhance

commented

or @TheBastosBob

commented

https://discord.com/cuYAzzZ

the link not working

commented

About JVM,i tried multiple one because when M1 launched , there are not a lot of ARM JVM's so i began using Zulus one, i Also switeched to GraalVM one
Screenshot 2023-10-31 at 10 30 45

to be sure il tried , Zulu 17 ,19 , and GraalVM 20 and i have the same problem , all are optimised for Arm

commented

I daily drive GraalVM

commented

@TheBastosBob and @GhostIsBeHere can you test with the new VLC versión (3.0.20)???

commented

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

Log

commented

@GhostIsBeHere your issue was you install the wrong VLC version... again
(mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')),

commented

As I stated before, minecraft won't launch on my computer with temurin17 arm builds.

commented

@GhostIsBeHere be careful you are using a x86_64 version of Java, maybe use arm version to have a lot of performance boost

commented

@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.

commented

@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.

commented

@GhostIsBeHere for curiosity why temurin ?

commented

@GhostIsBeHere exists a universal binaries version, try using it

commented

/Users/********/Library/Application Support/PrismLauncher/instances/1.19.2(6)/.minecraft/hs_err_pid15934.log

commented

https://mclo.gs/7FtKUbL

Still crashing vlc 3.0.20

commented
commented

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

  1. 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
  2. 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.