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

Leonid leonid.lobachev at sun.com
Mon Aug 9 16:21:50 GMT 2010

Hi Huihong Luo,
> 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,

Sleep() is unreliable solution, but that place might be the reason of issues. As
the dll might be unloaded while lib part of thread code isn't finished yet. Need
to use something like pthread_join there. I'll have a look at it, thanks for a

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

> 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
No the loop shouldn't break out when it receives that message, it's just an
event telling that thread have done processing last message (or have
There're just 2 ways for that loop to finish, either GetMessage fails or thread
gets WM_QUIT message.

> 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.
No, it's fine in the place it is.


More information about the vbox-dev mailing list