Minecraftforge: Apple Silicon Mac GLFW error on startup

Created on 21 Dec 2020  ·  11Comments  ·  Source: MinecraftForge/MinecraftForge

Minecraft Version: 1.16.4

Forge Version: all versions from 35.1.4 to 35.1.13, as well as 35.0.0

Logs: https://paste.ee/p/lIYZ6

Steps to Reproduce:

  1. Simply install Forge with the vanilla minecraft launcher through Rosetta, or create a new blank forge instance in MultiMC, running either natively (with this guide) or also through Rosetta.
  2. Launch the game.

Description of issue:

Upon launch of any 1.16.4 version with Forge installed, using native or Intel LWJGL, a GLFW error causes the game to crash:

java.lang.IllegalStateException: GLFW error before init:
[0x10008]Cocoa: Failed to find service port for display

Some say they have fixed this error using the argument -Dfml.earlyprogresswindow=false, but for me and several others, adding the argument just causes the GLFW error to display in a popup window, and the error in the log is mostly the same:
image

[17:14:59] [Render thread/ERROR] [mojang/GLX]: GLFW error collected during initialization: GLFW error during init: [0x10008]6123248856
[17:15:29] [Render thread/WARN] [minecraft/Main]: Failed to create window: 
net.minecraft.client.MainWindow$GlException: GLFW error 65544: Cocoa: Failed to find service port for display

This does not happen in Vanilla, and I have also observed it in many forge 1.15.2 versions. I have also observed that the instance will very rarely launch successfully. I have no good explanation for this, and it's extremely inconsistent, but for some reason, sometimes it just decides it will launch fine, and in these cases the game will be perfectly playable.

In the instances I have been able to launch it, it has generally been on a new launch of MultiMC, which makes me wonder if this has something to do with GLFW initializing before forge; if it runs as a separate background process, it becomes a race to see which one inits first, and if you keep trying to launch the same instance, the code for GLFW is cached or something. Just a complete guess, I don't know how Forge uses GLFW internally.

1.15 1.16 Blocked Upstream Bug Confirmed Not Us Vanilla Bug wontfix

Most helpful comment

To clarify, this is indeed something that appears to be a issue on Apple's end.
First few google results say it has to do with some of the dual monitor systems. So if you have a second monitor, or a second monitor port even if unused, you could try disabling that.
If you used -Dfml.earlyprogresswindow=false then all of our graphics related changes to startup will be turned off. So if you still get it it's not us.

It may appear to be Forge's issue because we do more work before loading Minecraft, thus causing it to delay touching the GL context. Which could mean that whatever background task you were talking about is more likely to complete first and trigger the issue. But that doesn't mean it's caused by Forge.

