box64 icon indicating copy to clipboard operation
box64 copied to clipboard

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

Open BlindGalaxy4817 opened this issue 4 years ago • 22 comments

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.

BlindGalaxy4817 avatar Feb 21 '22 18:02 BlindGalaxy4817

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?

ptitSeb avatar Feb 21 '22 18:02 ptitSeb

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)

BlindGalaxy4817 avatar Feb 22 '22 00:02 BlindGalaxy4817

FWIW, I'm running into the same issue

tastysauce avatar Aug 03 '22 03:08 tastysauce

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

QuintenQVD0 avatar Nov 19 '22 18:11 QuintenQVD0

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

For reproduction:

  • Create a free server on Oracle Cloud (4 Ampere aarch64 cores + 24GB, Ubuntu Canonical)
  • Install box64 and box86 using the custom repos
  • Move the Satisfactory Dedicated Server to the server (I couldn't get SteamCMD to run, but it's not required)
  • Run (I use BOX86_NOBANNER=1 ./FactoryServer.sh just in case)

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!

A-iko avatar Nov 20 '22 00:11 A-iko

some documentiation I found arround this error

  • https://en.cppreference.com/w/cpp/types/bad_cast
  • https://stackoverflow.com/questions/19960496/compiles-but-getting-uncaught-exception-of-type-stdbad-cast

QuintenQVD0 avatar Nov 20 '22 09:11 QuintenQVD0

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   

bennesp avatar Nov 20 '22 14:11 bennesp

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

parzival-space avatar May 10 '23 13:05 parzival-space

Is it still happening?

ptitSeb avatar May 10 '23 14:05 ptitSeb

Is it still happening?

yes it is

QuintenQVD0 avatar May 10 '23 14:05 QuintenQVD0

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

ptitSeb avatar May 10 '23 14:05 ptitSeb

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

QuintenQVD0 avatar May 10 '23 15:05 QuintenQVD0

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

ptitSeb avatar May 10 '23 16:05 ptitSeb

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.

ptitSeb avatar May 10 '23 19:05 ptitSeb

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

parzival-space avatar May 10 '23 19:05 parzival-space

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.

ptitSeb avatar May 10 '23 19:05 ptitSeb

Any updates ?

NickGildenstern avatar May 15 '23 10:05 NickGildenstern

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.

ptitSeb avatar May 15 '23 10:05 ptitSeb

Is there any possible way how we could help ?

NickGildenstern avatar May 15 '23 11:05 NickGildenstern

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)

ptitSeb avatar May 15 '23 11:05 ptitSeb

No updates right ?

NickGildenstern avatar Apr 12 '24 11:04 NickGildenstern