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

Crash when loading multiple mods on macOS #828

Open
GameParrot opened this issue May 12, 2023 · 1 comment
Open

Crash when loading multiple mods on macOS #828

GameParrot opened this issue May 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@GameParrot
Copy link
Contributor

Describe the bug
When loading more than one mod on macOS, the game crashes. This crash does not occur on linux, even with the same mods.

To Reproduce
Steps to reproduce the behavior:

  1. Put 2 mods in the mods folder on macOS
  2. Try to play
  3. See crash

Expected behavior
Both mods should load

Desktop (please complete the following information):

  • OS: macOS
  • Version 0.9.x
  • Installation Type dmg

Additional context
Game log:

18:28:11 Info  [Launcher] Version: client 4b4d8b0 / manifest 1d012f2
18:28:11 Info  [Launcher] CPU: GenuineIntel Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz
18:28:11 Info  [Launcher] CPU supports SSSE3: YES
18:28:11 Trace [Launcher] Loading hybris libraries
18:28:11 Trace [REDIRECT] /data/data/com.mojang.minecraftpe to /Users/$USER/Library/Application Support/mcpelauncher/
18:28:11 Trace [REDIRECT] /data/data/Applications/Minecraft Bedrock Launcher.app/Contents/proc/56322/cmdline to /Users/$USER/Library/Application Support/mcpelauncher/
18:28:11 Trace [REDIRECT] /data/data/Applications/Minecraft Bedrock Launcher.app/Contents/MacOS/./mcpelauncher-client to /Users/$USER/Library/Application Support/mcpelauncher/
18:28:11 Trace [REDIRECT] /data/data to /Users/$USER/Library/Application Support/mcpelauncher/
18:28:11 Trace [REDIRECT] . to /Users/$USER/Library/Application Support/mcpelauncher/versions/1.19.80.02/assets/
18:28:11 Trace [LinkerUtils] Loaded OS library libm.dylib
18:28:11 Trace [LinkerUtils] Loaded OS library libz.dylib
18:28:11 Trace [LinkerUtils] Loaded OS library /Applications/Minecraft Bedrock Launcher.app/Contents/Resources/mcpelauncher/lib/native/x86_64/libfmod.dylib
18:28:11 Info  [ModLoader] Loading mods
18:28:11 Info  [ModLoader] Loading mod: libmcpelauncherdcblock.so
18:28:11 Info  [ModLoader] Loading mod: libmcpelaunchershadersmod.so
Signal 11 received
Backtrace elements: 4
#0 0   mcpelauncher-client                 0x000000010bb7aee8 _ZN12CrashHandler12handleSignalEiPv + 344
#1 1   mcpelauncher-client                 0x000000010bb7b315 _ZN12CrashHandler15handle_fs_faultEiPvS0_ + 133
#2 2   libsystem_platform.dylib            0x00007ff805d00dfd _sigtramp + 29
#3 3   ???                                 0x00007ff7b46dcd10 0x0 + 140701860744464
Dumping stack...
#9 LINKER (null)+0x1111ac1da in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0x2c1da [0x1111ac1da]
#10 LINKER (null)+0x11118f2d0 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0xf2d0 [0x11118f2d0]
#18 LINKER (null)+0x1111ba068 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0x3a068 [0x1111ba068]
#20 LINKER (null)+0x1111ac1a2 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0x2c1a2 [0x1111ac1a2]
#152 LINKER (null)+0x1111ac1c9 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0x2c1c9 [0x1111ac1c9]
#158 LINKER (null)+0x154 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0xf144 [0x11118f144]
#159 LINKER (null)+0x1111ac1c9 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0x2c1c9 [0x1111ac1c9]
#164 LINKER (null)+0x154 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0xf144 [0x11118f144]
#165 LINKER (null)+0x1111ac1c9 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0x2c1c9 [0x1111ac1c9]
#168 LINKER (null)+0x171 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0xf161 [0x11118f161]
#181 LINKER (null)+0x0 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0xeff0 [0x11118eff0]
#189 LINKER (null)+0x0 in /Users/$USER/Library/Application Support/mcpelauncher/mods/libmcpelaunchershadersmod.so+0xeff0 [0x11118eff0]
program failed with unix signal number: 11

Process exited with unexpected exit code: 11

Mods: https://github.com/GameParrot/mcpelauncher-dcblock and https://github.com/GameParrot/mcpelauncher-shadersmod

@GameParrot GameParrot added the bug Something isn't working label May 12, 2023
@ChristopherHX
Copy link
Member

I can put two stable mods in the mods folder on macOS/x86_64.

Your mods don't have any kind error handling and it crashs inside your mod. You should attach gdb to your mod and find out were your mod ends up in an inconsistent state if two mods are loaded.

I also suggest to turn off hiding symbols to make the stacktrace readable, my original mcpelauncher-updates mod had stripped all debuginfo to make it harder to decompile and understand the code.

I agree that debugging android code should be made easier if possible.

  • patch the android binaries ahead of time after the crash handler stored into a file were to patch instructions (to make lldb and gdb work without ignoring signals, this is easier on m1(arm64) due to fixed width 4byte instructions )
  • find out how to load the elf debugging information into lldb, the best way would be to automate this to be able to set breakpoits easier in code of mods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants