[vbox-dev] VBoxClipboardThread() may never quits, and cause hang sometimes

Huihong Luo huisinro at yahoo.com
Mon Jul 26 21:27:53 GMT 2010


I examined a bit more on the rare hanging when saving state.
 
One message loop that may never quite is 
VBoxClipboardThread():
 
MSG msg;
while (GetMessage(&msg, NULL, 0, 0) && !pCtx->fTerminate)
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
 
the above while loops depends pCtx->fTerminate to quit, however, GetMessage() may goes to sleep, so never gets to check fTerminate.
 
The window proc has WM_CLOSE handler, but does nothing, needs to add something like PostQuitMessage(0), which cause GetMessage() to quit.
 
There might be some other places that have similar problems.
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100726/934875c8/attachment.html>


More information about the vbox-dev mailing list