Open lwho opened 10 years ago
Unless I'm missing a mechanism, Pioneer lua errors skip the cleanup and just exit(1). Apparently the audio mixer thread was still running while either the heap or static memory was being deallocated, which is interesting but not wholly unexpected.
The cplusplus reference includes the following caveat, which seems to cover it:
Calling this function destroys all objects with static duration: A program with multiple threads running shall not call exit (see quick_exit for a similar function that does not affect static objects).
Just got another use-after-free report by the memory checker, when the game was exiting after a Lua error (#2701). Unfortunately, it was a release build, so quite incomplete stacktrace. Just tracking it now, so it doesn't get forgotten.