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 joining some LAN games #794

Closed
GameParrot opened this issue Feb 19, 2023 · 3 comments · Fixed by minecraft-linux/libc-shim#21
Closed

Crash when joining some LAN games #794

GameParrot opened this issue Feb 19, 2023 · 3 comments · Fixed by minecraft-linux/libc-shim#21
Labels
bug Something isn't working

Comments

@GameParrot
Copy link
Contributor

GameParrot commented Feb 19, 2023

Describe the bug
When trying to connect to a LAN game that is on a different computer, the game crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Host a LAN game on another device NOT running mcpelauncher (preferably iOS device)
  2. Try to join that LAN game through the launcher
  3. See error

Expected behavior
You should be able to join the game
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux
  • Version [e.g. v0.8.1-AppImage-x86_64 (build 701)]
  • Installation Type any

Additional context
Crash log:

10:27:52 Info  [Launcher] Version: client 53cc5d9 / manifest 342bd6f
10:27:52 Info  [Launcher] CPU: AuthenticAMD AMD Ryzen 9 5900X 12-Core Processor            
10:27:52 Info  [Launcher] CPU supports SSSE3: YES
10:27:52 Trace [Launcher] Loading hybris libraries
10:27:52 Trace [REDIRECT] /data/data/com.mojang.minecraftpe to /home/gameparrot/.var/app/io.mrarm.mcpelauncher/data/mcpelauncher/
10:27:52 Trace [REDIRECT] /data/data/usr/local/proc/1924778/cmdline to /home/gameparrot/.var/app/io.mrarm.mcpelauncher/data/mcpelauncher/
10:27:52 Trace [REDIRECT] /data/data/usr/local/bin/mcpelauncher-client to /home/gameparrot/.var/app/io.mrarm.mcpelauncher/data/mcpelauncher/
10:27:52 Trace [REDIRECT] /data/data to /home/gameparrot/.var/app/io.mrarm.mcpelauncher/data/mcpelauncher/
10:27:52 Trace [REDIRECT] . to /home/gameparrot/.local/share/mcpelauncher/versions/1.19.62.01/assets/
10:27:52 Trace [LinkerUtils] Loaded OS library libm.so.6
10:27:52 Trace [LinkerUtils] Loaded OS library libz.so.1
10:27:52 Trace [LinkerUtils] Loaded OS library /home/gameparrot/Documents/Development/mcpelauncher/more/mcpelauncher-manifest/mcpelauncher-linux-bin/lib/native/x86_64/libfmod.so.12.0
10:27:52 Info  [Launcher] Loading gamepad mappings
10:27:52 Trace [Launcher] Loading gamepad mappings: /usr/local/share/mcpelauncher/gamecontrollerdb.txt
10:27:52 Trace [Launcher] Loading gamepad mappings: /usr/local/share/mcpelauncher/gamecontrollerdb.txt
10:27:52 Trace [Launcher] Loading gamepad mappings: /home/gameparrot/Documents/Development/mcpelauncher/more/mcpelauncher-manifest/build/gamecontrollerdb/gamecontrollerdb.txt
10:27:52 Info  [Launcher] Creating window
10:27:52 Trace [Launcher] Loading Minecraft library
Found hook: _ZN11AppPlatform16showMousePointerEv @ 0x666b10
Found hook: _ZN11AppPlatform16hideMousePointerEv @ 0x666af0
10:27:52 Info  [Launcher] Loaded Minecraft library
10:27:52 Debug [Launcher] Minecraft is at offset 0x7F4E1A600000
10:27:52 Info  [Launcher] Game version: 0.0.0.0
10:27:52 Info  [Launcher] Applying patches
10:27:52 Debug [CorePatches] Failed to patch, vtable _ZTV21AppPlatform_android23 not found
10:27:52 Info  [Launcher] Initializing JNI
10:27:52 Error [JniSupport] Missing native symbol: Java_com_mojang_minecraftpe_MainActivity_nativeRegisterThis
10:27:52 Error [JniSupport] Missing native symbol: Java_com_mojang_minecraftpe_MainActivity_nativeInitializeWithApplicationContext
10:27:52 Error [JniSupport] Missing native symbol: Java_com_mojang_minecraftpe_MainActivity_nativeUnregisterThis
10:27:52 Error [JniSupport] Missing native symbol: Java_com_mojang_minecraftpe_MainActivity_nativeinitializeLibHttpClient
10:27:52 Error [JniSupport] Missing native symbol: Java_com_microsoft_xal_browser_WebView_urlOperationSucceeded
10:27:52 Error [JniSupport] Missing native symbol: Java_com_mojang_minecraftpe_PlayIntegrity_nativePlayIntegrityComplete
10:27:52 Info  [Launcher] Executing main thread
10:27:52 Trace [Minecraft] Entering JNI_OnLoad 0x7f4e337fe640
10:27:52 Trace [Minecraft] JNI_OnLoad completed
10:27:52 Trace [JniSupport] Invoking nativeRegisterThis
10:27:52 Trace [JniSupport] Invoking ANativeActivity_onCreate
10:27:52 Warn  [Main] Android stub called
10:27:52 Warn  [Main] Android stub called
10:27:52 Warn  [Main] Android stub called
10:27:52 Warn  [Main] Android stub called
10:27:52 Info  [Minecraft] android_main starting. internalDataPath is '/internal', externalDataPath is '/external'
10:27:52 Trace [JniSupport] Invoking start activity callbacks
10:27:52 Error [MCPE] *** setCachedDeviceId(0474f379-6878-4e31-8eae-53314434793c)
10:27:52 Info  [Bedrock] configureBreakpad with directory: /crash, sessionid is: 0ccb6061-4be7-4891-82ce-f065826aac22
10:27:52 Info  [Bedrock] configureBreakpad called, directory is: /crash, sessionid is: 0ccb6061-4be7-4891-82ce-f065826aac22
10:27:52 Info  [Minecraft] NO LOG FILE! - AppPlatform_android::setStorageDirectory - using External dir (NEW) - CurrentFileStoragePath is now '/home/gameparrot/.var/app/io.mrarm.mcpelauncher/data/mcpelauncher/'
10:27:52 Warn  [Minecraft] NO LOG FILE! - [Graphics] The graphics context was gained
10:27:52 Warn  [Minecraft] NO LOG FILE! - [Graphics] The graphics context was gained
10:27:52 Warn  [Minecraft] MinecraftGame::init && MinecraftGame::setSize!
10:27:52 Warn  [FakeEGL] eglQueryString 308d
10:27:52 Warn  [Main] Android stub called
10:27:52 Warn  [Main] Android stub called
10:27:52 Warn  [Minecraft] NO LOG FILE! - [Graphics] The graphics context was gained
10:27:54 Warn  [Main] Android stub called
10:27:54 Debug [HttpCallStaticGlue] Successfully registerered HttpCall methods
10:27:54 Debug [XboxLiveAppConfig] Successfully registerered XboxLiveAppConfig methods
10:27:54 Debug [XSAPI.Android] Successfully registerered HttpCall tcuiMethods
10:27:55 Info  [Minecraft] NO LOG FILE! - Time played notifier not required for 'en'
10:28:27 Info  [Minecraft] NO LOG FILE! - opening /home/gameparrot/.var/app/io.mrarm.mcpelauncher/data/mcpelauncher/minecraftpe/blob_cache
terminate called after throwing an instance of 'std::runtime_error'
  what():  Unknown af_family
