Closed jhett12321 closed 10 months ago
This is fine. By the way, you should be able to call the original crash handler from either managed code or the dotnet plugin. In the cpp, just declare as extern "C" void nwnx_signal_handler(int sig);
and then call. In the plugin, use P/Invoke or whatever.
Adds support for overriding the NWNX crash handler.
This allows a custom C# handler to attempt to resolve a managed backtrace before crashing the server, giving better visibility when debugging. And hopefully less Anvil bugs ending up in the NWNX chat ;)
Example from a double-free issue:
I tried to implement this through the existing
MessageBus::Broadcast("NWNX_CORE_SIGNAL")
system, but wasn't able to reach managed code again before encountering more dragons.