libretro / gpsp

gpSP for libretro.
GNU General Public License v2.0
52 stars 52 forks source link

[VITA][1.9.4] GPSP core crashes retroarch in various ways #132

Closed spriteice closed 3 years ago

spriteice commented 3 years ago

As per title, my issue is present on the VITA 1.9.4 stable build

My device is a PSVITA Slim 3.60 henkaku enso, using sd2vita and max overclock via PSVshell

I am using clean dumped md5 verified roms.

Md5 verified bios file is present.

I updated retroarch by deleting the previous app and installing 1.9.4 in it's place.

[ISSUE]

All issues present after updating to 1.9.4

When loading a game using the GPSP core the game loads and runs fine.

When exiting the game within retroarch, the GUI loads fine. However, if I try to load a different game through another core Retroarch crashes.

Retroarch also crashes if I have a game loaded within GPSP and try to exit Retroarch directly from that state.

I have since rolled back to 1.9.3 and the issue is completely gone, everything is working as expected again.

1.9.4 GPSP core = 261b2db

1.9.3 GPSP core = cc1a074

Thanks again devs for all your hard work and passion on this project. Retroarch is an amazing peice of software to have on a device such as a PSVITA.

davidgfnet commented 3 years ago

Is this happening with other cores? Got the feeling it might not be a gpsp issue.

negativeExponent commented 3 years ago

dunno if this is still the case, but troubleshooting with console targets (wii in my case) running on dolphin, i've noticed that loading a new content using the same core will skip retro_init() and run directly from retro_load_game(). This is fine in most cases, but this core gpsp, and pcsx for example initializes some core-specific routines in retro_init(), instead of usually from retro_load_game. and most "core runs fine but crashes when loading another game using the same core" issue are mostly console targets like vita, wii etc.

might try moving some of these core-specific stuff from retro_init() to retro_load_game(), this wouldnt do harm in most cases since a lot of other cores are running it this way. imho.

just to add, static variables/global vars not reset on startup will also cause problems on this console platforms.

UPDATE: retro_unload_game() & retro_deinit() should probably need a looked into aswell if one or both are called when load a different content with the same core.

imho

@twinaphex

jdgleaver commented 3 years ago

@negativeExponent I wonder if you have the option Settings > Cores > Always Reload Core on Run Content disabled? This is an advanced setting for static platforms that should be enabled by default, and which should ensure that cores are properly forked/initialised when loading content. The option to disable this is mainly there for developers (and users who understand the implications), so load times can be reduced when testing 'well behaved' cores.

Note that there was a (very) long-standing bug RetroArch that effectively disabled Always Reload Core on Run Content when using the file browser to load content (rather than a playlist). I fixed this in May: https://github.com/libretro/RetroArch/pull/12385