Crash when exporting to MusicXML
There's were some bad links (lids shared across tags/data types), but I've cleared up all the ones I can find using notepad++.
GIT commit: f51dc11
Attachment | Size |
---|---|
Double_Chocolate_Duet.mscx | 1.02 MB |
There's were some bad links (lids shared across tags/data types), but I've cleared up all the ones I can find using notepad++.
GIT commit: f51dc11
Attachment | Size |
---|---|
Double_Chocolate_Duet.mscx | 1.02 MB |
Comments
Also repros with MuseScoreNightly-2016-01-27-1429-master-dbd9e84.7z
Here's a much more trivial (one note) repro. If you delete either the Chord symbol or the Fretboard Diagram, you can export. If you have both, it crashes. I don't see anything obvious in the XML and there are no parts to mess about with.
Stack trace (using the 2.0.3 branch):
1 Ms::FretDiagram::writeMusicXML fret.cpp 606 0x8a5ab9
2 Ms::ExportMusicXml::harmony exportxml.cpp 5179 0x5ecb6d
3 Ms::annotations exportxml.cpp 3949 0x5e5253
4 Ms::ExportMusicXml::write exportxml.cpp 4862 0x5ea620
5 Ms::saveXml exportxml.cpp 5001 0x5eb620
6 Ms::MuseScore::saveAs file.cpp 1795 0x593d7a
7 Ms::MuseScore::exportFile file.cpp 1605 0x5914b6
8 Ms::MuseScore::cmd musescore.cpp 4041 0x4962ad
9 Ms::MuseScore::cmd musescore.cpp 3928 0x495aa4
10 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 810 0x682885
11 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a655a2
12 ZN12QActionGroup7hoveredEP7QAction 0x61dc4b95
13 ?? 0x1ee30b68
14 ZN7QAction8activateENS_11ActionEventE 0x61dc3b6e
15 ?? 0x28c928
16 ?? 0x24748b04
where _dots is a NULL pointer
Crash occurs at fret.cpp#L606 where it is assumed that
_dots[]
exists if_marker[i] != 88
Looking at that loop, I wonder if there could be a situation where that if construction itself generates a segfault (fret.cpp#L603 ) as you're checking two lines above for the existence of _marker, but ignore the result when checking for _marker[i] (which seemingly might not exist as well)
there's also room for optimization, that function/method calls strings() 2*strings()+1 times instead of just once to store the value in a local variable?
See also #95886: [MusicXML export] Fretboard diagrams are not exported if no chord symbol is attached
see https://github.com/musescore/MuseScore/pull/2364
Fixed in branch master, commit f5e2a9f134
fix #95866: crash on export of fretboard diagram
that doesn't have any fret marks
Fixed in branch master, commit 2b40a5a0d8
Merge pull request #2364 from Jojo-Schmitz/xml-fret-diag-crash
fix #95866: crash on export of fretboard diagram that doesn't have any fret marks
Fixed in branch 2.0.3, commit 4e6fed0467
fix #95866: crash on export of fretboard diagram
that doesn't have any fret marks
Awesome. Thanks for the quick fix, folks!
Automatically closed -- issue fixed for 2 weeks with no activity.