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

Save State on Exit not called on restart #564

Closed
tomcw opened this Issue Jun 8, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@tomcw
Contributor

tomcw commented Jun 8, 2018

Repro:

  1. Enable Save State on Exit
  2. Exit AppleWin to create a save-state file
  3. Launch AppleWin to load the save-state file
  4. Change some h/w config, eg. ena/disable the mousecard
  5. This will restart the emulator, but not save the new state. Instead it will reload the previous at step-3

@tomcw tomcw added the bug label Jun 8, 2018

@tomcw

This comment has been minimized.

Show comment
Hide comment
@tomcw

tomcw Jul 30, 2018

Contributor

Launch AppleWin:

  • Snapshot_Startup()
    • There's a static bool bDone in Snapshot_Startup(), which is set true, blocking any further loads from this function.

Change some h/w config results in this sequence of events:

  • WM_USER_RESTART
  • WM_CLOSE
  • WM_DESTROY
  • Snapshot_Shutdown()
    • But CMouseInterface::SaveSnapshot(), m_bActive==false; so mousecard is not saved
    • There's a static bool bDone in Snapshot_Shutdown(), which is set true, blocking any further saves from this function.
  • main-loop restart occurs
  • Snapshot_Startup()
    • Does nothing, as static bool bDone==true

Close AppleWin:

  • WM_CLOSE
  • WM_DESTROY
  • Snapshot_Shutdown()
    • Does nothing, as static bool bDone==true
Contributor

tomcw commented Jul 30, 2018

Launch AppleWin:

  • Snapshot_Startup()
    • There's a static bool bDone in Snapshot_Startup(), which is set true, blocking any further loads from this function.

Change some h/w config results in this sequence of events:

  • WM_USER_RESTART
  • WM_CLOSE
  • WM_DESTROY
  • Snapshot_Shutdown()
    • But CMouseInterface::SaveSnapshot(), m_bActive==false; so mousecard is not saved
    • There's a static bool bDone in Snapshot_Shutdown(), which is set true, blocking any further saves from this function.
  • main-loop restart occurs
  • Snapshot_Startup()
    • Does nothing, as static bool bDone==true

Close AppleWin:

  • WM_CLOSE
  • WM_DESTROY
  • Snapshot_Shutdown()
    • Does nothing, as static bool bDone==true

@tomcw tomcw closed this in 898f30f Jul 31, 2018

@tomcw tomcw added this to the 1.27.7 milestone Aug 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment