[vbox-dev] possible cause for the crash when shutting down a vm

Huihong Luo huisinro at yahoo.com
Tue Jul 27 05:36:30 GMT 2010


I attached the diff, seems to fix the problem, at least I tested consective 1,000 times shutdown, and no problem. not sure if there are other side effects, though.


--- On Mon, 7/26/10, Huihong Luo <huisinro at yahoo.com> wrote:


From: Huihong Luo <huisinro at yahoo.com>
Subject: Re: [vbox-dev] possible cause for the crash when shutting down a vm
To: vbox-dev at virtualbox.org
Date: Monday, July 26, 2010, 10:27 PM






more importantly, when WM_VBOX_RENDERSPU_DESTROY_WINDOW is received, should the while loop break out? that loop will definitely causes problems after dll is unloaded.

--- On Mon, 7/26/10, Huihong Luo <huisinro at yahoo.com> wrote:


From: Huihong Luo <huisinro at yahoo.com>
Subject: [vbox-dev] possible cause for the crash when shutting down a vm
To: vbox-dev at virtualbox.org
Date: Monday, July 26, 2010, 10:04 PM












I continue to debug the crash bug when shutting down a vm on windows host.
 
The crash indicated that some code is still being executed after a dll is unloaded. 
 
After some extensive debugging, I found the following function might be problematic. Can you guys double check?
 
When WM_VBOX_RENDERSPU_DESTROY_WINDOW is received, it immediately invokes SetEvent(render_spu.hWinThreadReadyEvent), should that statement be commented out? and leave the last one.
 
static DWORD WINAPI renderSPUWindowThreadProc(void* unused)
{
...
else
{
...
 
else if (msg.message == WM_VBOX_RENDERSPU_DESTROY_WINDOW)
{
CRASSERT(msg.lParam && !msg.wParam);
DestroyWindow(((VBOX_RENDERSPU_DESTROY_WINDOW*) msg.lParam)->hWnd);
SetEvent(render_spu.hWinThreadReadyEvent);
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
}
render_spu.dwWinThreadId = 0;
crDebug("RenderSPU: Window thread stopped (%x)", crThreadID());
SetEvent(render_spu.hWinThreadReadyEvent);
return 0;
}
-----Inline Attachment Follows-----


_______________________________________________
vbox-dev mailing list
vbox-dev at virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev

-----Inline Attachment Follows-----


_______________________________________________
vbox-dev mailing list
vbox-dev at virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100726/5bd87b6e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: render.diff
Type: application/octet-stream
Size: 919 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100726/5bd87b6e/attachment.obj>


More information about the vbox-dev mailing list