MusicXML export: crash when exporting hairpins

• Apr 24, 2018 - 09:46
Reported version
2.2
Type
Functional
Severity
S2 - Critical
Status
closed
Project

The score from https://musescore.org/en/node/271697 (attached here too) crashes MuseScore when trying to export as MusicXML.
MuseScore 2.2.1, Windows 7,
2.1 (PortableApp) does not crash, so this is a regression.

Latest master (10af232) crashes already on opening the score, with a failed assertion:
Fatal: ASSERT: "e == 0 || e->isText()" in file .../MuseScore/libmscore/scoreElement.h, line 511 (.../MuseScore/libmscore/scoreElement.h:511, ), this most probably is a variant of #271606: MusicXML: xml file causes crash due to failed assertion

See also https://musescore.com/groups/improving-musescore-com/discuss/5017191

Attachment Size
String Quartet.Movement.24.4.18.mscz 55.84 KB

Comments

I guess that musescore-backend branch needs to be brought into sync with 2.1.1 first?

I've just verified with the AppVeyor artifact, that your PR fixes the crash for me on Windows 7

Tags View Changes

In master (with above mentioned fix to prevent it from crashing when opening the score):
Fatal: ASSERT: "!isEmpty()" in file C:/Qt/5.9.5/mingw53_32/include/QtCore/qlist.h, line 349 (C:/Qt/5.9.5/mingw53_32/include/QtCore/qlist.h:349, )

Using the fix from here in master fixed the assertion failure, but then it crashes at a different place, with a real crash, stack trace:
1 ?? 0x3ff
2 Ms::Element::canvasPos element.cpp 417 0x7a0d6f
3 Ms::Element::canvasBoundingRect element.h 252 0xe061b5
4 Ms::TextBase::setProperty text.cpp 2620 0x89c5a1
5 Ms::ScoreElement::styleChanged scoreElement.cpp 571 0x926c68
6 Ms::Page::styleChanged page.cpp 201 0x816d31
7 Ms::updateStyle score.cpp 1198 0x8359ef
8 Ms::Score::scanElements score.cpp 1703 0x836efb
9 Ms::Score::styleChanged score.cpp 1208 0x835a1c
10 Ms::ChangeStyleVal::flip undo.cpp 1375 0x8c29f8
11 Ms::UndoCommand::undo undo.cpp 148 0x8be63e
12 Ms::UndoCommand::unwind undo.cpp 173 0x8be811
13 Ms::Score::endCmd cmd.cpp 177 0x8c6a97
14 Ms::ExportMusicXml::write exportxml.cpp 5356 0x640290
15 Ms::saveXml exportxml.cpp 5377 0x6404fc
16 Ms::MuseScore::saveAs file.cpp 1877 0x5d28b9
17 Ms::MuseScore::exportFile file.cpp 1655 0x5cf72d
18 Ms::MuseScore::cmd musescore.cpp 4895 0x4b1e14
19 Ms::MuseScore::cmd musescore.cpp 4743 0x4b13a9
20 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 738 0x6e2cf5
...