chatgui: fix rlottie thread hang on Windows shutdown
Root cause: librlottie RleTaskScheduler creates 32 worker threads on first lottie_animation_from_data call. These pthreads wait in WaitForMultipleObjects(INFINITE) and never exit. On MinGW, exit()/pthread_join blocks forever. Changes: - messagelist: s_icons moved to file-static; cleanupAnimations() clears them, calling lottie_animation_destroy BEFORE static destruction - mainwindow: ~MainWindow calls MessageList::cleanupAnimations() after node stop - main: ShutdownSentinel counts threads at exit; if >4 remaining, calls ExitProcess(0) to bypass CRT pthread_join hang - main: if rlottie properly shuts down (<=4 threads), normal return (no ExitProcess)
This commit is contained in:
1 parent
74c6b0d102
commit
73be79d204
4 files changed
+35
-1
No files matched your search
@@ -90,6 +90,8 @@ MainWindow::~MainWindow() {
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: ~MainWindow — stopping utun node");
|
||||
if (m_node) { m_node->stop(); delete m_node; m_node = nullptr; }
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: ~MainWindow — node stop+delete done");
|
||||
MessageList::cleanupAnimations();
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: ~MainWindow — animations cleaned");
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "MainWindow: ~MainWindow done");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user