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

Incompatible with LWJGL 3.2.3 (used by ARM64 builds) #748

Closed
nick-botticelli opened this issue Jul 9, 2021 · 9 comments
Closed

Incompatible with LWJGL 3.2.3 (used by ARM64 builds) #748

nick-botticelli opened this issue Jul 9, 2021 · 9 comments
Labels
B-1.17 Branch: Minecraft 1.17 E-external Closed: External issue S-confirmed Status: Confirmed T-crash Type: Crash or hang

Comments

@nick-botticelli
Copy link
Contributor

nick-botticelli commented Jul 9, 2021

Version information

mc1.17.1-0.3.0+build.494

Reproduction Steps

  1. Use M1 MultiMC Hack (https://github.com/yusefnapora/m1-multimc-hack)
  2. Launch Minecraft 1.17 with newer builds of Sodium (Ones including the usage of org.lwjgl.system.MemoryUtil.memFree method)
  3. Change worlds or log out of a server/single player world to trigger the crash

Crash Report file

crash-2021-07-08_19.15.01-client.txt

Additional information

This is likely due to Sodium's usage of certain org.lwjgl methods with the "M1 MultiMC Hack" located here https://github.com/yusefnapora/m1-multimc-hack. I have tried various forks of it with no success, either. I do not expect this to have a high priority as it would be done to support a hack-y setup. Older versions of Sodium seem to not encounter this crash issue.

@magneticflux-
Copy link
Contributor

This is because the "M1 Hack" bundles LWJGL 3.2.3. The latest version available in MultiMC (and used by Minecraft) is 3.2.2, and there was a breaking change in 3.2.3:
https://github.com/LWJGL/lwjgl3/releases/tag/3.2.3

Core: MemoryUtil.memFree(PointerBuffer) changed to memFree(CustomBuffer). (B)

@Snivine
Copy link

Snivine commented Jul 10, 2021

so you could technically just make a failsafe where it changes to memFree if it detects LWJGL 3.2.3

@aronson
Copy link

aronson commented Jul 12, 2021

I was able to run this as well as other Minecraft instances using a fork of the M1 hack. It ships 3.2.2 AFAICT.
https://github.com/17hoehbr/m1-multimc-hack

@nick-botticelli
Copy link
Contributor Author

I was able to run this as well as other Minecraft instances using a fork of the M1 hack. It ships 3.2.2 AFAICT.
https://github.com/17hoehbr/m1-multimc-hack

I tried that fork and faced the same crash; JDK 16 Minecraft 1.17.1, latest Sodium.

@jellysquid3 jellysquid3 pinned this issue Jul 17, 2021
@jellysquid3 jellysquid3 added S-confirmed Status: Confirmed E-external Closed: External issue T-crash Type: Crash or hang labels Jul 17, 2021
@coderbot16
Copy link
Contributor

This commit works around the issue: IrisShaders@7491e3a

@jellysquid3 jellysquid3 added the B-1.17 Branch: Minecraft 1.17 label Jul 18, 2021
@jaded33
Copy link

jaded33 commented Jul 19, 2021

Same here on an M1. Getting super high frame rates 70-120FPS with 300+ mods but stutters down to 7-20 when moving. Disconnecting from server gives me the sodium crash. Now that I know it is the M1 hack I’ll try in regular compatibility Rosetta mode.

@jellysquid3 jellysquid3 changed the title Incompatible with M1 MultiMC Hack Incompatible with LWJGL 3.2.3 (used by ARM64 builds) Jul 21, 2021
@jellysquid3
Copy link
Member

We'll merge the workaround from Iris into Sodium 0.3.1.

@jellysquid3
Copy link
Member

This is now fixed in Sodium 0.3.1.

@itschews
Copy link

itschews commented Aug 29, 2021

stutters down to 7-20

was messing around with settings in sodium 0.3.1
change chunk memory allocator from async to swap and it wont stutter anymore

iris doesnt work for me but i dont really use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-1.17 Branch: Minecraft 1.17 E-external Closed: External issue S-confirmed Status: Confirmed T-crash Type: Crash or hang
Projects
None yet
Development

No branches or pull requests

8 participants