ptitSeb / box64

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

Starbound - Segfault on launch, cant get into game. #328

Closed iAmInActions closed 2 years ago

iAmInActions commented 2 years ago

So im trying to launch Starbound on the Raspberry Pi 4, latest Bullseye 64 bit build, 8 GB model, and its SEGFAULTing on me. Log is below. Any idea why this is happening and how i can fix it or work around it?

Dynarec for ARM64, with extension: ASIMD CRC32 PageSize:4096
Box64 with Dynarec v0.1.9 f78c5a2 built on Jun 20 2022 09:55:38
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 49 Env var
Looking for ./starbound
Rename process to "starbound"
Using native(wrapped) libSDL2-2.0.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) libm.so.6
Using native(wrapped) librt.so.1
Using native(wrapped) libpthread.so.0
Using native(wrapped) libGLU.so.1
Using native(wrapped) libGL.so.1
Using emulated libsteam_api.so
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
[Info] Application: Initializing SDL
[Info] Application: startup...
[Info] Root: Preparing Root...
[Info] Root: Done preparing Root.
[Info] Client Version 1.4.4 (linux x86_64) Source ID: 8cbe6faf22282659828a194e06a08999f213769e Protocol: 747
[Info] Root: Scanning for asset sources in directory '../assets/'
[Info] Root: Scanning for asset sources in directory '../mods/'
[Warn] Root: Unrecognized file in asset directory 'mods_go_here', skipping
[Info] Root: Detected asset source named 'base' at '../assets/packed.pak'
[Info] Root: Detected asset source named 'xbawks' at '../mods/characterextender.pak'
[Info] Root: Detected asset source named 'Avali' at '../mods/avali.pak'
[Info] Root: Detected unnamed asset source at '../assets/user'
[Info] Loading assets from: '../assets/packed.pak'
[Info] Loading assets from: '../mods/characterextender.pak'
[Info] Loading assets from: '../mods/avali.pak'
[Info] Loading assets from: '../assets/user'
[Info] Assets digest is 664b579ce0a981de0dc717b136dfbba359494f31c07c8cf8c583e85c75fe1932
[Info] Root: Loaded Assets in 6.89934 seconds
[Info] Application: Initializing SDL Video
[Info] Application: Initializing SDL Joystick
[Info] Application: Initializing SDL Sound
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Info] Failed to initialize Steam platform services
[Info] Application: Creating SDL Window
[Info] Application: Enabling VSync with late swap tearing
[Info] Application: Opened default audio device with 44.1khz / 16 bit stereo audio, 1024 sample size buffer
[Info] OpenGL version: '2.1 Mesa 20.3.0' vendor: 'Broadcom' renderer: 'V3D 4.2' shader: '1.20'
[Info] Application: initialization...
2783|SIGSEGV @0x8868276c (???(0x8868276c)) (x64pc=0x14ffcc0//home/pi/Desktop/Games/Starbound/linux/starbound:"/home/pi/Desktop/Games/Starbound/linux/starbound/_ZN4Star9MainMixer4readEPsm", rsp=0x7f7da4bff0, stack=0x7f7d24c000:0x7f7da4c000 own=0x7f7d24c000 fp=0x7f7da4bff8), for accessing 0x10 (code=1/prot=0), db=0x7f48001d00(0x8868276c:0x88682790/0x14ffcc0:0x14ffcc9//home/pi/Desktop/Games/Starbound/linux/starbound/_ZN4Star9MainMixer4readEPsm:clean, hash:810cd060/810cd060) handler=0xa99ff0
[Error] Fatal Error: Segfault Encountered!
/home/pi/Desktop/Games/Starbound/linux/starbound(_ZN4Star10fatalErrorEPKcb+43) [0xa93e43]
??? [(nil)]
Aborted
iAmInActions commented 2 years ago

Update: I'm now almost getting to the title screen after having set a few environment variables. Command and log below:

BOX64_DYNAREC_X87DOUBLE=1 BOX64_PREFER_EMULATED=1 BOX64_NOVULKAN=1 BOX64_NODYNAREC=1 LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./" ./starbound
Dynarec will use only double for x87 emulation
Disable the use of wrapped vulkan libs
Dynarec for ARM64, with extension: ASIMD CRC32 PageSize:4096
Box64 with Dynarec v0.1.9 f78c5a2 built on Jun 20 2022 09:55:38
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
BOX64: Prefer Emulated libs
Using default BOX64_PATH: ./:bin/
Counted 49 Env var
Looking for ./starbound
Rename process to "starbound"
Using native(wrapped) libSDL2-2.0.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) libm.so.6
Using native(wrapped) librt.so.1
Using native(wrapped) libpthread.so.0
Using native(wrapped) libGLU.so.1
Using native(wrapped) libGL.so.1
Using emulated libsteam_api.so
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
[Info] Application: Initializing SDL
[Info] Application: startup...
[Info] Root: Preparing Root...
[Info] Root: Done preparing Root.
[Info] Client Version 1.4.4 (linux x86_64) Source ID: 8cbe6faf22282659828a194e06a08999f213769e Protocol: 747
[Info] Root: Scanning for asset sources in directory '../assets/'
[Info] Root: Scanning for asset sources in directory '../mods/'
[Warn] Root: Unrecognized file in asset directory 'mods_go_here', skipping
[Info] Root: Detected asset source named 'base' at '../assets/packed.pak'
[Info] Root: Detected asset source named 'xbawks' at '../mods/characterextender.pak'
[Info] Root: Detected asset source named 'Avali' at '../mods/avali.pak'
[Info] Root: Detected unnamed asset source at '../assets/user'
[Info] Loading assets from: '../assets/packed.pak'
[Info] Loading assets from: '../mods/characterextender.pak'
[Info] Loading assets from: '../mods/avali.pak'
[Info] Loading assets from: '../assets/user'
[Info] Assets digest is 664b579ce0a981de0dc717b136dfbba359494f31c07c8cf8c583e85c75fe1932
[Info] Root: Loaded Assets in 6.93681 seconds
[Info] Application: Initializing SDL Video
[Info] Application: Initializing SDL Joystick
[Info] Application: Initializing SDL Sound
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
[Info] Failed to initialize Steam platform services
[Info] Application: Creating SDL Window
[Info] Application: Enabling VSync with late swap tearing
[Info] Application: Opened default audio device with 44.1khz / 16 bit stereo audio, 1024 sample size buffer
[Info] OpenGL version: '2.1 Mesa 20.3.0' vendor: 'Broadcom' renderer: 'V3D 4.2' shader: '1.20'
[Info] Application: initialization...
[Info] Root: Loaded Configuration in 0.00607545 seconds
[Info] Application: Disabling VSync
[Info] Application: renderer initialization...
[Info] detected supported OpenGL texture size 4096, using atlasNumCells 128
[Info] Root: Loaded ImageMetadataDatabase in 0.000297495 seconds
[Info] Application: main update loop...
[Info] Root: Loaded NameGenerator in 0.0876018 seconds
[Info] Root: Loaded PlantDatabase in 0.773792 seconds
[Info] Root: Loaded ObjectDatabase in 2.01934 seconds
[Info] Root: Loaded ProjectileDatabase in 1.17596 seconds
[Info] Root: Loaded NpcDatabase in 0.234671 seconds
[Info] Root: Loaded StagehandDatabase in 0.0305789 seconds
[Info] Root: Loaded VehicleDatabase in 0.0839086 seconds
[Info] Root: Loaded PlayerFactory in 0.0735632 seconds
[Info] Root: Loaded MonsterDatabase in 0.934406 seconds
[Info] Root: Loaded VersioningDatabase in 0.0440551 seconds
[Info] Root: Loaded EntityFactory in 0.534757 seconds
[Info] Root: Loaded ParticleDatabase in 0.389338 seconds
[Info] Root: Loaded MaterialDatabase in 1.28894 seconds
[Info] Root: Writing runtime configuration to '../storage/starbound.config'
[Info] Root: Loaded TerrainDatabase in 0.0661116 seconds
[Info] Root: Loaded BiomeDatabase in 0.244526 seconds
[Info] Root: Loaded LiquidsDatabase in 0.0100412 seconds
[Info] Root: Loaded StatusEffectDatabase in 0.0611245 seconds
[Info] Root: Loaded DamageDatabase in 1.7575 seconds
[Info] Root: Loaded EffectSourceDatabase in 0.0243954 seconds
[Info] Root: Loaded FunctionDatabase in 0.0421473 seconds
[Info] Root: Loaded TreasureDatabase in 0.212867 seconds
[Info] Root: Loaded DungeonDefinitions in 1.4741 seconds
[Info] Root: Loaded TilesetDatabase in 0.00175349 seconds
[Info] Root: Loaded StatisticsDatabase in 0.0220573 seconds
[Info] Root: Loaded EmoteProcessor in 0.00307384 seconds
[Info] Root: Loaded SpeciesDatabase in 0.0678169 seconds
[Info] Root: Loaded QuestTemplateDatabase in 0.0996603 seconds
[Info] Root: Loaded AiDatabase in 0.0255684 seconds
[Info] Root: Loaded TechDatabase in 0.0197962 seconds
[Info] Root: Loaded CodexDatabase in 0.0423086 seconds
[Info] Root: Loaded BehaviorDatabase in 1.53532 seconds
[Info] Root: Loaded DanceDatabase in 0.0373811 seconds
[Info] Root: Loaded SpawnTypeDatabase in 0.0590074 seconds
[Info] Root: Loaded RadioMessageDatabase in 0.031474 seconds
[Info] Root: Loaded ItemDatabase in 20.5728 seconds
[Info] Root: Loaded CollectionDatabase in 14.4322 seconds
3505|SIGSEGV @0x7f568a03c0 (???(0x7f568a03c0)) (x64pc=0x15755aa//home/pi/Desktop/Games/Starbound/linux/starbound:"/home/pi/Desktop/Games/Starbound/linux/starbound/je_iarena_cleanup", rsp=0x7f443fffd8, stack=0x7f43c00000:0x7f44400000 own=0x7f43c00000 fp=0x7f443ffff8), for accessing 0x8260459880 (code=1/prot=0), db=0x7f57603940(0x7f568a0368:0x7f568a0444/0x1575590:0x15755bf//home/pi/Desktop/Games/Starbound/linux/starbound/je_iarena_cleanup:clean, hash:e83325d3/e83325d3) handler=0xa99ff0
[Error] Fatal Error: Segfault Encountered!
/home/pi/Desktop/Games/Starbound/linux/starbound(_ZN4Star10fatalErrorEPKcb+43) [0xa93e43]
??? [(nil)]
Aborted
ptitSeb commented 2 years ago

I have tested, and there have been a regression on starbound. It runs with v0.1.6, but was broken already in v0.1.8. I'll debug it later.

ptitSeb commented 2 years ago

It should be fixed now, can you retry with latest sources?

iAmInActions commented 2 years ago

I'll do that in a sec. Im busy working on PowerPC stuff atm. I'll post my progress here once I tried it.

iAmInActions commented 2 years ago

So I compiled and tested the new version and it works flawlessly. I don't even have to disable dynarec anymore so its way more performant now.

Here is a picture of it running 20220626_204246