However, IF you can find someone who can reproduce {Because all our mac users/devs can't} then we could try to remediate it on our end. But Macs are notorious for doing graphics wrong, and not many people in the community have them. So developing for them is damn near impossible.

All 11 comments

This is an issue with GLFW and Apple Silicon's Rosetta technology.
We cannot fix this.
Mojang cannot fix this.
Nobody but Apple can fix this.
This is a problem with Apple.
Apple must fix this.
We cannot fix this.

I've said it, but it's not going through.
WE CANNOT FIX THIS.

To clarify, this is indeed something that appears to be a issue on Apple's end.
First few google results say it has to do with some of the dual monitor systems. So if you have a second monitor, or a second monitor port even if unused, you could try disabling that.
If you used -Dfml.earlyprogresswindow=false then all of our graphics related changes to startup will be turned off. So if you still get it it's not us.

It may appear to be Forge's issue because we do more work before loading Minecraft, thus causing it to delay touching the GL context. Which could mean that whatever background task you were talking about is more likely to complete first and trigger the issue. But that doesn't mean it's caused by Forge.

However, IF you can find someone who can reproduce {Because all our mac users/devs can't} then we could try to remediate it on our end. But Macs are notorious for doing graphics wrong, and not many people in the community have them. So developing for them is damn near impossible.

I will just add speculation here that it could be an incompatibility with new mac silicon and LWJGL as well.. based on this: https://github.com/LWJGL/lwjgl3/issues/601 there doesn't even seem to be native ARM64 libs for M1 yet, so this is probably an X86 emulation thing that's going wrong...

Thanks for the response guys. I should probably clarify a couple things:

This is an issue with GLFW and Apple Silicon's Rosetta technology.

there doesn't even seem to be native ARM64 libs for M1 yet, so this is probably an X86 emulation thing that's going wrong...

This is not true. This is completely independent of Rosetta; as I wrote in my original post, it is possible to compile/obtain all dependencies for Minecraft to run natively on M1 (even MultiMC.) You can see in the logs that this is the case, since I'm using an aarch64 JVM and the JNI requires a consistent architecture for native libraries. Note however that the issue still occurs on Rosetta, which is why I'm writing this as a generic "apple silicon" issue (it does not occur on x86_64 macs running the same big sur).

That being said, it is true that LWJGL themselves do not yet ship native libraries, and that they are probably not tested nearly as thoroughly due to a lack of CI and other testing facilities. So maybe that's what it is.

However, IF you can find someone who can reproduce {Because all our mac users/devs can't} then we could try to remediate it on our end. But Macs are notorious for doing graphics wrong, and not many people in the community have them. So developing for them is damn near impossible.

Fair enough. It should be easy to re-create on any M1 system though, as far as I know.

Reproduced:
I am using _x86_64_ MultiMC though.

MultiMC version: 0.6.12-develop-1429


Minecraft folder is:
/Applications/MultiMC.app/Contents/MacOS/instances/1.16.4-Optifine/.minecraft


Java path is:
/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/bin/java


Checking Java version...
Java is version 1.8.0_275, using 32-bit architecture, from Azul Systems, Inc..


Your Java architecture is not matching your system architecture. You might want to install a 64bit Java version.


Main Class:
  io.github.zekerzhayard.forgewrapper.installer.Main

Native path:
  /Applications/MultiMC.app/Contents/MacOS/instances/1.16.4-Optifine/natives

Traits:
traits XR:Initial
traits FirstThreadOnMacOS

Libraries:
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-glfw/3.2.2/lwjgl-glfw-3.2.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-jemalloc/3.2.2/lwjgl-jemalloc-3.2.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-openal/3.2.2/lwjgl-openal-3.2.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-opengl/3.2.2/lwjgl-opengl-3.2.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-stb/3.2.2/lwjgl-stb-3.2.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl/3.2.2/lwjgl-3.2.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/mojang/patchy/1.1/patchy-1.1.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/java/dev/jna/jna/4.4.0/jna-4.4.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/ibm/icu/icu4j/66.1/icu4j-66.1.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/mojang/javabridge/1.0.22/javabridge-1.0.22.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/io/netty/netty-all/4.1.25.Final/netty-all-4.1.25.Final.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/google/guava/guava/21.0/guava-21.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/commons-io/commons-io/2.5/commons-io-2.5.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/commons-codec/commons-codec/1.10/commons-codec-1.10.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/mojang/brigadier/1.0.17/brigadier-1.0.17.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/mojang/datafixerupper/4.0.26/datafixerupper-4.0.26.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/mojang/authlib/2.1.28/authlib-2.1.28.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/it/unimi/dsi/fastutil/8.2.1/fastutil-8.2.1.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/apache/logging/log4j/log4j-api/2.11.2/log4j-api-2.11.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/apache/logging/log4j/log4j-core/2.11.2/log4j-core-2.11.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/io/github/zekerzhayard/ForgeWrapper/1.4.2/ForgeWrapper-1.4.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/minecraftforge/forge/1.16.4-35.1.4/forge-1.16.4-35.1.4-launcher.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/ow2/asm/asm/7.2/asm-7.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/ow2/asm/asm-commons/7.2/asm-commons-7.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/ow2/asm/asm-tree/7.2/asm-tree-7.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/ow2/asm/asm-util/7.2/asm-util-7.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/ow2/asm/asm-analysis/7.2/asm-analysis-7.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/cpw/mods/modlauncher/8.0.6/modlauncher-8.0.6.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/cpw/mods/grossjava9hacks/1.3.0/grossjava9hacks-1.3.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/minecraftforge/accesstransformers/2.2.0-shadowed/accesstransformers-2.2.0-shadowed.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/minecraftforge/eventbus/3.0.5-service/eventbus-3.0.5-service.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/minecraftforge/forgespi/3.2.0/forgespi-3.2.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/minecraftforge/coremods/3.0.0/coremods-3.0.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/electronwill/night-config/core/3.6.2/core-3.6.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/electronwill/night-config/toml/3.6.2/toml-3.6.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/jline/jline/3.12.1/jline-3.12.1.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/apache/maven/maven-artifact/3.6.0/maven-artifact-3.6.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/jodah/typetools/0.8.1/typetools-0.8.1.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/com/mojang/minecraft/1.16.4/minecraft-1.16.4-client.jar

Native libraries:
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-glfw/3.2.2/lwjgl-glfw-3.2.2-natives-macos.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-jemalloc/3.2.2/lwjgl-jemalloc-3.2.2-natives-macos.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-openal/3.2.2/lwjgl-openal-3.2.2-natives-macos.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-opengl/3.2.2/lwjgl-opengl-3.2.2-natives-macos.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-stb/3.2.2/lwjgl-stb-3.2.2-natives-macos.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2-natives-macos.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/org/lwjgl/lwjgl/3.2.2/lwjgl-3.2.2-natives-macos.jar
  /Applications/MultiMC.app/Contents/MacOS/libraries/ca/weblite/java-objc-bridge/1.0.0/java-objc-bridge-1.0.0-natives-osx.jar

Mods:
  [❌] OptiFine_1.16.4_HD_U_G5.jar (disabled)

Params:
  --username  --version MultiMC5 --gameDir /Applications/MultiMC.app/Contents/MacOS/instances/1.16.4-Optifine/.minecraft --assetsDir /Applications/MultiMC.app/Contents/MacOS/assets --assetIndex 1.16 --uuid  --accessToken  --userType  --versionType release --launchTarget fmlclient --fml.forgeVersion 35.1.4 --fml.mcVersion 1.16.4 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20201102.104115

Window size: 854 x 480

Java Arguments:
[-Xdock:icon=icon.png, -Xdock:name="MultiMC: 1.16.4-Optifine", -XstartOnFirstThread, -Xms204m, -Xmx2048m, -Duser.language=en]


Wrapper command is:
/Users/************/MCAppleSilicon/m1-multimc-hack/mcwrap.py


Minecraft process ID: 3863


Using onesix launcher.

2020-12-24 09:56:12,442 main WARN Advanced terminal features are not available in this environment
[09:56:12] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, r58Playz, --version, MultiMC5, --gameDir, /Applications/MultiMC.app/Contents/MacOS/instances/1.16.4-Optifine/.minecraft, --assetsDir, /Applications/MultiMC.app/Contents/MacOS/assets, --assetIndex, 1.16, --uuid, <PROFILE ID>, --accessToken, ❄❄❄❄❄❄❄❄, --userType, mojang, --versionType, release, --launchTarget, fmlclient, --fml.forgeVersion, 35.1.4, --fml.mcVersion, 1.16.4, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20201102.104115, --width, 854, --height, 480]
[09:56:12] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.0.6+85+master.325de55 starting: java version 1.8.0_275 by Azul Systems, Inc.
[09:56:12] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[09:56:12] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/Applications/MultiMC.app/Contents/MacOS/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar Service=ModLauncher Env=CLIENT
[LWJGL] GLFW_PLATFORM_ERROR error
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:105]:  Description : Cocoa: Failed to find service port for display
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:106]:  Stacktrace  :
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: org.lwjgl.glfw.GLFW.glfwInit(GLFW.java:830)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: net.minecraftforge.fml.loading.progress.ClientVisualization.initWindow(ClientVisualization.java:67)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: net.minecraftforge.fml.loading.progress.ClientVisualization.start(ClientVisualization.java:305)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: net.minecraftforge.fml.loading.progress.EarlyProgressVisualization.accept(EarlyProgressVisualization.java:37)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: net.minecraftforge.fml.loading.FMLLoader.setupLaunchHandler(FMLLoader.java:188)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: net.minecraftforge.fml.loading.FMLServiceProvider.initialize(FMLServiceProvider.java:94)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: cpw.mods.modlauncher.TransformationServiceDecorator.onInitialize(TransformationServiceDecorator.java:68)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: cpw.mods.modlauncher.TransformationServicesHandler.lambda$initialiseTransformationServices$7(TransformationServicesHandler.java:107)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: java.util.HashMap$Values.forEach(HashMap.java:981)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: cpw.mods.modlauncher.TransformationServicesHandler.initialiseTransformationServices(TransformationServicesHandler.java:107)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:59)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: cpw.mods.modlauncher.Launcher.run(Launcher.java:76)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: cpw.mods.modlauncher.Launcher.main(Launcher.java:66)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:50)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: java.lang.reflect.Method.invoke(Method.java:498)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: org.multimc.EntryPoint.listen(EntryPoint.java:143)
[09:56:12] [main/INFO] [STDERR/]: [org.lwjgl.glfw.GLFWErrorCallback$1:invoke:110]: org.multimc.EntryPoint.main(EntryPoint.java:34)
[09:56:13] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlclient' with arguments [--version, MultiMC5, --gameDir, /Applications/MultiMC.app/Contents/MacOS/instances/1.16.4-Optifine/.minecraft, --assetsDir, /Applications/MultiMC.app/Contents/MacOS/assets, --uuid, <PROFILE ID>, --username, r58Playz, --assetIndex, 1.16, --accessToken, ❄❄❄❄❄❄❄❄, --userType, mojang, --versionType, release, --width, 854, --height, 480]
[09:56:16] [Render thread/INFO] [mojang/YggdrasilAuthenticationService]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[09:56:16] [Render thread/INFO] [minecraft/Minecraft]: Setting user: r58Playz
[09:56:16] [Render thread/INFO] [minecraft/Minecraft]: Backend library: LWJGL version 3.2.3 SNAPSHOT
[09:56:16] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:func_179870_a:123]: ---- Minecraft Crash Report ----
// My bad.

