Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto save not working with latest nightly #3829

Closed
ghost opened this issue Oct 19, 2016 · 7 comments
Closed

Auto save not working with latest nightly #3829

ghost opened this issue Oct 19, 2016 · 7 comments

Comments

@ghost
Copy link

ghost commented Oct 19, 2016

After seeing Issue #3049 I tried the latest nightly build (2016-10-19) and I am still having issues. It appears to automatically save the state the first time. However, after closing and re-opening Retroarch, it will not overwrite the save state.

Steps to reproduce:
Download fresh copy of latest build and extract it

Open RetroArch, turn on these options:

  • Settings -> Saving -> Sort Saves In Folders
  • Settings -> Saving -> Sort Savestates In Folders
  • Settings -> Saving -> Auto Save State
  • Settings -> Saving -> Auto Load State

Download Gameboy core (TGB Dual)
Load any .gb rom
Use the shortcut key to exit RetroArch (auto save state is created)
Open RetroArch and load the same core/content (auto load state ok)
Use the shortcut key to exit RetroArch (this time, the save state is NOT overwritten)

@lasers
Copy link
Contributor

lasers commented Oct 29, 2016

Here's my report (latest). Same options and TGB Dual. I exit via In-Game Menu.

First Second Third
f58d7f Retro.rtc 244554 Retro.rtc 58b615 Retro.rtc
d4a627 Retro.srm d4a627 Retro.srm d4a627 Retro.srm
19b148 Retro.state.auto 7546d3 Retro.state.auto 669c5f Retro.state.auto

@lasers
Copy link
Contributor

lasers commented Oct 29, 2016

Here's my report (latest). Same options and TGB Dual. I exit via WM's kill.

First Second Third
2da361 Game.rtc 642002 Game.rtc 3569cf Game.rtc
fdb8ef Game.srm fdb8ef Game.srm fdb8ef Game.srm
7b82a2 Game.state.auto 7b82a2 Game.state.auto 7b82a2 Game.state.auto

@lasers
Copy link
Contributor

lasers commented Oct 29, 2016

Here's my report (latest). Same options and TGB Dual. I exit via Escape shortcut.

First Second Third
62a796 Arch.rtc 749023 Arch.rtc 3ebbdc Arch.rtc
7f093e Arch.srm 7f093e Arch.srm 7f093e Arch.srm
b32818 Arch.state.auto b32818 Arch.state.auto b32818 Arch.state.auto

@andres-asm
Copy link
Contributor

I just tried. My results:

  • Close content: auto saves as expected
  • Close via quit retroarch: auto saves as expected
  • Close via hotkey: doesn't auto save

@nadenislamarre
Copy link
Contributor

my current tests with the hotkey (on ubuntu linux / batocera.linux) :

  • 07/01/2017 sources : it works only the first time. after, nothing is saved.

after some debugging, it looks like that loading works, but saving create a new file with the previous content of the file itself and not the current game state.

when saving the state

  • there is a mecanism to save in memory the state.auto before erasing it when it exists to be able to rollback.

the file state.auto is saved each time on the disk, but not with the correct content.
It looks like it is saving it again with the backed up content. (so, erasing it with itself.)

in task_save.c, line 1151, replacing :

     if (path_file_exists(path)) { // state.auto
       task_push_load_and_save_state(path, data, info.size, true, autosave);
     } else {
        task_push_save_state(path, data, info.size, autosave);
     }

by
if(false)

solve the issue, but it's a quite and dirty fix for the moment. I've not yet found the root cause.

@torch2424
Copy link

torch2424 commented Feb 27, 2017

I am currently experiencing this as well on the latest retropie.

Though, another hack-y, not true, solution to this is simply set up the auto save intervals:

vim /opt/retropie/configs/all/retroarch.cfg

And set the following lines (May not be next to one another):

savestate_auto_save = true
savestate_auto_load = true
autosave_interval = 10

autosave_interval is measured in seconds. So do whatever you see fit. I came across this as I am making gifts, and wanted to ensure no one lost their saves :)

@andres-asm
Copy link
Contributor

#4896
this fixes it for me

0-wiz-0 pushed a commit to NetBSD/pkgsrc-wip that referenced this issue Jun 1, 2017
– AUTOSAVE/SRAM – Fix bug #3829 / #4820 (libretro/RetroArch#3829)
– ENDIANNESS: Fixed database scanning. Should fix scanning on PS3/WiiU/Wii, etc.
– NET: Fix bug #4703 (libretro/RetroArch#4703)
– ANDROID: Runtime permission checking
– ANDROID: Improve autoconf fallback
– ANDROID: Improve shield portable/gamepad device grouping workaround
– ANDROID: Allow remotes to retain OK/Cancel position when menu_swap_ok_cancel is enabled
– LOCALIZATION: Update/finish French translation
– LOCALIZATION: Update German translation
– LOCALIZATION: Update Japanese translation
– LOCALIZATION/GUI: Korean font should display properly now with XMB/MaterialUI’s default font
– MENU: Improved rendering for XMB ribbon; using additive blending (Vulkan/GL)
– OSX/MACOS: Fixes serious memory leak
– WINDOWS: Added WASAPI audio driver for low-latency audio. Both shared and exclusive mode.
– WINDOWS: Added RawInput input driver for low-latency, low-level input.
– WINDOWS: Core mouse input should be relative again in cores
– MISC: Various frontend optimizations.
– VIDEO: Fix threaded video regression; tickering of menu entries would no longer work.
– WII: Fix crashing issues which could occur with the dummy core
– WIIU: HID Controller support
– WIIU: XMB/MaterialUI menu driver support
– WIIU: Initial network/netplay support
– LOBBIES: Fallback to filename based matching if no CRC matches are found (for people making playlists by hand)
– LOBBIES: GUI refinement, show stop hosting when a host has been started, show disconnect when playing as client
– LOBBIES: if the game is already loaded it will try to connect directly instead of re-loading content (non-fullpath cores only)
– LOBBIES: unify both netplay menus
– THUMBNAILS: Thumbnails show up now in Load Content -> Collection, Information -> Database
– VITA: Fix slow I/O
– VITA: Fix 30fps menu (poke into input now instead of reading the entire input buffer which apparently is slow)
– VITA: Fix frame throttle
– VULKAN: Unicode font rendering support. Should fix bad character encoding for French characters, etc.
– VULKAN: Fix some crashes on loading some thumbnails
– AUDIO: Audio mixer support. Mix up to 8 streams with the game’s audio.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants