DrParadox7 / Lost-Era-Modpack

Files for the Lost Era Modpack
GNU General Public License v3.0
7 stars 7 forks source link

[MacOS] Crash on startup when launching game using a JDK compiled with newer versions of XCode #98

Closed PhilippeDunbar closed 8 months ago

PhilippeDunbar commented 8 months ago

Your Pack Version

1.6.4

Type of Instance

Single Player

Your Actions

Lost era crashes on second launch (after asking about textures and optifine) I've tried both optifine and updated textures and neither, so I don't think options matter.

I've patched my Modrinth launcher to use guava 17 per #94 (It did resolve one bug, I get further now), and I also tried Prism according to @DrParadox7 's suggestion.

I'm happy to use prism or modrinth, I've attached both logs

Crash Report

Modrinth Log: https://mclo.gs/NmeACbs

Prism Log: https://mclo.gs/UkOVfyG

Final Checklist

DrParadox7 commented 8 months ago

This was one hell of a rabbit hole to go through but, from my understanding, there are 2 ways you can attempt to fix this as the end user: A) Remove Optifine (you'd also need to delete ModDirector so it doesn't get reinstalled) B) Downgrade your Java 8 version to one pre-261

I'll look into how this can be patched and consult with others that have a deeper understanding than me.

Further read: https://github.com/MinecraftForge/MinecraftForge/issues/7546

DrParadox7 commented 8 months ago

Do report back @PhilippeDunbar and if you do get it working, I recommend using the G1C1 garbage collector by adding this to your JVM arguments for improved performance: -XX:+UseG1GC -Xms3G -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

DrParadox7 commented 8 months ago

I pulled out an old mac to debug and test this out.

While the default OpenJDK provided by MultiMC and Modrinth (Zulu 8.76.0.17 - JRE 8.0.402) did crash on startup, the ones from Adoptium.net didn't, and even the latest one worked fine (Adoptium 8u-402b06 as of writing this).

It would be safe to assume that Adoptium releases are not built against the latest XCode thus are more resilient to issues like these.

My suggestion is to use Adoptium OpenJDK instead whatever the default launcher provides and the issue should be fixed.

PhilippeDunbar commented 8 months ago

Adoptium OpenJDK didnt solve my problem but it seems to work once I removed Optifine.

(Currently Running with Adoptium JDK & no optifine)

DrParadox7 commented 8 months ago

Adoptium OpenJDK didnt solve my problem but it seems to work once I removed Optifine.

(Currently Running with Adoptium JDK & no optifine)

Could you post logs on that?

PhilippeDunbar commented 8 months ago

I'm including the logs for both working and broken configurations, the working config log also includes a fair amount of gameplay.

There is some game stuttering with the working configuration, but that may be my fault due to using different memory options then you suggested (due to prism making you use input boxes for memory, and not being able to put memory arguments with the rest of the java args - I just used the memory defaults in the input boxes). I'm currently testing another memory config I'll follow up with how that turns out.

(working - no optifine, no mod director) https://mclo.gs/q4clMYI

(startup crash - with optifine, no mod director) https://mclo.gs/DziUTGV