CICADA

CICADA

2M Downloads

ImGui causes failure to launch on MacOS with ARM-chipset

AgentK20 opened this issue ยท 1 comments

commented

The version that was released yesterday includes a hard dependency on the ImGui library, but it appears that this library is only being packaged and distributed for x86 chipsets. Because of this, any ARM64-based Mac (e.g. M1, M2, M3, M4) will crash on launch with the following stack trace:

---- Minecraft Crash Report ----
// Who set us up the TNT?

Time: 2025-03-19 21:02:19
Description: Initializing game

java.lang.UnsatisfiedLinkError: /private/var/folders/2s/4ccw2g2n5hx1173v7lbl_5h80000gn/T/imgui-java-natives/1.86.11/libimgui-java64.dylib: dlopen(/private/var/folders/2s/4ccw2g2n5hx1173v7lbl_5h80000gn/T/imgui-java-natives/1.86.11/libimgui-java64.dylib, 0x0001): tried: '/private/var/folders/2s/4ccw2g2n5hx1173v7lbl_5h80000gn/T/imgui-java-natives/1.86.11/libimgui-java64.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/2s/4ccw2g2n5hx1173v7lbl_5h80000gn/T/imgui-java-natives/1.86.11/libimgui-java64.dylib' (no such file), '/private/var/folders/2s/4ccw2g2n5hx1173v7lbl_5h80000gn/T/imgui-java-natives/1.86.11/libimgui-java64.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
	at [email protected]/jdk.internal.loader.NativeLibraries.load(Native Method)
	at [email protected]/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
	at [email protected]/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
	at [email protected]/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
	at [email protected]/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394)
	at [email protected]/java.lang.Runtime.load0(Runtime.java:755)
	at [email protected]/java.lang.System.load(System.java:1957)
	at knot//imgui.ImGui.<clinit>(ImGui.java:63)
	at knot//nl.enjarai.cicada.api.imgui.ImMyGui.init(ImMyGui.java:23)
	at knot//MC//net.minecraft.client.util.Window.handler$dcd000$cicada$initImgui(Window.java:1527)
	at knot//MC//net.minecraft.client.util.Window.<init>(Window.java:125)
	at knot//MC//net.minecraft.client.util.WindowProvider.createWindow(WindowProvider.java:21)
	at knot//MC//net.minecraft.client.MinecraftClient.<init>(MinecraftClient.java:486)
	at knot//net.minecraft.client.main.Main.main(Main.java:211)
	at app//net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	at app//net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at app//net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at app//org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:105)
	at app//org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
	at app//org.prismlauncher.EntryPoint.main(EntryPoint.java:70)

Rolling back to 0.10.2 fixes this. I also believe that #5 is likely a dupe of this issue, but didn't have a crash log or stack trace so I elected to open a new one. From what I can tell, ImGui does support arm64 on MacOS, so this is more likely a packaging or distribution issue. Happy to lend a hand if you need a guinea pig to test different builds and don't have an arm64 mac yourself, just ping me here or I'm @agentk on Discord.

commented

Right, I was made aware of this via discord as well, thanks for reporting. I had to update the bundled version of ImGui to support M-series macs. I've also added additional error handling to prevent issues like this from causing crashes in the future. See version 0.11.1.