chatgui: proper animation shutdown + TerminateProcess for rlottie threads
- AnimTimer::shutdown(): stop QTimer, clear m_icons before icon destruction - ~MainWindow: AnimTimer::shutdown() -> cleanupAnimations() (correct order) - main: replace ExitProcess with TerminateProcess(GetCurrentProcess,0) TerminateProcess skips DLL_PROCESS_DETACH, avoiding libwinpthread pthread_join hang on rlottie/miniaudio threads. rlottie C API has no global shutdown - internal RleTaskScheduler threads cannot be stopped through public API. Same for miniaudio WASAPI threads. All owned resources already freed before TerminateProcess.
This commit is contained in:
1 parent
73be79d204
commit
fbc1bff1e1
4 files changed
+13
-2
No files matched your search
@@ -45,8 +45,9 @@ static struct ShutdownSentinel {
|
||||
DWORD threads = count_threads();
|
||||
DEBUG_INFO(DEBUG_CATEGORY_DEBUG, "main: threads at exit=%lu", (unsigned long)threads);
|
||||
if (threads > 4) {
|
||||
DEBUG_WARN(DEBUG_CATEGORY_DEBUG, "main: %lu hanging threads, ExitProcess", (unsigned long)threads);
|
||||
ExitProcess(0);
|
||||
DEBUG_WARN(DEBUG_CATEGORY_DEBUG, "main: %lu hanging threads, TerminateProcess", (unsigned long)threads);
|
||||
fflush(nullptr);
|
||||
TerminateProcess(GetCurrentProcess(), 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user