Skip to content

BizHawk crashes during saving when save files are in use by other processes (Dropbox) #4258

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

Open
ladybunne opened this issue Mar 4, 2025 · 2 comments
Labels
App: EmuHawk Relating to EmuHawk frontend Repro: Affects 2.10.1 dev Reproducible in current dev builds

Comments

@ladybunne
Copy link

ladybunne commented Mar 4, 2025

Summary

When BizHawk attempts to save to a file that is being accessed by Dropbox, an error dialog will pop up, then BizHawk will crash entirely.

I'm on Windows, using a personally modified version of BizHawk forked from late 2.9 cc0f141, with some minor changes to file extensions - nothing that would affect this.

Ideally this should fail and try again later, rather than crash the entire program.

I've tried to find similar issues and can't find any, apologies if I missed any. I also apologise if this has been fixed with 2.10.

Repro

  1. Run BizHawk while its save directory is pointed at a directory managed by Dropbox.
  2. Play a game, optionally with autosaving enabled.
  3. Wait for a clash between BizHawk autosaving and Dropbox syncing.

Output

System.IO.IOException: The process cannot access the file 'C:\Users\Ladybunne\Dropbox\Media\Games\Emulation\SaveRAM\GBA\Yu-Gi-Oh! - Ultimate Masters - World Championship Tournament 2006 (USA) (En,Ja,Fr,De,Es,It).Autosave.srm.bak' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileInfo.Delete()
   at BizHawk.Client.EmuHawk.MainForm.FlushSaveRAM(Boolean autosave) in C:\Users\Ladybunne\repos\BizHawk\src\BizHawk.Client.EmuHawk\MainForm.cs:line 2002
   at BizHawk.Client.EmuHawk.MainForm.StepRunLoop_Core(Boolean force) in C:\Users\Ladybunne\repos\BizHawk\src\BizHawk.Client.EmuHawk\MainForm.cs:line 3051
   at BizHawk.Client.EmuHawk.MainForm.ProgramRunLoop() in C:\Users\Ladybunne\repos\BizHawk\src\BizHawk.Client.EmuHawk\MainForm.cs:line 897
   at BizHawk.Client.EmuHawk.Program.SubMain(String[] args) in C:\Users\Ladybunne\repos\BizHawk\src\BizHawk.Client.EmuHawk\Program.cs:line 352

Host env.

Image

@ladybunne ladybunne changed the title (issue title -- summarise the summary) BizHawk crashes during saving when save files are in use by other processes (Dropbox) Mar 4, 2025
@YoshiRulz YoshiRulz added App: EmuHawk Relating to EmuHawk frontend Repro: Affects 2.9.1 dev Needs to be re-triaged labels Mar 4, 2025
@YoshiRulz
Copy link
Member

YoshiRulz commented Mar 4, 2025

Only prior issue I see is #1466 (I guess it's not failing silently anymore), and there's my notes #189.

@YoshiRulz YoshiRulz added Repro: Affects 2.10.1 dev Reproducible in current dev builds and removed Repro: Affects 2.9.1 dev Needs to be re-triaged labels Mar 4, 2025
@Morilli
Copy link
Collaborator

Morilli commented Mar 6, 2025

fwiw I tested #1466 and emuhawk DOES throw an exception as it does currently, so there was never a silent fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: EmuHawk Relating to EmuHawk frontend Repro: Affects 2.10.1 dev Reproducible in current dev builds
Projects
None yet
Development

No branches or pull requests

3 participants