Crash when adding and saving scores if the Album file and mscz files are not located in the same place.

• Dec 14, 2014 - 12:30
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Nightly, December 13 (7a67e63)

It's a curious and tricky issue. But after some hours of incomprehension, failing to tell at this moment what really happens, I can now reproduce systematically the crash.

I use alternatively Windows 7 and Windows 8 (same result) with last version of Firefox (34.0.5)

Sorry, the description is a little long, but without details and precise steps, it is really incomprehensible.

So:

1. Create a score for violon and an other for flute. or use these files:
Violin.mscz
Flute.mscz
2. Go to: File -> Album -> New -> Fill Name, e.g. Violon-Flute
3. Press "Join Scores" -> Save .mscz file : Violin Flute.mscz
4. Press "Close" -> you are invited to Save in the .album file format
5. So : Save

Result: you have now on your Desktop (my destination choice) four files. Like this:
files desktop.jpg

6. Now, tidy up in a temporary file folder (on desktop always) all these files, except the .album file. See:
album file and file folder.jpg

7. Reopen MuseScore -> File -> Album -> Load "Violin Flute.album".
8. Add a new score (the same Violin file e.g., but it is not necessary in fact to adding a third score: it's only to support the demonstration)
9. Press "Join Scores" -> Save (.mscz file)

Result: crash
crash album.jpg

Additionnal notes:

- If you put back on the desktop an only file (Violin or Flute e.g.), and you start again the process (steps # 7 to #9), you obtained an error message after « Join Scores » → Save

error message.jpg

- If you put back on the desktop only the « double » file (Violin-Flute) : crash again

- And If you put back on the desktop all the (three) files, as first attached image ("files desktop") : it's works again. And you may save a new .mscz file after doing : Save → Close : Violin Flute 1.mscz

Attachment Size
Violin.mscz 4.52 KB
Flute.mscz 4.47 KB
Violin Flute.mscz 4.68 KB
files desktop.jpg 10.19 KB
album file and file folder.jpg 7.19 KB
crash album.jpg 21.24 KB
error message.jpg 17.32 KB
Violin Flute 1.mscz 4.88 KB

Comments

The .album files contain a hard coded list of files, using absolute pathnames, so if any of those files gets moved someplace else, it won't be found anymore.
Apparently MuseScore crashes on that rather than just complaining about a missing file?

So, the crash took place on last November 28.

- Between this nigthly, correct : https://github.com/musescore/MuseScore/commit/94c902213d25e11b4952f550f…

- and this one, with a crash: https://github.com/musescore/MuseScore/commit/d85bee21ad42ce5e89bf50a6e…

There was some other commits the same day. It is not possible to know where this one is in time with respect to both nightlies mentioned. But that could be the cause, maybe? : https://github.com/musescore/MuseScore/pull/1482/files

Note that before this, error messages were sent. Like this, for an other example: album flute - saxophone.

- The first for the not found flute file.

File no found flute.jpg
- And a second for the not found sax file.

file no found saxo.jpg

- From the nigthly or commit mentioned, there is a crash.

crash november 28 on d85bee2.jpg

does it only crash when if finds none of the files?
I can't reproduce with just one of several files missing.

But indeed I can if if find none of the files mention in the album.

It crashes on accessing lastMeasure->endTick(); while lastMeasure is NULL in Score::appendScore()

Fix should be simple