Time: 12/24/20 9:56 AM
Description: Initializing game

java.lang.IllegalStateException: GLFW error before init: [0x10008]Cocoa: Failed to find service port for display
    at com.mojang.blaze3d.platform.GLX.func_229879_lam_(SourceFile:64) ~[?:?] {re:classloading}
    at net.minecraft.client.MainWindow.func_211162_a(MainWindow.java:131) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
    at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:63) ~[?:?] {re:classloading}
    at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:1060) ~[?:?] {re:classloading}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:416) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
    at net.minecraft.client.main.Main.main(Main.java:149) ~[minecraft-1.16.4-client.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_275] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_275] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_275] {}
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_275] {}
    at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.4-35.1.4-launcher.jar:35.1] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {}
    at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:50) [ForgeWrapper-1.4.2.jar:?] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_275] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_275] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_275] {}
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_275] {}
    at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?] {}
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?] {}
    at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?] {}
    at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
    at com.mojang.blaze3d.platform.GLX.func_229879_lam_(SourceFile:64) ~[?:?] {re:classloading}
    at net.minecraft.client.MainWindow.func_211162_a(MainWindow.java:131) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
    at com.mojang.blaze3d.platform.GLX._initGlfw(SourceFile:63) ~[?:?] {re:classloading}
    at com.mojang.blaze3d.systems.RenderSystem.initBackendSystem(SourceFile:1060) ~[?:?] {re:classloading}
    at net.minecraft.client.Minecraft.<init>(Minecraft.java:416) ~[?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
-- Initialization --
Details:
Stacktrace:
    at net.minecraft.client.main.Main.main(Main.java:149) ~[minecraft-1.16.4-client.jar:?] {re:classloading,pl:runtimedistcleaner:A}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_275] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_275] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_275] {}
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_275] {}
    at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.4-35.1.4-launcher.jar:35.1] {}
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {}
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {}
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {}
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {}
    at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:50) [ForgeWrapper-1.4.2.jar:?] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_275] {}
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_275] {}
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_275] {}
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_275] {}
    at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?] {}
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?] {}
    at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?] {}
    at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?] {}