Signal 6 received
Backtrace elements: 11
#0 /usr/local/bin/mcpelauncher-client(_ZN12CrashHandler12handleSignalEiPv+0xfa) [0x6762ca]
#1 /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f4e4f3d4520]
#2 /lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x12c) [0x7f4e4f428a7c]
#3 /lib/x86_64-linux-gnu/libc.so.6(raise+0x16) [0x7f4e4f3d4476]
#4 /lib/x86_64-linux-gnu/libc.so.6(abort+0xd3) [0x7f4e4f3ba7f3]
#5 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xa2bbe) [0x7f4e4f67cbbe]
#6 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xae24c) [0x7f4e4f68824c]
#7 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xae2b7) [0x7f4e4f6882b7]
#8 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xae518) [0x7f4e4f688518]
#9 /usr/local/bin/mcpelauncher-client(_ZN4shim6socketENS_6bionic9af_familyENS0_8socktypeENS0_7ipprotoE+0xa2) [0x69f982]
#10 LINKER rtc::getifaddrs(ifaddrs**)+0x36 in /home/gameparrot/.local/share/mcpelauncher/versions/1.19.62.01/lib/x86_64/libminecraftpe.so+0x0xc2859b6 [0x0x7f4e268859b6]
Dumping stack...
#11 LINKER rtc::getifaddrs(ifaddrs**)+0x36 in /home/gameparrot/.local/share/mcpelauncher/versions/1.19.62.01/lib/x86_64/libminecraftpe.so+0xc2859b6 [0x7f4e268859b6]
#516 LINKER rtc::getifaddrs(ifaddrs**)+0x36 in /home/gameparrot/.local/share/mcpelauncher/versions/1.19.62.01/lib/x86_64/libminecraftpe.so+0xc2859b6 [0x7f4e268859b6]
#946 LINKER (null)+0x7f4e276247ab in /home/gameparrot/.local/share/mcpelauncher/versions/1.19.62.01/lib/x86_64/libminecraftpe.so+0xd0247ab [0x7f4e276247ab]
#951 LINKER (null)+0x7f4e27dca760 in /home/gameparrot/.local/share/mcpelauncher/versions/1.19.62.01/lib/x86_64/libminecraftpe.so+0xd7ca760 [0x7f4e27dca760]
#952 LINKER (null)+0x268 in /home/gameparrot/.local/share/mcpelauncher/versions/1.19.62.01/lib/x86_64/libminecraftpe.so+0xd0357f8 [0x7f4e276357f8]
#960 LINKER (null)+0x7f4e27672780 in /home/gameparrot/.local/share/mcpelauncher/versions/1.19.62.01/lib/x86_64/libminecraftpe.so+0xd072780 [0x7f4e27672780]
#978 LINKER (null)+0x7f4e2767179b in /home/gameparrot/.local/share/mcpelauncher/versions/1.19.62.01/lib/x86_64/libminecraftpe.so+0xd07179b [0x7f4e2767179b]
program failed with unix signal number: 6

