MusicXML export: crash when exporting hairpins
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
Indeed. The problem is in
static QString addPositioningAttributes
See PR for 2.3 here : https://github.com/musescore/MuseScore/pull/3643
Should also be put in a branch for musescore-backend
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
Don't we have any mtest for an XML export of hairpins?
And it seems it is not just hairpins, but also glissandos? See the score in #271664: 2.2.1 (51b8386) Crashes On All My Computers
https://github.com/musescore/MuseScore/pull/3643
I wonder whether master needs that fix too, it seems to have the same code.
And indeed, master with the fix from #271606: MusicXML: xml file causes crash due to failed assertion crashes on MusicXML export too.
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
...
Fixed in branch musescore_backend_22, commit ecfd7fd862
fix #271707: MusicXML export: crash when exporting hairpins
Cherry-picked changes from https://github.com/musescore/MuseScore/pull/3643
Needed in 2.3 (and master?) too
In reply to (No subject) by Jojo-Schmitz
It looks like the topic for separate issue...
Yes, most probably (assuming you mean https://musescore.org/en/node/271707#comment-832223)
Still https://github.com/musescore/MuseScore/pull/3643
Fixed in branch 2.3, commit c9b78c46de
fix #271707: MusicXML export: crash when exporting hairpins
Fixed in branch 2.3, commit 29e2c797cd
Merge pull request #3643 from lasconic/fix-271707
fix #271707: MusicXML export: crash when exporting hairpins
Fixed in branch master, commit bbe8dace42
fix #271707: MusicXML export: crash when exporting hairpins
Automatically closed -- issue fixed for 2 weeks with no activity.
Issue just came up in http://notensatz.forumprofi.de/index.php?topic=1792.msg12193#msg12193