ptitSeb / box64

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

terminating with uncaught exception of type std::bad_cast: std::bad_cast #240

Open BlindGalaxy4817 opened 2 years ago

BlindGalaxy4817 commented 2 years ago

I'm trying to run a Satisfactory dedicated server on ARM64 (4 cores 24gb of RAM). I'm using box64 and box86 to boot the server. Whenever I do, it crashes with this error message: " terminating with uncaught exception of type std::bad_cast: std::bad_cast". I was told to put this here, sorry if it's in the wrong spot.

ptitSeb commented 2 years ago

That's fine, you are in the right place (I asked you to create the ticket here :) )

How did you install that Satisfactory server? using steamcmd or something else?

BlindGalaxy4817 commented 2 years ago

I installed it with steamcmd running on box86, then ran it using box64. I'm on ubuntu. Full error is:

terminating with uncaught exception of type std::bad_cast: std::bad_cast Signal 6 caught. Malloc Size=65538 LargeMemoryPoolOffset=65554 CommonUnixCrashHandler: Signal=6 Segmentation fault (core dumped)

tastysauce commented 2 years ago

FWIW, I'm running into the same issue

QuintenQVD0 commented 1 year ago

I am also having this issue, hope my logs can provice help to wy it doesn't work and how this can be fixt

https://hastebin.com/izisilonax.md

https://hastebin.com/bojajowuki.md

A-iko commented 1 year ago

I'm trying to pull the same stunt, and I'm dealing with the same error.

For reproduction:

My output looks very similar to the second hastebin posted by Quinten above. I believe the actual error occurs on logline 521.

Let me know if there's anything I can do to help and thank you for your hard work!

QuintenQVD0 commented 1 year ago

some documentiation I found arround this error

bennesp commented 1 year ago

Same error, following this guide to setup an environment: https://github.com/Raezroth/Linux-ARM-Gaming-Chroot/blob/master/README.md . Then installed SteamCMD, downloaded the game and started in the chroot env. Crashing with

terminating with uncaught exception of type std::bad_cast: std::bad_cast                                                                                                               
Signal 6 caught.                                                                                                                                                                       
Malloc Size=65538 LargeMemoryPoolOffset=65554                                                                                                                                          
CommonUnixCrashHandler: Signal=6                                                                                                                                                       
[2022.11.20-14.55.58:525][  0]LogCore: === Critical error: ===                                                                                                                         
Unhandled Exception: SIGABRT: abort() called                                                                                                                                           

[2022.11.20-14.55.58:526][  0]LogCore: Fatal error!                                                                                                                                    

0x0000ffff87d87642 libUE4Server-Core-Linux-Shipping.so!FUnixPlatformStackWalk::CaptureStackBackTrace(unsigned long long*, unsigned int, void*) [D:/ws/SB-220602145101-842/UE4/Engine/So
urce/Runtime/Core/Private/Unix/UnixPlatformStackWalk.cpp:693]                                                                                                                          

[2022.11.20-14.55.58:538][  0]LogExit: Executing StaticShutdownAfterError   
parzival-space commented 1 year ago

Any updates on this? I basically want to do the same.

ptitSeb commented 1 year ago

Is it still happening?

QuintenQVD0 commented 1 year ago

Is it still happening?

yes it is

ptitSeb commented 1 year ago

Mmmm, ok. I'll install Satisfactory on my arm test machine and will give a it try

QuintenQVD0 commented 1 year ago

note for my that is I am trying to run the server not the game itself

ptitSeb commented 1 year ago

Yeah ok. There is a separate download on steam for the Dedicated server, so I'll use this

ptitSeb commented 1 year ago

So, I did try and indeed I get Segfault. After some analysis, t's a cycling lib dependancly: A use B, and B use A. Not sure how I will handle that.

parzival-space commented 1 year ago

How did you identify this? Just out of curiosity. I am not a C expert

ptitSeb commented 1 year ago

That's not the whole story. (I found at using gdb, it was obvious there). Once I workaround this recursive lib stuff, I actually get the std::bad_cast: std::bad_cast message. So, I need to check what's wrong there too.

NickGildenstern commented 1 year ago

Any updates ?

ptitSeb commented 1 year ago

I did some debugging, but didn't found anything conclusive. I'm still unsurre why it happens, I need to speed more time on this.

NickGildenstern commented 1 year ago

Is there any possible way how we could help ?

ptitSeb commented 1 year ago

Not sure. The exception occurs during the initialisation of lib. I really haven't found enough detail yet. I suspect it's an issue with the elfloader / librarian, with somehow an issue with a wrong symbol being used. But I really need to put more time in this to really get the symbol being executed that launch the exception. It's a dynamic value, not a static one, so I need to analyse (unless someone with debugging knowledge and good understanding of the ELF structure and runtime linking want to take over)

NickGildenstern commented 7 months ago

No updates right ?

rajdakin commented 4 months ago

No update, maybe it works now, but Satisfactory (the full game) doesn't work (can't reach the menu, it crashes while loading).