-- System Details --
Details:
    Minecraft Version: 1.16.4
    Minecraft Version ID: 1.16.4
    Operating System: Mac OS X (aarch64) version 11.1
    Java Version: 1.8.0_275, Azul Systems, Inc.
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Azul Systems, Inc.
    Memory: 639593560 bytes (609 MB) / 962592768 bytes (918 MB) up to 1908932608 bytes (1820 MB)
    CPUs: 8
    JVM Flags: 2 total; -Xms204m -Xmx2048m
    Launched Version: MultiMC5
    Backend library: LWJGL version 3.2.3 SNAPSHOT
    Backend API: NO CONTEXT
    GL Caps: 
    Using VBOs: Yes
    Is Modded: Definitely; Client brand changed to 'forge'
    Type: Client (map_client.txt)
    CPU: <unknown>
[09:56:16] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:func_179870_a:123]: #@!@# Game crashed! Crash report saved to: #@!@# /Applications/MultiMC.app/Contents/MacOS/instances/1.16.4-Optifine/.minecraft/crash-reports/crash-2020-12-24_09.56.16-client.txt

Process exited with code 0.
Clipboard copy at: 24 Dec 2020 09:56:20 -0800

Yes, there are no M1 LWJGL natives, so Rosetta is interpreting them for x86_64 regardless of how you start the game.
As demonstrated above, it's an Apple API issue.

