MusicXML file import causes crash

• Aug 2, 2015 - 18:24
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Windows 7 HP. MuseScore 2.0.2.

(1). Import of the MusicXML file "crashes_musescore" causes a crash. Problem may be somewhere in bars 53-60 right at the end of the score.

(2) The MusicXML file "trio" was generated by Musescore. But re-importing the file causes all the notes to be replaced by question marks. The original Musescore file is also attached. (Note: Finale 2009 imports and plays the MusicXML file OK, but only after generating the following error message: "XML error at line 69: Attribute id must be declared for element type "midi interface").

Attachment Size
crashes_musescore.xml 208.24 KB
trio.mscz 16.34 KB
trio.xml 64.39 KB

Comments

Crash confirmed. Debug info:

Segment::add(Chord) there is already a Chord at 15:3:0(20520) track 1. score 0x1078f8a00

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000129
0x0000000100b69146 in Ms::Score::addElement (this=0x0, element=0x11078a610) at /Users/lvi/dev/MuseScore/libmscore/score.cpp:1361
1361 Element::Type et = element->type();
(gdb) bt
#0 0x0000000100b69146 in Ms::Score::addElement (this=0x0, element=0x11078a610) at /Users/lvi/dev/MuseScore/libmscore/score.cpp:1361
#1 0x00000001004276a5 in Ms::MusicXMLParserPass2::part (this=0x7fff5fbfceb8) at /Users/lvi/dev/MuseScore/mscore/importmxmlpass2.cpp:1674
#2 0x0000000100426f1d in Ms::MusicXMLParserPass2::scorePartwise (this=0x7fff5fbfceb8) at /Users/lvi/dev/MuseScore/mscore/importmxmlpass2.cpp:1561
#3 0x0000000100426d00 in Ms::MusicXMLParserPass2::parse (this=0x7fff5fbfceb8) at /Users/lvi/dev/MuseScore/mscore/importmxmlpass2.cpp:1530
#4 0x0000000100426c35 in Ms::MusicXMLParserPass2::parse (this=0x7fff5fbfceb8, device=0x7fff5fbfd2f8) at /Users/lvi/dev/MuseScore/mscore/importmxmlpass2.cpp:1511
#5 0x00000001003fb0bd in Ms::importMusicXMLfromBuffer (score=0x1078f8a00, name=@0x7fff5fbfd658, dev=0x7fff5fbfd2f8) at /Users/lvi/dev/MuseScore/mscore/importmxml.cpp:50
#6 0x000000010046dbfa in Ms::doValidateAndImport (score=0x1078f8a00, name=@0x7fff5fbfd658, dev=0x7fff5fbfd2f8) at /Users/lvi/dev/MuseScore/mscore/importxml.cpp:654
#7 0x000000010046db6c in Ms::importMusicXml (score=0x1078f8a00, name=@0x7fff5fbfd658) at /Users/lvi/dev/MuseScore/mscore/importxml.cpp:697
#8 0x0000000100207b2a in Ms::readScore (score=0x1078f8a00, name=@0x7fff5fbfd658, ignoreVersionError=false) at /Users/lvi/dev/MuseScore/mscore/file.cpp:2099
#9 0x0000000100207153 in Ms::MuseScore::readScore (this=0x1078dda00, name=@0x10901be90) at /Users/lvi/dev/MuseScore/mscore/file.cpp:328
#10 0x00000001005d3e9a in Ms::loadScores (argv=@0x7fff5fbff0f0) at /Users/lvi/dev/MuseScore/mscore/musescore.cpp:2020
#11 0x00000001005d3143 in main (argc=2, av=0x7fff5fbffaf0) at /Users/lvi/dev/MuseScore/mscore/musescore.cpp:5066

Cause (probably) found: the file imports without issues if the cross-voice slides (e.g. in measure 10) are removed. Exact error mechanism still not clear.

File crashes_musescore.xml still crashes current master, different (!) stack trace:

0 libsystem_kernel.dylib 0x00007fff919f3f06 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff88ceb4ec pthread_kill + 90
2 libsystem_c.dylib 0x00007fff855fd6df abort + 129
3 org.qt-project.QtCore 0x00000001184458c9 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9
4 org.qt-project.QtCore 0x0000000118447297 QMessageLogger::fatal(char const*, ...) const + 231
5 org.musescore.MuseScore 0x00000001100a437b Ms::SLine::linePos(Ms::Grip, Ms::System**) const + 5595 (line.cpp:730)
6 org.musescore.MuseScore 0x00000001100a5338 Ms::SLine::layout() + 408 (line.cpp:899)
7 org.musescore.MuseScore 0x0000000110019473 Ms::Glissando::layout() + 387 (glissando.cpp:342)
8 org.musescore.MuseScore 0x000000011008993e Ms::LayoutContext::collectPage() + 6366 (layout.cpp:3577)
9 org.musescore.MuseScore 0x000000011008c550 Ms::LayoutContext::layout() + 32 (layout.cpp:3773)
10 org.musescore.MuseScore 0x000000011008bf31 Ms::Score::doLayoutRange(int, int) + 5105 (layout.cpp:3760)
11 org.musescore.MuseScore 0x000000010fee6f89 Ms::Score::update() + 841 (cmd.cpp:221)
12 org.musescore.MuseScore 0x000000010f6d9d8f Ms::readScore(Ms::MasterScore*, QString, bool) + 3167 (file.cpp:2213)
13 org.musescore.MuseScore 0x000000010f6d8e05 Ms::MuseScore::readScore(QString const&) + 181 (file.cpp:329)
14 org.musescore.MuseScore 0x000000010fb6b258 Ms::loadScores(QStringList const&) + 2328 (musescore.cpp:2604)
15 org.musescore.MuseScore 0x000000010fb691bb main + 51163 (musescore.cpp:6359)
16 org.musescore.MuseScore 0x000000010f45b4e4 start + 52