io12 / qemu-libretro

QEMU libretro core port
Other
6 stars 1 forks source link

Closing or Exiting causes RA to hang #3

Open zach-morris opened 4 weeks ago

zach-morris commented 4 weeks ago

First of all, again thanks for your work on this so far. It's super awesome.

I've been unable to exit qemu without Retroarch hanging, either by 'closing content' with RA (probably not ideal as thats essentially pulling the plug on your VM) or by first shutting down the VM and then trying to close RA after that. Debug log, in the case where i shutdown the VM and then try and exit or close content in RA shows:

[INFO] [Input]: Game Focus => OFF
exited
[ERROR] [Environ]: SET_MESSAGE_EXT: exited
[INFO] [Config]: Saved new config to ".../RetroArch/config/retroarch.cfg".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [Core]: Unloading game..
(Note I wait here for a few mins to make sure nothing is happening and RA is infact hung, then i manually kill it)
zsh: killed     /Applications/RetroArch.app/Contents/MacOS/RetroArch --verbose

Current machine I'm using with the core:

[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2 
[INFO] Version: 1.19.1
[INFO] Built: Jun  5 2024
[INFO] =================================================
[INFO] [Input]: Found input driver: "cocoa".
[INFO] [Core]: Loading dynamic libretro core from: ".../qemu_libretro.dylib"
io12 commented 3 weeks ago

Thanks! I'm aware of this issue, but QEMU normally relies on the OS to deinitialize everything when the process exits. There are lots of threads QEMU creates that it doesn't try to exit by itself. I will probably need to write my own code to track down all the threads and terminate them

io12 commented 3 weeks ago

I'm pretty sure this is fixed now. I'll close the issue once the new version makes it to the buildbot. I also made the "restart" menu option reset the VM.

zach-morris commented 4 days ago

I've tried this again, downloading the latest version available through the buildbot (dated 2024-11-19 15:19), both powering off the system (windows xp, linux, etc) and it still hangs. Reset also doesn't seem to do anything for me.