Still not something we, or anyone but Apple, can fix.

Yes, there are no M1 LWJGL natives, so Rosetta is interpreting them for x86_64 regardless of how you start the game.
As demonstrated above, it's an Apple API issue.

Still not something we, or anyone but Apple, can fix.

That's simply not true. Have you not read my post? Do you need me to provide the libraries themselves so you can run file on them? They are _arm64 natives_, compiled _from scratch_. This is not a Rosetta issue.

Great. It's compiled. they've supported arm for a while. But it's not compatible, and i don't see any fixes in their repository to work around the missing APIs on the newer Mac system.
This is an APPLE thing.

It seems to be a bug in upstream macOS. I've removed the failing call in glfw and forge works fine.

I've built a version of glfw with the failing function just returning null (https://github.com/0xQSL/glfw/commit/310d5c356f00e1b2908d67ae308943fd59dcec00)

you cat get the lib here:
https://github.com/0xQSL/m1-multimc-hack/blob/fix-forge/lwjglnatives/libglfw.dylib

I'm able to run forge modpacks with this. FPS are quite good.

Yes, they deprecated the APIs that GLFW/LWJGL use. Hence my insistence from the start that this is an Apple thing.
Rosetta, when interpreting the standard x86_64 libraries, makes a call to an API that Apple removed, hence your thing working when that API is no longer called.

We can only wait until a fix is issued upstream.

This is not about rosetta. I'm using native java/glfw on aarch64. It seems to be just a change to display handling code. The same issue appears with airplay displays.

I do agree that forge can't fix this. It should be fixed in glfw/macOS

Was this page helpful?
1 / 5 - 1 ratings