ptitSeb / box64

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

Stardew Valley StarFive VisionFive 2 crashing on initial start #1065

Open mardot opened 10 months ago

mardot commented 10 months ago

Using StarFive VisionFive 2 Running Stardew Valley (from GOG)

I have been trying for quite some time to get this game to start. There may be a dependency issue but I cant seem to see one.

Fresh install of Debian 11 StarFive SD card image 202308 (I also experienced a similar error on the 202310 image)

user@starfive:~$ BOX64_BASH=~/Downloads/box64/tests/bash LD_LIBRARY_PATH=~/gl4es/lib box64 ~/GOG\ Games/Stardew\ Valley/game/Stardew\ Valley
Dynarec for RISC-V With extension: I M A F D C Zba Zbb PageSize:4096 Running on unknown riscv64 cpu with 4 Cores
Params database has 32 entries
Using bash "/home/user/Downloads/box64/tests/bash"
Box64 with Dynarec v0.2.5 d50ae521 built on Nov 15 2023 15:39:33
BOX64: Didn't detect 48bits of address space, considering it's 39bits
Counted 50 Env var
BOX64 LIB PATH: /home/user/gl4es/lib/:./:lib/:lib64/:x86_64/:bin64/:libs64/:/usr/lib/x86_64-linux-gnu/
BOX64 BIN PATH: ./:bin/:/usr/local/bin/:/usr/bin/:/bin/:/usr/local/games/:/usr/games/
Looking for /home/user/GOG Games/Stardew Valley/game/Stardew Valley
Rename process to "Stardew Valley"
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using emulated /usr/lib/x86_64-linux-gnu/libstdc++.so.6
Using native(wrapped) libm.so.6
Using emulated /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) librt.so.1
Using emulated /home/user/GOG Games/Stardew Valley/game/libhostfxr.so
Using emulated /home/user/GOG Games/Stardew Valley/game/libhostpolicy.so
Using emulated /home/user/GOG Games/Stardew Valley/game/libcoreclr.so
Warning: Global Symbol _ZTH12t_ThreadType not found, cannot apply R_X86_64_GLOB_DAT @0x3f046a3110 ((nil)) in /home/user/GOG Games/Stardew Valley/game/libcoreclr.so
Warning: Global Symbol _ZTH27t_pStackWalkerWalkingThread not found, cannot apply R_X86_64_GLOB_DAT @0x3f046a3128 ((nil)) in /home/user/GOG Games/Stardew Valley/game/libcoreclr.so
Warning: Global Symbol _ZTHN9StressLog19t_pCurrentThreadLogE not found, cannot apply R_X86_64_GLOB_DAT @0x3f046a3148 ((nil)) in /home/user/GOG Games/Stardew Valley/game/libcoreclr.so
Warning: Global Symbol _ZTH15t_CantStopCount not found, cannot apply R_X86_64_GLOB_DAT @0x3f046a3160 ((nil)) in /home/user/GOG Games/Stardew Valley/game/libcoreclr.so
Warning: Global Symbol _ZTH16t_CantAllocCount not found, cannot apply R_X86_64_GLOB_DAT @0x3f046a3250 ((nil)) in /home/user/GOG Games/Stardew Valley/game/libcoreclr.so
Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0x3f046a3650 (0x71e86)
Warning: Weak Symbol _ZTH12t_ThreadType not found, cannot apply R_X86_64_JUMP_SLOT @0x3f046a36e8 (0x71fb6)
Warning: Weak Symbol _ZTH27t_pStackWalkerWalkingThread not found, cannot apply R_X86_64_JUMP_SLOT @0x3f046a36f0 (0x71fc6)
Warning: Weak Symbol _ZTHN9StressLog19t_pCurrentThreadLogE not found, cannot apply R_X86_64_JUMP_SLOT @0x3f046a3708 (0x71ff6)
Warning: Weak Symbol _ZTH15t_CantStopCount not found, cannot apply R_X86_64_JUMP_SLOT @0x3f046a3710 (0x72006)
Warning: Weak Symbol _ZTH16t_CantAllocCount not found, cannot apply R_X86_64_JUMP_SLOT @0x3f046a3778 (0x720d6)
Using emulated /home/user/GOG Games/Stardew Valley/game/libcoreclrtraceptprovider.so
Error loading needed lib liblttng-ust.so.0
Error loading one of needed lib
Error initializing needed lib /home/user/GOG Games/Stardew Valley/game/libcoreclrtraceptprovider.so
Error loading needed lib liblttng-ust-tracepoint.so.0
Warning: Cannot dlopen("liblttng-ust-tracepoint.so.0"/0x3f04591e30, 102)
Error loading needed lib liblttng-ust-tracepoint.so.0
Warning: Cannot dlopen("liblttng-ust-tracepoint.so.0"/0x3f04591e30, 102)
Using native(wrapped) libnuma.so
Using emulated /home/user/GOG Games/Stardew Valley/game/libclrjit.so
Warning: Global Symbol _ZTH12t_ThreadType not found, cannot apply R_X86_64_GLOB_DAT @0x3f06306748 ((nil)) in /home/user/GOG Games/Stardew Valley/game/libclrjit.so
Warning: Global Symbol _ZTH16t_CantAllocCount not found, cannot apply R_X86_64_GLOB_DAT @0x3f06306730 ((nil)) in /home/user/GOG Games/Stardew Valley/game/libclrjit.so
Warning: Weak Symbol __gmon_start__ not found, cannot apply R_X86_64_JUMP_SLOT @0x3f063067d0 (0x15676)
Warning: Weak Symbol _ZTH16t_CantAllocCount not found, cannot apply R_X86_64_JUMP_SLOT @0x3f06306870 (0x157b6)
Warning: Weak Symbol _ZTH12t_ThreadType not found, cannot apply R_X86_64_JUMP_SLOT @0x3f06306878 (0x157c6)
Using native(wrapped) libnuma.so
Using emulated /home/user/GOG Games/Stardew Valley/game/libSystem.Native.so
Look for sysctl in loaded elfs
Found symbol with version GLIBC_2.27, value = 0x3f82bd3dc2
Using emulated /home/user/GOG Games/Stardew Valley/game/libSDL2-2.0.so.0
Using native(wrapped) libwayland-client.so.0
Using native(wrapped) libwayland-egl.so.1
Using native(wrapped) libwayland-cursor.so.0
Using native(wrapped) libxkbcommon.so.0
Using native(wrapped) libwayland-client.so.0
Using native(wrapped) libwayland-egl.so.1
Using native(wrapped) libwayland-cursor.so.0
Using native(wrapped) libxkbcommon.so.0
Error loading needed lib libicuuc.so.80
Warning: Cannot dlopen("libicuuc.so.80"/0x100a2ba70, 1)
Error loading needed lib libicuuc.so.79
Warning: Cannot dlopen("libicuuc.so.79"/0x100a2ba70, 1)
Error loading needed lib libicuuc.so.78
Warning: Cannot dlopen("libicuuc.so.78"/0x100a2ba70, 1)
Error loading needed lib libicuuc.so.77
Warning: Cannot dlopen("libicuuc.so.77"/0x100a2ba70, 1)
Error loading needed lib libicuuc.so.76
Warning: Cannot dlopen("libicuuc.so.76"/0x100a2ba70, 1)
Error loading needed lib libicuuc.so.75
Warning: Cannot dlopen("libicuuc.so.75"/0x100a2ba70, 1)
Error loading needed lib libicuuc.so.74
Warning: Cannot dlopen("libicuuc.so.74"/0x100a2ba70, 1)
Error loading needed lib libicuuc.so.73
Warning: Cannot dlopen("libicuuc.so.73"/0x100a2ba70, 1)
Using native(wrapped) libicuuc.so.72
Using native(wrapped) libicui18n.so.72
Using native(wrapped) libwayland-client.so.0
Using native(wrapped) libwayland-egl.so.1
Using native(wrapped) libwayland-cursor.so.0
Using native(wrapped) libxkbcommon.so.0
gameMode was 'titleScreenGameMode (0)', set to 'errorLogMode (11)'.
Error loading needed lib Microsoft.DiaSymReader.Native.amd64.dll
Warning: Cannot dlopen("Microsoft.DiaSymReader.Native.amd64.dll"/0x100a29810, 1)
Error loading needed lib Microsoft.DiaSymReader.Native.amd64.dll
Warning: Cannot dlopen("Microsoft.DiaSymReader.Native.amd64.dll"/0x100a29870, 1)
gameMode was 'errorLogMode (11)', set to 'playingGameMode (3)'.
Unhandled exception. Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to create graphics device!
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at MonoGame.OpenGL.GL.LoadExtensions() in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\OpenGL.cs:line 1443
   at MonoGame.OpenGL.GraphicsContext..ctor(IWindowInfo info) in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsContext.SDL.cs:line 49
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformSetup() in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Platform\Graphics\GraphicsDevice.OpenGL.cs:line 249
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Setup() in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 297
   at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, Boolean preferHalfPixelOffset, PresentationParameters presentationParameters) in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Graphics\GraphicsDevice.cs:line 273
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation gdi) in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 144
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice() in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 115
   --- End of inner exception stack trace ---
   at Microsoft.Xna.Framework.GraphicsDeviceManager.CreateDevice() in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\GraphicsDeviceManager.cs:line 123
   at Microsoft.Xna.Framework.Game.DoInitialize() in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Game.cs:line 838
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\MonoGame.Desktop\MonoGame.Framework\Game.cs:line 465
   at StardewValley.Program.Main(String[] args) in C:\GitlabRunner\builds\Gq5qA5P4\2\ConcernedApe\stardewvalley\Farmer\Farmer\Program.cs:line 175
