Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility on MacOS Arm64/x64 by JNI/VLC #29

Closed
bastiencantet opened this issue Oct 25, 2023 · 28 comments
Closed

Incompatibility on MacOS Arm64/x64 by JNI/VLC #29

bastiencantet opened this issue Oct 25, 2023 · 28 comments
Assignees
Labels
Bug: API Something isn't working Severity: Issue Status: Help wanted Extra attention is needed Type: Enhancement New feature or request
Milestone

Comments

@bastiencantet
Copy link

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 ?

@bastiencantet
Copy link
Author

tested with 1.3.43 same thing

@bastiencantet
Copy link
Author

working on 1.20.1 with same version

@SrRapero720
Copy link
Member

SrRapero720 commented Oct 25, 2023

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

@SrRapero720
Copy link
Member

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

@GhostIsBeHere
Copy link

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!

@SrRapero720
Copy link
Member

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

@SrRapero720
Copy link
Member

@SrRapero720
Copy link
Member

or @TheBastosBob

@bastiencantet
Copy link
Author

https://discord.com/cuYAzzZ

the link not working

@bastiencantet
Copy link
Author

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

@bastiencantet
Copy link
Author

I daily drive GraalVM

@SrRapero720
Copy link
Member

SrRapero720 commented Nov 2, 2023

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

@SrRapero720 SrRapero720 added this to the WATERMeDIA 2.1.0 milestone Nov 2, 2023
@SrRapero720 SrRapero720 added Bug: API Something isn't working Type: Enhancement New feature or request Status: Help wanted Extra attention is needed Severity: Issue labels Nov 2, 2023
@GhostIsBeHere
Copy link

GhostIsBeHere commented Nov 2, 2023

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

@SrRapero720
Copy link
Member

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

@bastiencantet
Copy link
Author

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

@GhostIsBeHere
Copy link

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

@GhostIsBeHere
Copy link

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

@bastiencantet
Copy link
Author

@GhostIsBeHere for curiosity why temurin ?

@SrRapero720
Copy link
Member

@GhostIsBeHere exists a universal binaries version, try using it

@bastiencantet
Copy link
Author

@GhostIsBeHere
Copy link

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

@bastiencantet
Copy link
Author

https://mclo.gs/7FtKUbL

Still crashing vlc 3.0.20

@SrRapero720
Copy link
Member

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

@bastiencantet
Copy link
Author

https://mclo.gs/7Kc7Tuj
sorry

@SrRapero720
Copy link
Member

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

@SrRapero720 SrRapero720 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
@SrRapero720 SrRapero720 changed the title mod crashing on mac m1 Incompatibility on MacOS Arm64/x64 by JNI/VLC Nov 30, 2023
@SrRapero720 SrRapero720 reopened this Nov 30, 2023
@SrRapero720 SrRapero720 self-assigned this Nov 30, 2023
@SrRapero720
Copy link
Member

SrRapero720 commented Nov 30, 2023

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 Test failures on Apple silicon (aarch64) 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.

@SrRapero720
Copy link
Member

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

@SrRapero720
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: API Something isn't working Severity: Issue Status: Help wanted Extra attention is needed Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants