libretro / LRPS2

GNU General Public License v2.0
165 stars 48 forks source link

Problems on Closing Content #132

Open Hari-82 opened 3 years ago

Hari-82 commented 3 years ago

core version: 78dcfc2

options: D3D11, Balanced setting

Description of the issue: The first launch the game runs fine but if I close content and load a new one Retroarch hangs and I need to force-closing.

upon re-launch of RA all works again, also after closing content a RA process hangs without closing in the task manager…

PC specifications: CPU: Intel Core i5 6400 @ 2.70GHz GPU: NVIDIA GeForce GTX 960 OS: Windows 10 64 Bit

jclsn commented 3 years ago

Same here. The second time the core is stuck at

[libretro INFO] isoFile open ok: /storage/roms/sdb1-usb-WDC_WDS_100T2B0A/Games/ROMs/ps2/Final Fantasy X (Germany).iso
[libretro INFO] Image type  = DVD
[libretro INFO]  * CDVD Disk Open: DVD, Single layer or unknown:
[libretro INFO]  * * Track 1: Data (Mode 1) (2246448 sectors)
[libretro INFO] McdSlot 0 [File]: /tmp/system/pcsx2/memcards/Mcd001.ps2
[libretro INFO] McdSlot 1 [File]: [is not memcard file]
[INFO] ALSA: Period size: 384 frames
[INFO] ALSA: Buffer size: 1536 frames
wifi is not available
[INFO] [Display]: Found display driver: "glcore".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[libretro INFO] Bios Found: Europe  v02.00(14/06/2004)  Console
[libretro INFO] BIOS rom1 module not found, skipping...
[libretro INFO] BIOS rom2 module not found, skipping...
[libretro INFO] BIOS erom module not found, skipping...
[libretro INFO] EE/iR5900-32 Recompiler Reset
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [SRAM]: SRAM wird nicht gespeichert.
[INFO] [Playlist]: Lade Verlaufs-Datei: [/storage/.config/retroarch/content_history.lpl].
[INFO] [Playlist]: Lade Verlaufs-Datei: [/storage/.config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Lade Verlaufs-Datei: [/storage/.config/retroarch/content_video_history.lpl].
[INFO] [Playlist]: Lade Verlaufs-Datei: [/storage/.config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Favoritendatei wird geladen: [/storage/.config/retroarch/content_favorites.lpl].
Delete 0 Shaders, 33 Programs, 27 Pipelines

The shaders and pipelines notifications comes every time. Then you have to kill retrorach from the command line and restart. I think afterwards memory is not freed right. After doing it quite a few times, top showed me very little memory left.

jclsn commented 3 years ago

This is the same point where closing sometimes doesn't work.

Delete 0 Shaders, 134 Programs, 28 Pipelines
[INFO] [Core]: Unloading game..
[INFO] [Core]: Unloading core..
[libretro INFO] (GameDB) Unloading...
[INFO] [Core]: Unloading core symbols..
[libretro INFO] Decommitting host memory for virtual systems...
[libretro INFO] Releasing host memory maps for virtual systems...
inactive123 commented 3 years ago

Yes, these issues are known about and unfortunately we don't know how to fix it yet. We'd be very grateful if someone could figure out a solution. We think it has to do with the MTVU/MTGS as well not properly stopping, and thus it keeps running in the background. Maybe it's even the threads wxWidgets itself spins up (which unfortunately despite slimming down on severely, we have not been able to eradicate completely yet - parts of the codebase still depend on it).

jclsn commented 3 years ago

I think it is related to this bug

https://github.com/libretro/pcsx2/issues/142

For me the core crashes as mentioned above after starting it the first time. Then I have to kill everything and it works. Third time crashes again.

So what asset would be cleared by completely killing Retroarch? Why would it be activated the first run and not the second? Maybe logical thinking helps narrow down the problem here. I get that PCSX2 is a pretty complex emulator though.

jqueuniet commented 2 years ago

Also experiencing this on Linux with latest core release, even with no game launched (using the BIOS menu). My experience can vary a lot depending on the audio driver used. With pulseaudio, I get a full crash with an assertion error.

Assertion 'pa_atomic_load(&(s)->_ref) >= 1' failed at ../src/pulse/stream.c:1683, function pa_stream_writable_size(). Aborting.

With sdl2, I lose the retroarch graphical output, but the process remains active and I need to kill it manually. Sending SIGTERM instead of SIGKILL with sometime output the following messages but keep the process active. A second SIGTERM is then necessary to fully terminate the process.

[libretro INFO] Decommitting host memory for virtual systems...
[libretro INFO] Releasing host memory maps for virtual systems...

With openal, I can return to the main retroarch menu after closing the content, but can't start it again.