ptitSeb / box64

Box64 - Linux Userspace x86_64 Emulator with a twist, targeted at ARM64 Linux devices
https://box86.org
MIT License
3.85k stars 279 forks source link

Crashes When Trying to Run Badlion(Minecraft Client) #379

Open starlite-developer opened 2 years ago

starlite-developer commented 2 years ago

Before I explain my problem I am already aware that:

What I am looking for is a way past the error or at least some explanation of why the error is occurring and maybe a bug fix in the future.

I started by trying to run the BadlionClient AppImage file on my computer Here is my computer info:

# Output of uname -a
Linux server 5.13.0-1036-oracle #43~20.04.1-Ubuntu SMP Tue Jun 14 01:06:54 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

When I try to run the linux download from the official Badlion website:

-bash: ./BadlionClient: cannot execute binary file: Exec format error

So I decided to use box64 to solve this problem as it is a VERY useful for arm processors :)

# force box64 to run AppImage (doesn't autodetect for some reason)
box64 ./BadlionClient

Here is the output:

ubuntu@server:~/badlion-client$ box64 ./BadlionClient
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096
Box64 with Dynarec v0.1.9 642260b built on Aug  9 2022 14:36:38
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 30 Env var
Looking for ./BadlionClient
Rename process to "BadlionClient"
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using native(wrapped) libz.so.1
Using native(wrapped) libfuse.so.2
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096
Box64 with Dynarec v0.1.9 642260b built on Aug  9 2022 14:36:38
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 35 Env var
Looking for /tmp/.mount_BadliodB3Rl2/BadlionClient
Rename process to "BadlionClient"
Using emulated /tmp/.mount_BadliodB3Rl2/libffmpeg.so
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using native(wrapped) libgobject-2.0.so.0
Using native(wrapped) libglib-2.0.so.0
Using native(wrapped) libxshmfence.so.1
Using native(wrapped) libgio-2.0.so.0
Using native(wrapped) libgmodule-2.0.so.0
Using native(wrapped) libnss3.so
Using native(wrapped) libnssutil3.so
Using native(wrapped) libsmime3.so
Using native(wrapped) libnspr4.so
Using native(wrapped) libatk-1.0.so.0
Using native(wrapped) libatk-bridge-2.0.so.0
Using native(wrapped) libSM.so.6
Using native(wrapped) libICE.so.6
Using native(wrapped) libXau.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libdbus-1.so.3
Using native(wrapped) libdrm.so.2
Using native(wrapped) libgdk_pixbuf-2.0.so.0
Using native(wrapped) libgtk-3.so.0
Using native(wrapped) libgdk-3.so.0
Using native(wrapped) libpangocairo-1.0.so.0
Using native(wrapped) libpango-1.0.so.0
Using native(wrapped) libcairo.so.2
Using native(wrapped) libm.so.6
Using native(wrapped) libX11.so.6
Using native(wrapped) libXcomposite.so.1
Using native(wrapped) libXdamage.so.1
Using native(wrapped) libXext.so.6
Using native(wrapped) libXdmcp.so.6
Using native(wrapped) libXfixes.so.3
Using native(wrapped) libXrandr.so.2
Using native(wrapped) libXrender.so.1
Using native(wrapped) libexpat.so.1
Using native(wrapped) libxkbcommon.so.0
Using native(wrapped) libgbm.so.1
Using native(wrapped) libasound.so.2
Using native(wrapped) libatspi.so.0
Using native(wrapped) libcups.so.2
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Warning: Global Symbol OPENSSL_memory_alloc not found, cannot apply R_X86_64_GLOB_DAT @0xffffb5c7b348 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Warning: Global Symbol OPENSSL_memory_free not found, cannot apply R_X86_64_GLOB_DAT @0xffffb5c7b350 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Warning: Global Symbol sdallocx not found, cannot apply R_X86_64_GLOB_DAT @0xffffb5c7b358 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Warning: Global Symbol OPENSSL_memory_get_size not found, cannot apply R_X86_64_GLOB_DAT @0xffffb5c7b360 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096
Box64 with Dynarec v0.1.9 642260b built on Aug  9 2022 14:36:38
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 35 Env var
Looking for /tmp/.mount_BadliodB3Rl2/BadlionClient
argv[1]="--type=zygote"
argv[2]="--no-zygote-sandbox"
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:4096
Box64 with Dynarec v0.1.9 642260b built on Aug  9 2022 14:36:38
BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/
BOX64_PATH: ./:bin/
Counted 38 Env var
Looking for /tmp/.mount_BadliodB3Rl2/BadlionClient
argv[1]="--type=zygote"
Rename process to "BadlionClient"
Using emulated /tmp/.mount_BadliodB3Rl2/libffmpeg.so
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using native(wrapped) libgobject-2.0.so.0
Using native(wrapped) libglib-2.0.so.0
Using native(wrapped) libxshmfence.so.1
Using native(wrapped) libgio-2.0.so.0
Using native(wrapped) libgmodule-2.0.so.0
Using native(wrapped) libnss3.so
Using native(wrapped) libnssutil3.so
Using native(wrapped) libsmime3.so
Using native(wrapped) libnspr4.so
Using native(wrapped) libatk-1.0.so.0
Using native(wrapped) libatk-bridge-2.0.so.0
Using native(wrapped) libSM.so.6
Using native(wrapped) libICE.so.6
Using native(wrapped) libXau.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libdbus-1.so.3
Using native(wrapped) libdrm.so.2
Using native(wrapped) libgdk_pixbuf-2.0.so.0
Rename process to "BadlionClient"
Using native(wrapped) libgtk-3.so.0
Using native(wrapped) libgdk-3.so.0
Using native(wrapped) libpangocairo-1.0.so.0
Using native(wrapped) libpango-1.0.so.0
Using native(wrapped) libcairo.so.2
Using native(wrapped) libm.so.6
Using native(wrapped) libX11.so.6
Using native(wrapped) libXcomposite.so.1
Using native(wrapped) libXdamage.so.1
Using native(wrapped) libXext.so.6
Using native(wrapped) libXdmcp.so.6
Using native(wrapped) libXfixes.so.3
Using native(wrapped) libXrandr.so.2
Using native(wrapped) libXrender.so.1
Using native(wrapped) libexpat.so.1
Using native(wrapped) libxkbcommon.so.0
Using native(wrapped) libgbm.so.1
Using native(wrapped) libasound.so.2
Using native(wrapped) libatspi.so.0
Using native(wrapped) libcups.so.2
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using emulated /tmp/.mount_BadliodB3Rl2/libffmpeg.so
Using native(wrapped) libdl.so.2
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) librt.so.1
Using native(wrapped) libgobject-2.0.so.0
Using native(wrapped) libglib-2.0.so.0
Using native(wrapped) libxshmfence.so.1
Using native(wrapped) libgio-2.0.so.0
Using native(wrapped) libgmodule-2.0.so.0
Using native(wrapped) libnss3.so
Using native(wrapped) libnssutil3.so
Warning: Global Symbol OPENSSL_memory_alloc not found, cannot apply R_X86_64_GLOB_DAT @0xffffaf23e348 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Warning: Global Symbol OPENSSL_memory_free not found, cannot apply R_X86_64_GLOB_DAT @0xffffaf23e350 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Warning: Global Symbol sdallocx not found, cannot apply R_X86_64_GLOB_DAT @0xffffaf23e358 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Warning: Global Symbol OPENSSL_memory_get_size not found, cannot apply R_X86_64_GLOB_DAT @0xffffaf23e360 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Using native(wrapped) libsmime3.so
Using native(wrapped) libnspr4.so
Using native(wrapped) libatk-1.0.so.0
Using native(wrapped) libatk-bridge-2.0.so.0
Using native(wrapped) libSM.so.6
Using native(wrapped) libICE.so.6
Using native(wrapped) libXau.so.6
Using native(wrapped) libxcb.so.1
Using native(wrapped) libdbus-1.so.3
Using native(wrapped) libdrm.so.2
Using native(wrapped) libgdk_pixbuf-2.0.so.0
Using native(wrapped) libgtk-3.so.0
Using native(wrapped) libgdk-3.so.0
Using native(wrapped) libpangocairo-1.0.so.0
Using native(wrapped) libpango-1.0.so.0
Using native(wrapped) libcairo.so.2
Using native(wrapped) libm.so.6
Using native(wrapped) libX11.so.6
Using native(wrapped) libXcomposite.so.1
Using native(wrapped) libXdamage.so.1
Using native(wrapped) libXext.so.6
Using native(wrapped) libXdmcp.so.6
Using native(wrapped) libXfixes.so.3
Using native(wrapped) libXrandr.so.2
Using native(wrapped) libXrender.so.1
Using native(wrapped) libexpat.so.1
Using native(wrapped) libxkbcommon.so.0
Using native(wrapped) libgbm.so.1
Using native(wrapped) libasound.so.2
Using native(wrapped) libatspi.so.0
Using native(wrapped) libcups.so.2
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Warning: Global Symbol OPENSSL_memory_alloc not found, cannot apply R_X86_64_GLOB_DAT @0xffffb43ed348 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Warning: Global Symbol OPENSSL_memory_free not found, cannot apply R_X86_64_GLOB_DAT @0xffffb43ed350 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Warning: Global Symbol sdallocx not found, cannot apply R_X86_64_GLOB_DAT @0xffffb43ed358 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
Warning: Global Symbol OPENSSL_memory_get_size not found, cannot apply R_X86_64_GLOB_DAT @0xffffb43ed360 ((nil)) in /tmp/.mount_BadliodB3Rl2/BadlionClient
../../third_party/tcmalloc/chromium/src/tcmalloc.cc:337] Attempt to free invalid pointer 0x69d4be10 
1794211|SIGSEGV @0xffff70086504 (???(0xffff70086504)) (x64pc=0xffffaf89d1a4//tmp/.mount_BadliodB3Rl2/BadlionClient:"/tmp/.mount_BadliodB3Rl2/BadlionClient + 0x20361a0", rsp=0xffffad7df1f0, stack=0xffffacfe6000:0xffffad7e6000 own=(nil) fp=0xffffad7df320), for accessing 0x39 (code=1/prot=0), db=0x69d51890(0xffff700864f4:0xffff70086540/0xffffaf89d1a0:0xffffaf89d1ae//tmp/.mount_BadliodB3Rl2/BadlionClient + 0x20361a0:clean, hash:6ed19c28/6ed19c28) handler=(nil)
RAX:0x0000000000000001 RCX:0x0000000000000001 RDX:0x0000000000000000 RBX:0x0000000000000065 
RSP:0x0000ffffad7df1f0 RBP:0x0000ffffad7df1f0 RSI:0x0000000000000001 RDI:0x0000000000000002 
 R8:0x0000ffffad7df1c5  R9:0x0000ffffae8d5250 R10:0x0000000100002600 R11:0x0000000000000003 
R12:0x0000000000000100 R13:0x0000ffffae6f1f90 R14:0x0000000000000001 R15:0x0000ffffad7df228 
RSP-0x20:0x0000000000000151 RSP-0x18:0x0000ffffae6f1f90 RSP-0x10:0x0000003300000000 RSP-0x08:0x0000ffffad7df228
RSP+0x00:0x0000ffffad7df320 RSP+0x08:0x0000ffffaf8a0503 RSP+0x10:0x6e6f662f00000000 RSP+0x18:0x0000ffffae5cc72e
Segmentation fault (core dumped)

How do I fix this?

starlite-developer commented 2 years ago

From looking further at the errors I believe the problem is missing Global Symbols:

ptitSeb commented 2 years ago

no, those global symbols should be optional.

But embedded tcmalloc is not yet supported. I started working on it, but I'm not finished yet.

starlite-developer commented 2 years ago

Is there any quick fix for it, like downloading the package myself?

ptitSeb commented 2 years ago

no, there isn't, unfortunately.

kargaroc commented 2 years ago

Just for the record, this sounds like the sort of thing where you could get multi-mc, set it up for arm64, and get the mods you want, skipping the need for emulation entirely.