NativeBT: /home/user/GOG Games/Stardew Valley/game/Stardew Valley() [0x34a00d82]
NativeBT: linux-vdso.so.1(__vdso_rt_sigreturn+0) [0x3f82c35800]
NativeBT: /lib/riscv64-linux-gnu/libc.so.6(+0x6bbf8) [0x3f82b50bf8]
NativeBT: /lib/riscv64-linux-gnu/libc.so.6(gsignal+0x12) [0x3f82b1b3fe]
NativeBT: /lib/riscv64-linux-gnu/libc.so.6(abort+0xb0) [0x3f82b0b978]
EmulatedBT: ??? [0x700a0]
EmulatedBT: /home/user/GOG Games/Stardew Valley/game/libcoreclr.so+4e582e [0x3f044e582e]
EmulatedBT: /home/user/GOG Games/Stardew Valley/game/libcoreclr.so+4e577c [0x3f044e577c]
EmulatedBT: /home/user/GOG Games/Stardew Valley/game/libcoreclr.so+2c795d [0x3f042c795d]
EmulatedBT: /home/user/GOG Games/Stardew Valley/game/libcoreclr.so+2c79e6 [0x3f042c79e6]
EmulatedBT: ??? [0x100a2bf50]
EmulatedBT: ??? [(nil)]
1913|SIGABRT @0x3f82b50bf8 (???(/lib/riscv64-linux-gnu/libc.so.6+0x6bbf8)) (x64pc=0x700b3/???:"???", rsp=0x100a2b278, stack=0x100230000:0x100a30000 own=(nil) fp=0x100a2b280), for accessing 0x3e800000779 (code=-6/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil)
RSP-0x20:0x0000000000000000 RSP-0x18:0xb229bab891314800 RSP-0x10:0x0000000000000001 RSP-0x08:0x0000000100a2b280
RSP+0x00:0x0000003f044e582e RSP+0x08:0x0000000100a2b2b0 RSP+0x10:0x0000003f044e577c RSP+0x18:0x00000000ffffff01
RAX:0xb229bab891314800 RCX:0x0000000000000000 RDX:0x0000000000000000 RBX:0x0000000000000001 
RSP:0x0000000100a2b278 RBP:0x0000000100a2b280 RSI:0x0000003f046e9968 RDI:0x0000000000000003 
 R8:0x0000000100a2ac80  R9:0x0000000000000000 R10:0x0000000000000000 R11:0x0000003f046cd970 
R12:0x0000000100004eaa R13:0x0000000100a2f060 R14:0x0000000000000001 R15:0x0000000000000000 
ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053 
Aborted
ptitSeb commented 10 months ago

I don't think gl4es has built correctly, as I don't see it initializeing. gl4es is very verbose on init, so it should be seen in this log. Check if /home/user/gl4es/lib/ contains libGL.so.1

mardot commented 10 months ago

libGL.so.1 is present in /home/user/gl4es/lib/

I've tried compiling gl4es with mkdir build; cd build; cmake .. ; make and also with mkdir build; cd build; cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo; make

ptitSeb commented 10 months ago

That's strange. It should pick it up then?! You are on the board directly right? not using ssh (in that case, you need DISPLAY=:0 because X11 forwarding will not work with gl4es) Also, maybe try to create a symlink to libGL.so on gl4es/lib folder, just in case.

mardot commented 10 months ago

Running directly on the board using HDMI output. I've tried a fresh install of 202310 Debian Engineering release image and its still producing the same error.

ptitSeb commented 10 months ago

I'm using an old image on my side. I think it's 202302 something. It would be interesting to test opengl rendering with something simple, like glxgear. Maybe those newer image have wayland and no x11 support? I still have to update, but because it's full flash only, I still haven't done that.