Daemon icon indicating copy to clipboard operation
Daemon copied to clipboard

Stack trace crashes with DLL

Open slipher opened this issue 5 months ago • 3 comments

With MSVC, if I enable the stack traces with USE_CPP23, run with DLL gamelogic, and do the command cgame.injectFault drop or cgame.injectFault exception or likewise with sgame, I get a crash inside the C runtime's stack trace machinery.

slipher avatar Sep 28 '25 22:09 slipher

Yeah, I got that one too, though IIRC it did print the staktrace. Maybe it fails to stack unwind properly or something.

VReaperV avatar Sep 28 '25 22:09 VReaperV

I expect you would have to be very lucky to get the full stacktrace due to the fully buffered logs...

slipher avatar Sep 28 '25 22:09 slipher

Actually the problem happens on Linux too. And the stack trace code can still cause this crash even if the feature is disabled: it goes into mutual recursion between Sys::Drop and Log::Warn( "StackTrace unavailable: CPP23 required" ); until it hits a stack overflow. I assume the same thing also happens with logging an actual stack trace.

slipher avatar Sep 29 '25 07:09 slipher