(02-15-2010, 12:55 AM)KarstenS Wrote: [ -> ]I've applied your modifications, compiled and ran (Mario Kart Wii). I went through the menus 1Pl, 50cc, Mario, first Kart, Mushroom Cup. After the race started and I've passed the first item boxes I hit ESC and...still hang.
Seems not to work for me. Still need task manager to quit.
It may be a deadlock in emuThreadGoing.MsgWait() or cpuThread->WaitForDeath() then. The first thing I would add to the patch is a function that waits for cpuThread to end too, by setting CPU_PowerPC::CPU_POWERDOWN and wait for cpuRunloopQuit.Set() before going to Stop().
I don't know, where the problem is exactly. Maybe I should take a look by using a debugger to see, where it stops working. But as I can see, that the CPU usage is going to zero, it looks like that it is waiting for something after the threads got stopped.
(02-15-2010, 01:44 AM)KarstenS Wrote: [ -> ]I don't know, where the problem is exactly. Maybe I should take a look by using a debugger to see, where it stops working. But as I can see, that the CPU usage is going to zero, it looks like that it is waiting for something after the threads got stopped.
That would help. Before
r4803 it was easier to see where the deadlock occurred because you would get a red message where it occurred. Now you may have to guess where it occurred because you will see log messages from two concurrent threads in the log and there is no timeout.
And about the patch, I updated it to also wait for the cpuThread to end.
Hmm. A compiled Debug version seems not to work well on my system. Maybe I did something wrong.
But it could be, that I have to revert my post about the patch is not running. The new way to handle the "ESC" button is a little bit...unhandy. When I press it, I get out of full screen into a window mode and the game seems to pause as expected. But the mouse pointer keeps at busy state. So I thought it hangs. But when I close the game window (the stop button seems not to work), I get to the main Window with the appearing game list and I can quit correctly.
(02-16-2010, 03:41 AM)KarstenS Wrote: [ -> ]But it could be, that I have to revert my post about the patch is not running. The new way to handle the "ESC" button is a little bit...unhandy. When I press it, I get out of full screen into a window mode and the game seems to pause as expected. But the mouse pointer keeps at busy state. So I thought it hangs. But when I close the game window (the stop button seems not to work), I get to the main Window with the appearing game list and I can quit correctly.
Okay. That could be another problem, that is not a deadlock. The idea to end the video and cpu threads before going to Stop() should be 100% reliable.
I've tested your patch a few days now. Seems to work fine. No hangs at exit since I modified the code.
seems to be going well