Process exited with unexpected exit code: 6

gdb:

Thread 40 "NetherNet Netwo" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff467fa640 (LWP 1926438)]
__pthread_kill_implementation (no_tid=0, signo=6, threadid=140734376158784) at ./nptl/pthread_kill.c:44
44	./nptl/pthread_kill.c: No such file or directory.

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140734376158784) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140734376158784) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140734376158784, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff73a1476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff73877f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff7649bbe in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff765524c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x00007ffff76552b7 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6
#8  0x00007ffff7655518 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x000000000069f982 in shim::socket(shim::bionic::af_family, shim::bionic::socktype, shim::bionic::ipproto) ()
#10 0x00007fffce8859b6 in ?? ()
#11 0x0000000000000000 in ?? ()

It does not seem to crash when connecting to another game running on the same machine (dedicated server or another instance of mcpelauncher)
Also, it only seems to happen when connecting to certain devices (including iOS devices). Connecting 2 devices running mcpelauncher works.
This may be related to BDS-18090
I do not know if this is an issue with the Launcher (I don't have a real android device to test it on)
Realms and external servers work fine.
I do not think this has anything to do with Xbox live (crash still occurs of both devices are signed out).

@GameParrot GameParrot added the bug Something isn't working label Feb 19, 2023
@GameParrot GameParrot changed the title Crash when joining LAN game not on same system Crash when joining some LAN games Feb 19, 2023
@ChristopherHX
Copy link
Member

ChristopherHX commented Feb 19, 2023

Has already been reported here: #757

Please add a breakpoint here: https://github.com/minecraft-linux/libc-shim/blob/ef8c417f6e4e6104839124257c0eaa5d93580c33/src/network.cpp#L47

And provide the number passed to the function, the built in error message is just insufficient.

libc-shim (e.g. socket()) should probably catch these errors, set the errno state and only log a warning for debugging.

@GameParrot
Copy link
Contributor Author

Making it not return errors when unknown socket families, af_family, and ioctls are called seems to make it not crash and actually connect

@GameParrot
Copy link
Contributor Author

Has already been reported here: #757

Please add a breakpoint here: https://github.com/minecraft-linux/libc-shim/blob/ef8c417f6e4e6104839124257c0eaa5d93580c33/src/network.cpp#L47

And provide the number passed to the function, the built in error message is just insufficient.

libc-shim (e.g. socket()) should probably catch these errors, set the errno state and only log a warning for debugging.

The number passed is 16.

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

Successfully merging a pull request may close this issue.

2 participants