Windows DLL hangs on unload after using a server_iostream start_async() #2730
Unanswered
markcellis
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Yeah the way DLLs handle globals and threads can be frustrating. There is also this kind of thing https://github.com/davisking/dlib/blob/master/dlib/threads/threads_kernel_shared.cpp#L79. You could try making it actually wait on those threads. I don't know of a good general way to deal with this in windows though. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Before I take the time to create a full test case and bug report I just want to know if this is a known problem or if I'm doing something wrong.
The application I'm developing is a plugin to a flight simulator. The plugin is a dll that gets dynamically loaded by the simulator when it starts and then unloaded when the simulator exists or you request an unload and reload of all plugins.
The only part of dlib I'm using is an server_iostream. I start the server with start_async(); and then when I need to clean up before my plugin is unloaded I do a clear() on the server and then delete the server.
I think what is going on is there is a few stray dlib threads are still running or possibly an issue similar to what was reported in issue 505 where windows is killing threads on dll unload which then cause dlib static destructors to hang.
I'm using the dlib 19.24
My questions are:
Beta Was this translation helpful? Give feedback.
All reactions