MuseScore crashes on import of MusicXML file exported from Sibelius

• Aug 3, 2017 - 09:41
Reported version
2.1
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Mac OS X El Capitan 10.11.6
Musescore 2.1 and Musescore Nightly Release 9318917

Crash dump attached.
Attached and renamed .txt as your form doesn't allow uploading of .crash

I will try and open with a generic xml editor and see if it reports any errors.

Both .xml(1.7Mb) and .mxl(54kb) files for the same score crash musescore.
Attached the .mxl file

Attachment Size
05 Brindisi.mxl 52.47 KB
mscore_2017-08-03-141424_pony.crash_.txt 84.63 KB

Comments

Confirmed with a selfbuild 9318917 (master) on Windws 7.

Stack trace:
1 ?? 0x8b1089e4
2 Ms::ScoreElement::isRest scoreElement.h 209 0xe2e01a
3 Ms::ScoreElement::isChordRest scoreElement.h 290 0xe2d873
4 Ms::lastChordTicks importmxmlpass2.cpp 127 0x43d631
5 Ms::MusicXmlLyricsExtend::setExtend importmxmlpass2.cpp 153 0x43d7b2
6 Ms::addLyric importmxmlpass2.cpp 763 0x44001b
7 Ms::addLyrics importmxmlpass2.cpp 796 0x44013d
8 Ms::MusicXMLParserPass2::note importmxmlpass2.cpp 4573 0x45399c
9 Ms::MusicXMLParserPass2::measure importmxmlpass2.cpp 2090 0x445218
10 Ms::MusicXMLParserPass2::part importmxmlpass2.cpp 1759 0x443b25
11 Ms::MusicXMLParserPass2::scorePartwise importmxmlpass2.cpp 1664 0x4433b0
12 Ms::MusicXMLParserPass2::parse importmxmlpass2.cpp 1633 0x4431f3
13 Ms::MusicXMLParserPass2::parse importmxmlpass2.cpp 1614 0x44317e
14 Ms::importMusicXMLfromBuffer importmxml.cpp 50 0x42b869
15 Ms::doValidateAndImport importxml.cpp 233 0x622c6c
16 Ms::importMusicXml importxml.cpp 263 0x622e21
17 Ms::readScore file.cpp 2160 0x5b76d9
18 Ms::MuseScore::readScore file.cpp 329 0x5a774a
19 Ms::MuseScore::openScore file.cpp 310 0x5a7624
20 Ms::MuseScore::loadFiles file.cpp 291 0x5a7305
...

Prior to the Crash it produces some debug Output:
Debug: system distance 9.200000 (...\MuseScore\mscore\importmxmlpass1.cpp:1408, void Ms::MusicXMLParserPass1::defaults(int&, int&))
Debug: Error at line 41155 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 41197 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 41239 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 41281 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 41670 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 42298 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\GitHub\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 43370 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 44012 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 58925 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 59635 col 10: calculated duration (3/8) not equal to specified duration (1/4) (C...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 60722 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 61423 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 64468 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 65026 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 65911 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 66452 col 10: calculated duration (3/8) not equal to specified duration (1/4) (...\MuseScore\mscore\importmxmlpass1.cpp:537, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Info at line 268 col 27: break on first measure (...\MuseScore\mscore\importmxmlpass2.cpp:1522, void Ms::MusicXMLParserPass2::logDebugInfo(const QString&))

Title Musescore crashes on import of an xml file exported from Sibelius MuseScore crashes on import of MusicXML file exported from Sibelius

The errors in the log are due to part 7 starting at measure 190.
It seems to be several measures with 2 quarter notes in a chord but for the some reason, the second one is shorter than the first one. MuseScore is confused because the MusicXML states they are dotted quarter but the duration doesn't match, the second one has the duration of a quarter. It's the same in several measures in this part after measure 190.
Also part 8, measure 17.

Even with this fixed, the file cannot be loaded by MuseScore 2.1 but it works in a 2.2-dev.

Maybe we could make the importer smarter

Attachment Size
05 Brindisi.mscz 51.99 KB

The crash is caused by lyrics attached to grace notes, which are currently not possible with MuseScore. If all the grace notes with lyrics are deleted, the file can be loaded (but obviously with missing notes/lyrics).

Does it make any sense to have lyrics on grace notes ? If so, is there any plan to support it ? If not, what would be the desired behaviour ? Ignore them ? Move to the next non-grace note (possibly unless it already has lyrics) ?

Preventing the crash by ignoring lyrics on grace notes should be trivial and is the minimum we should do.

Note that different length notes in a chord are legal in MusicXML, will have to check if the error is correct or incorrect.

Re: Does it make sense to have lyrics on grace notes?

The score in question was imported using a plugin for Sibelius, from a fairly old PD score.

Now that I've drawn attention to the lyrics being attached to grace notes the person who cleaned it up after the scan has found several other oddities she is attributing to the scanning software.

thanks for the help.

Anita Graham

Further investigation (on the trunk, did not check 2.1) shows it crashes when a lyric on a grace note has a lyric word extension line (indicated by the MusicXML extend element). This causes an access violation when trying to determine the size (duration) of the extension.

Status (old) active patch (ready to commit)
Status active PR created

Pull request 3277.

Note that Elaine Gould's "Behind bars" provides the answer to my question: yes, it is possible to have lyrics on grace notes. Don't know how common it is, though.