MusicXML file import causes crash
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
Created separate issue for the second problem (which makes issue administration easier.
See #71896: [MusicXML import] Guitar part with both regular and tab staff imports with two tab staves and incorrect notes.
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.
Crash is caused by incorrect error handling which results in a slide being added to the score that has already been deleted.
Don't know if this will help, but what I can say is that I opens the file with this Nightly on February 18 (see image below, produced with it) : d94de65
However, I get a crash with this other Nightly the same day: 802fa8a
There are two commits interposed therebetween. So if the glissando / slide is invoked, the change occurred here ? https://github.com/musescore/MuseScore/pull/1536/files
Pull request #2162.
Note that with this fix, MuseScore does not crash anymore, but some slides are missing or incorrect. This will be fixed later. See #72796: [MusicXML Import] handle stop-start order for glissandos.
Fixed in branch master, commit 3bad235ec4
fix #71876
Fixed in branch master, commit 19aa4fa4b9
Merge pull request #2162 from lvinken/71876-musicxml-slide-crash
fix #71876
Automatically closed -- issue fixed for 2 weeks with no activity.
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
THere is no crash in current master.
Automatically closed -- issue fixed for 2 weeks with no activity.
relates to #270643: [EPIC] MusicXML import/export issues