Skip to content

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

Open
@ladybunne

Description

@ladybunne

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    App: EmuHawkRelating to EmuHawk frontendRepro: Affects 2.10.1 devReproducible in current dev buildsRepro: Patch pendingPotentially fixed in dev builds, see readme for download

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions