libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.1k stars 1.81k forks source link

Cannot undo load state on the auto-loaded state (only in SameBoy core) #15414

Open pressRtowin opened 1 year ago

pressRtowin commented 1 year ago

First and foremost consider this:

Description

I originally reported this in the SameBoy repo here: https://github.com/LIJI32/SameBoy/issues/553 SameBoy's developer thinks this is more likely to be a RetroArch related issue, despite only affecting the one core (see that issue for their explanation). At their request, I'm opening the issue here for further investigation into this possibility. The below is copied and pasted from the original issue:

Bit of a weird issue, and I'm not positive that this is a core issue and not a RetroArch issue, but so far SameBoy is the only affected core I've found.

When using the option to automatically load the last state when opening content, attempting to undo that load results in an error message stating that no state was loaded to undo. This only happens with the initial auto load. Manually loading a state and undoing it works fine. And as stated before, among the 20 or so cores I use, I've only discovered this issue in SameBoy.

This was tested on multiple Android devices. Unfortunately, I have no access to a PC for the time being.

Expected behavior

A state is automatically loaded when content is launched. Selecting "undo load state" after this reverts the content back to its freshly launched state, as is the behavior on every other core (that I've tested).

Actual behavior

Selecting "undo load state" after a state is automatically loaded results in a notification that no state was loaded.

Please note that simply using the "restart" option is not a suitable workaround, as the save data associated with whichever state was loaded remains loaded at this point (and has overwritten whatever data existed before).

Steps to reproduce the bug

  1. Enable auto state loading.
  2. Launch content with SameBoy and save a state.
  3. Close content.
  4. Load the content with SameBoy again.
  5. After the state is automatically loaded, select the "Undo load state" option.

Bisect Results

Haven't tested for this extensively, but the issue has occurred for as long as I've been testing out SameBoy (about the past few weeks).

Version/Commit

You can find this information under Information/System Information

Environment information

pressRtowin commented 5 months ago

I have some more info on this that I recently discovered. Very rarely, and seemingly randomly, this issue will not occur, and the "Undo load state" option will work as expected. I have no clue what makes it work or not work.