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, though.
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 finding. > > --- On Mon, 7/26/10, Huihong Luo <huisi...@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 unloaded.--- 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 started/finished). 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. Leonid. _______________________________________________ vbox-dev mailing list vbox-dev@virtualbox.org http://vbox.innotek.de/mailman/listinfo/vbox-dev