Musescore closes by opening an .xml file created with Logic Pro X

• Apr 22, 2016 - 15:16

Hello everyone,
It happens very often that I create a score in .xml format with Logic Pro X, and as soon as I try to open it with MuseScore closes and I reed this words: "MuseScore has unexpectedly quit."
Could you help me please ??

I use Mac Os and the latest versions of Musescore.
Thank you.

This is the .xml file:…


I can confirm the crash. It appears it has something to do with a note or rest of 0 duration, which isn't allowed (and doesn't make sense). I don't understand all the ins and outs of MusicXMl, but I think the file might be invalid - it seems to be missing a "division" tag in the first measure that would be necessary for MuseScore to understand the durations of the notes or rests in that measure. In fact, it seems more messed up than that in that the first measure is empty for all staves but has a different length for each, and also the piece doesn't "really" start until the second measure - that's where the clef, key signature, and time signature appear. So the first measure seems quited messed in several ways. Is there something unusual about that first measure when you view it in Logic? Can you delete that measure and try again?

Meanwhile, I tried manually deleting that measure from the MusicXML file, and your file now loads. I have attached the fixed version.

In reply to by Marc Sabatella

In logic I had left the first empty bar, but the audio region not contained, in fact the score was not there ... but I removed ...
Now musescore opened it ...
however, the problem is not the first time that happens to me, even with other projects, can you tell me how did you identify the specific error?

Then I would have another problem with midi, when I create a midi with logic, musescore interprets bad ... I leave you with a midi to let you know ...
thank you

This is the midi file:…

This is the image that shows how the score in Logic and how then interprets MuseScore:…

In reply to by Andrea O.

I have compiled MuseScore from source so I can run it from within a debugger. When it crashes under the debugger, I can see exactly what line of code produced the crash, and why. That told me it was a note or rest of duration 0 in the first measure of the staff. So then I just opened the MusicXML file in a text editor, and saw that sure enough, the first measure had all those errors.

If you are seeing this with other files too, then it seems Logic probably has a bug in its MusicXML export that produces corrupted files.

MIDI will never be nearly as good as MusicXML for transmitting scores to a notation program. It simply doesn't include nearly enough information. Basically, the sending program throws away half of what it might have known, and the receiving program has to guess how to reconstruct it. So, not surprising the result doesn't look much like the original. Think of MIDI as a last resort when nothign else is available, and expect to have to spend time recreating the missing information.

In reply to by Andrea O.

This file has the exact same error. The first measure is missing all the normal information you'd expect to see at the beginning of a score - the clec, key and time signature, etc. That informaiton instead aooears only in the *second* measure.

Sounds like you need to report the bug to the folks who produce Logic Pro X. The files they produce are not usable. MuseScore shouldn't crash, of course, so there is a bug at our end too - feel free to submit that as well, using Help / Report a Bug. But the files are not valid, so they really can't be opened meaningfully in any case.

Crashes in lates build from master too.

I get this debug Output:
Debug: importMusicXml(0x20170348, .../Infinite legend - piano, clarinetto e violino.xml) (...\MuseScore\mscore\importxml.cpp:252, Ms::Score::FileError Ms::importMusicXml(Ms::MasterScore*, const QString&))
Debug: Validation time elapsed: 2831 ms (...\MuseScore\mscore\importxml.cpp:198, Ms::Score::FileError Ms::doValidate(const QString&, QIODevice*))
Debug: importMusicXml() file .../Infinite legend - piano, clarinetto e violino.xml' is a valid MusicXML file (...\MuseScore\mscore\importxml.cpp:201, Ms::Score::FileError Ms::doValidate(const QString&, QIODevice*))
Debug: importMusicXMLfromBuffer(score 0x20170348, name '.../Infinite legend - piano, clarinetto e violino.xml', dev 0x28ba80) (...\MuseScore\mscore\importmxml.cpp:37, Ms::Score::FileError Ms::importMusicXMLfromBuffer(Ms::Score*, const QString&, QIODevice*))
Debug: system distance 8.100000 (...\MuseScore\mscore\importmxmlpass1.cpp:1389, void Ms::MusicXMLParserPass1::defaults(int&, int&))
Debug: partGroupStart number=1 part=0 symbol=bracket (...\GitHub\MuseScore\mscore\importmxmlpass1.cpp:1577, void Ms::partGroupStart(Ms::MusicXmlPartGroupMap&, int, int, QString, bool))
Debug: partGroupStart number=2 part=0 symbol=none (...\MuseScore\mscore\importmxmlpass1.cpp:1577, void Ms::partGroupStart(Ms::MusicXmlPartGroupMap&, int, int, QString, bool))
Debug: Error at line 97 col 39: illegal or uninitialized divisions (...\MuseScore\mscore\importmxmlpass1.cpp:533, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: Error at line 100 col 19: calculated and specified duration invalid (...\MuseScore\mscore\importmxmlpass1.cpp:533, void Ms::MusicXMLParserPass1::logError(const QString&))
Debug: MusicXMLParserPass2::parse() (...\MuseScore\mscore\importmxmlpass2.cpp:1609, Ms::Score::FileError Ms::MusicXMLParserPass2::parse(QIODevice*))
Debug: Error at line 97 col 39: illegal or uninitialized divisions (0) (...\MuseScore\mscore\importmxmlpass2.cpp:1535, void Ms::MusicXMLParserPass2::logError(const QString&))
Debug: Error at line 100 col 19: calculated and specified duration invalid (...\MuseScore\mscore\importmxmlpass2.cpp:1535, void Ms::MusicXMLParserPass2::logError(const QString&))

Looks like a diviion by 0 error at first glance.

Stack trace:
1 Ms::Fraction::ticks fraction.cpp 185 0x81b99d
2 Ms::determineDuration importmxmlpass2.cpp 3773 0x44f117
3 Ms::MusicXMLParserPass2::note importmxmlpass2.cpp 4243 0x4515cb
4 Ms::MusicXMLParserPass2::measure importmxmlpass2.cpp 2074 0x444923
5 Ms::MusicXMLParserPass2::part importmxmlpass2.cpp 1752 0x443307
6 Ms::MusicXMLParserPass2::scorePartwise importmxmlpass2.cpp 1661 0x442bfe
7 Ms::MusicXMLParserPass2::parse importmxmlpass2.cpp 1630 0x442a3a
8 Ms::MusicXMLParserPass2::parse importmxmlpass2.cpp 1611 0x442990
9 Ms::importMusicXMLfromBuffer importmxml.cpp 50 0x42ba4f
10 Ms::doValidateAndImport importxml.cpp 235 0x5f4451
11 Ms::importMusicXml importxml.cpp 265 0x5f46d4
12 Ms::readScore file.cpp 2066 0x59b0ce
13 Ms::MuseScore::readScore file.cpp 319 0x58c6f0
14 Ms::MuseScore::openScore file.cpp 300 0x58c5bc
15 Ms::MuseScore::loadFiles file.cpp 281 0x58c352
16 Ms::MuseScore::cmd musescore.cpp 4184 0x4977fc
17 Ms::MuseScore::cmd musescore.cpp 4056 0x496f20
18 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 825 0x68829a
19 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a07a62
20 ZN12QActionGroup7hoveredEP7QAction 0x19315295

Please open an issue for this, at

Do you still have an unanswered question? Please log in first to post your question.