Crash on loading a file with incomplete slur spanners and linked parts

• Jan 26, 2013 - 07:27
Type
Functional
Severity
S2 - Critical
Status
closed
Project

I get a segfault:
This file was created by a precedent build.
Revision 82f1b1f
Compiled in Mageia (Linux)

Attachment Size
TELL_ME_A_JAZZ_STORY.mscz 8.89 KB

Comments

The problem seems to lie in slurs (slur spanners?).
Indeed, by manually extracting the mscx file and deleting, by mean of a text editor, all slur instances, I managed to load the file.
Here is a retrieved version, saved with revision 4d17135 (Windows XP SP3, personal build).

Attachment Size
TELL_ME_A_JAZZ_STORY_retrieved.mscx 99.44 KB

[ For what concerns file format (if I understood the question):
mscz = compressed MuseScore file
mscx = uncompressed MuseScore file
The two formats are equivalent (there are maybe differences if embedded images are present). ]

If possible, can you try opening the file in one recent build and re-insert the slurs as they were in the original file?
Then can you save in a new file and post it here?
Thanks.
I am trying to understand where the problem comes from and if there may be incompatibilities between saving and loading files.

I am not sure if the retrieved file is a "legitimate" file or not. When loading, I see problem when toggling concert pitch on and off, but I am not sure if maybe this is a different bug not necessarily related to this specific file.

Title Opening attached score causes crash Crash on loading a file with incomplete slur spanners

After more analysis, I found that the crash is due to the presence of some incomplete slurs, in particular slurs without end element.

Changing title accordingly.

Title Crash on loading a file with incomplete slur spanners Crash on loading a file with incomplete slur spanners and linked parts

Thanks for the file.
Indeed, the file opens without problem. However, if I manually delete one of the Slur end element, there is a crash.
If the linked part is manually removed from the file, such crash disappears.
So I think that the crash is related to the presence of both an incomplete slur spanner AND a linked part.
Changing the title accordingly.

Could it be a conflict between the slur in the score and the slur in the linked part?

Status (old) active patch (code needs review)

Submitted a pull request:
https://github.com/musescore/MuseScore/pull/216
which fixes loading of this file.
The presence of a second xml tag due to the presence of the linked part was originating a second loop over the list of spanners. This second loop was trying to access spanners which had already been deleted during the first loop (for the first tag). By deleting these incomplete spanners also from the list, the program no more tries to access them, thus avoiding the segfault.