[macOS] Optifine incompatible with JVMs compiled against macOS SDK 10.14+
Bobmarlinjr opened this issue · 19 comments
Bug Description
When adding optifine to the most recent version of Sevtech, the game crashes on startup. The minecraft loading screen appears for a split second, then the game crashes.Did this behavior use to work in the previous version?
The last time I played Sevtech (3.1.2) Optifine E3 worked with my game.Steps to Reproduce (for bugs)
- Download the most recent version of Sevtech (3.1.7) on Twitch Launcher
- Download Optifine F6 pre1 from the Optifine website
- Move the Optifine jar file into the mods folder of the Sevtech Modpack
- Launch the game
Logs
- Client/Server Log: https://pastebin.com/f0GuQfXs
- Crash Log:
Client Information
- Modpack Version: 3.1.7
- Java Version: 1.8.0.261 (64 bit)
- Launcher Used: Twitch (also happens on AT Launcher)
- Memory Allocated: 7000 MB
- Server/LAN/Single Player: Singleplayer
- Optifine Installed: Yes, 1.12.2 F6 pre1
- Shaders Enabled: Not yet
World Information
- Modpack Version world created in: N/A
- Additional Content Installed:
I cannot reproduce this; it works fine for me using F6 pre on macOS.
If you create a new 1.12.2 modpack with just Forge 2854 and Optifine F6 pre are you able to get into the game?
It just worked on the regular minecraft launcher, i added forge and put optifine in and it worked. let me try to uninstall and reinstall twitch and see if that helps.
This appears to be caused by using a Java version that compiles against the macOS SDK 10.14 or above. An action that was previously acceptable to Apple became a crash in this version. You likely didn't see a crash when using the vanilla launcher because it bundles a very old version of Java that is compiled against macOS SDK 10.8, and uses that by default.
Oracle Java switched from macOS SDK version 10.8 to 10.14 with the release of build 261. I did not see this issue as I was still using build 251.
This is discussed in adoptium/adoptium-support#101 and has been reported to Optifine sp614x/optifine#4824.
There is little more we can do; as Optifine is closed source we cannot submit a patch for it.
Below is a summary of JVMs I tried, the outcome of running with Optifine and which SDK they target. I suggest downgrading to 251 if you wish to play with Optifine whilst they work on a fix.
Oracle JRE 1.8.0_251-b08 (works with Optifine)
otool -l /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.7
sdk 10.8
Oracle JRE 1.8.0_261-b12 (does not work with Optifine)
otool -l /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.9
sdk 10.14
openJDK JRE 1.8.0_265-b01 (does not work with Optifine)
otool -l /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.9
sdk 10.14
Minecraft's bundled JRE (Oracle JVM 1.8.0_74-b02) (works with Optifine)
otool -l ~/Library/Application\ Support/minecraft/runtime/jre-x64/jre.bundle/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.7
sdk 10.8
Based on the suggestion in sp614x/optifine#4824 (comment) I also tested the latest version of the Amazon Corretto JVM, which also works with Optifine without having to downgrade - however Twitch does not seem to recognise it.
❯ otool -l /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.9
sdk 10.10
❯ /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/bin/java -version
openjdk version "1.8.0_265"
OpenJDK Runtime Environment Corretto-8.265.01.1 (build 1.8.0_265-b01)
OpenJDK 64-Bit Server VM Corretto-8.265.01.1 (build 25.265-b01, mixed mode)
Sam, thank you for all the help! I'll try downgrading java and see what happens.
This appears to be caused by using a Java version that compiles against the macOS SDK 10.14 or above. An action that was previously acceptable to Apple became a crash in this version. You likely didn't see a crash when using the vanilla launcher because it bundles a very old version of Java that is compiled against macOS SDK 10.8, and uses that by default.
Oracle Java switched from macOS SDK version 10.8 to 10.14 with the release of build 261. I did not see this issue as I was still using build 251.
This is discussed in AdoptOpenJDK/openjdk-support#101 and has been reported to Optifine sp614x/optifine#4824.
There is little more we can do; as Optifine is closed source we cannot submit a patch for it.
Below is a summary of JVMs I tried, the outcome of running with Optifine and which SDK they target. I suggest downgrading to 251 if you wish to play with Optifine whilst they work on a fix.
Oracle JRE 1.8.0_251-b08 (works with Optifine)
otool -l /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.7 sdk 10.8Oracle JRE 1.8.0_261-b12 (does not work with Optifine)
otool -l /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.9 sdk 10.14openJDK JRE 1.8.0_265-b01 (does not work with Optifine)
otool -l /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.9 sdk 10.14
Minecraft's bundled JRE (Oracle JVM 1.8.0_74-b02) (works with Optifine)
otool -l ~/Library/Application\ Support/minecraft/runtime/jre-x64/jre.bundle/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.7 sdk 10.8
You saved my day!
What was the problem? Optifine was crashing in 'The 1.12.2 Pack' Modpack
What have I tried?
I have tried the OG java from MacOS, Adopt, Oracle
How has I fixed it?
I installed the vanilla Minecraft and run the launcher once so the JRE got downloaded.
After that I put the JRE from the Minecraft launcher and launched with it the Modpack with optifine and it works perfect!👍🏻
This appears to be caused by using a Java version that compiles against the macOS SDK 10.14 or above. An action that was previously acceptable to Apple became a crash in this version. You likely didn't see a crash when using the vanilla launcher because it bundles a very old version of Java that is compiled against macOS SDK 10.8, and uses that by default.
Oracle Java switched from macOS SDK version 10.8 to 10.14 with the release of build 261. I did not see this issue as I was still using build 251.
This is discussed in AdoptOpenJDK/openjdk-support#101 and has been reported to Optifine sp614x/optifine#4824.
There is little more we can do; as Optifine is closed source we cannot submit a patch for it.
Below is a summary of JVMs I tried, the outcome of running with Optifine and which SDK they target. I suggest downgrading to 251 if you wish to play with Optifine whilst they work on a fix.
Oracle JRE 1.8.0_251-b08 (works with Optifine)
otool -l /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.7 sdk 10.8Oracle JRE 1.8.0_261-b12 (does not work with Optifine)
otool -l /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.9 sdk 10.14openJDK JRE 1.8.0_265-b01 (does not work with Optifine)
otool -l /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.9 sdk 10.14
Minecraft's bundled JRE (Oracle JVM 1.8.0_74-b02) (works with Optifine)
otool -l ~/Library/Application\ Support/minecraft/runtime/jre-x64/jre.bundle/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.7 sdk 10.8
Sorry if this sounds dumb but how do I downgrade Java and do all this fancy JRM argument stuff? I'm also trying to get optifine to work with the latest version of Sevtech through the twitch launcher.
This appears to be caused by using a Java version that compiles against the macOS SDK 10.14 or above. An action that was previously acceptable to Apple became a crash in this version. You likely didn't see a crash when using the vanilla launcher because it bundles a very old version of Java that is compiled against macOS SDK 10.8, and uses that by default.
Oracle Java switched from macOS SDK version 10.8 to 10.14 with the release of build 261. I did not see this issue as I was still using build 251.
This is discussed in AdoptOpenJDK/openjdk-support#101 and has been reported to Optifine sp614x/optifine#4824.
There is little more we can do; as Optifine is closed source we cannot submit a patch for it.
Below is a summary of JVMs I tried, the outcome of running with Optifine and which SDK they target. I suggest downgrading to 251 if you wish to play with Optifine whilst they work on a fix.
Oracle JRE 1.8.0_251-b08 (works with Optifine)otool -l /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.7 sdk 10.8Oracle JRE 1.8.0_261-b12 (does not work with Optifine)
otool -l /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.9 sdk 10.14openJDK JRE 1.8.0_265-b01 (does not work with Optifine)
otool -l /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.9 sdk 10.14
Minecraft's bundled JRE (Oracle JVM 1.8.0_74-b02) (works with Optifine)
otool -l ~/Library/Application\ Support/minecraft/runtime/jre-x64/jre.bundle/Contents/Home/bin/java | grep -A 3 LC_VERSION_MIN_MACOSX cmd LC_VERSION_MIN_MACOSX cmdsize 16 version 10.7 sdk 10.8Sorry if this sounds dumb but how do I downgrade Java and do all this fancy JRM argument stuff? I'm also trying to get optifine to work with the latest version of Sevtech through the twitch launcher.
@Lukadoosh are you using macOS? What version of Java are you trying to use?
@sam-kirby I'm currently using macOS Catalina version 10.15.2 and Java 8 update 271.
The simplest solution is just to use the JRE that comes bundled with Twitch - it will be listed as 1.8.0_51.
It appears Oracle do not provide a way to download old versions of Java, so unless you still have the installer for an old version there isn't really another good option that works with Twitch launcher.
@dscalzi who are you proposing we elevate this to? You have already reported this to Optifine, no one else is in a position to do anything.
I'm not sure how the triage system works for this project, but my thought is that issues can get lost given that 250+ are open. Must be a way of getting potential blockers elevated for a patch? I'm concerned this will sit here dead until its unplayable on the latest version across all vendors.
We don't make Optifine, we don't have access to its source code, we have no communication (that I am aware of) to its developers outside of Github issues on their repository.
Optifine is not even a default component of the pack (as doing so would go against the licensing terms of Optifine).
This issue is here purely to provide information to users who may seek to use Optifine on macOS in our pack.
Ah, I thought this was optifine's issue tracker. My apologies. My comment was made under that assumption. The github notification system got me there 😵
If oracle has updated their JDK to compile against this version of the macOS SDK this issue should be elevated. It only occurs with Optifine running alongside Forge, so I would imagine Optifine can patch it..