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

Can't recover more than one never-saved score #17238

Open
shoogle opened this issue Apr 13, 2023 · 1 comment
Open

Can't recover more than one never-saved score #17238

shoogle opened this issue Apr 13, 2023 · 1 comment
Labels
needs design Design is needed P2 Priority: Medium

Comments

@shoogle
Copy link
Contributor

shoogle commented Apr 13, 2023

Issue type

Other type of issue

Bug description

If you create multiple new scores, and MuseScore crashes before you have a chance to save some of them, you will never be able to recover any except the last one you created.

Steps to reproduce

  1. Create a new score (Score 1). Keep it open but don't save it.
  2. Create another new score (Score 2).
  3. Close Score 2 the normal way, with or without saving.
  4. Back in Score 1, go to DevTools > Crash handler > Crash.
  5. Launch MuseScore again.

Expected behaviour: MuseScore offers to recover the previous session (i.e. Score 1).
Actual behaviour: MuseScore does not recover Score 1.

Another variant of this issue:
In step 3, instead of closing Score 2 the normal way, crash MuseScore and then continue with the other steps.

Expected behaviour: MuseScore offers to recover both sessions (Score 1 and Score 2).
Actual behaviour: MuseScore only offers to recover Score 2.

Screenshots/Screen recordings

image

MuseScore Version

Latest nightly build (95280d8)

Regression

No.

Operating system

All

Additional context

As soon as you create a score, MuseScore immediately creates a backup copy called new_project.mscz at the following hidden location:

  • Windows: %LOCALAPPDATA%\MuseScore\MuseScore4\
    • E.g. C:\Users\USERNAME\AppData\Local\MuseScore\MuseScore4\
  • macOS: ~/Library/Application Support/MuseScore/MuseScore4/
  • Linux: ~/.local/share/MuseScore/MuseScore4/

Because this backup file is always called new_project.mscz, it overwrites the previous backup file so only the last created score can be recovered. Instead, we should number the backups new_project1.mscz, new_project2.mscz. or add a creation timestamp to the name like: new_project_created_2023-04-13-183724.mscz.

We also need a design for the dialog that will appear when more than one backup score is available to recover. The information available for this dialog is:

  • The filename of the backup file, which could include the session number or creation date as mentioned above.
  • The modification date of the backup file (i.e. the time at which the last autosave occurred).

We could also display information from within the file, such as the score title and thumbnail image, but it might be better to avoid this in case the file is corrupt (e.g. if MuseScore crashed during the autosave operation).

The user should be able to recover all the files and then choose whether or not the keep each of them.

@muse-bot muse-bot added the needs review The issue needs review to set priority, fix version or change status etc. label Apr 13, 2023
@shoogle shoogle added needs design Design is needed and removed needs review The issue needs review to set priority, fix version or change status etc. labels Apr 13, 2023
@shoogle shoogle added the P2 Priority: Medium label Apr 13, 2023
@shoogle
Copy link
Contributor Author

shoogle commented Apr 13, 2023

See https://musescore.org/en/node/347446#comment-1185539 and prior discussion.

@DmitryArefiev DmitryArefiev added this to To do in 4.x SHORTLIST via automation Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs design Design is needed P2 Priority: Medium
Projects
4.x SHORTLIST
  
To do
Development

No branches or pull requests

4 participants