Segfault on MusicXML import

• Sep 11, 2012 - 18:24
Type
Functional
Severity
S2 - Critical
Status
closed
Project

In the current trunk, most (about 90%) of MusicXML files cause a segfault when imported. Stacktrace shows the cause is an unexpected null pointer returned by Measure::getSegment(st, loc_tick, gl).

Worked OK this weekend, fails as of yesterday.

Suspect it is related to this commit:

fix handling of grace notes in parts - http://git.io/sxYZOg
09/10/2012 04:10 PM
Commit by Werner Schweer on master :: r0c2bd69 / (6 files in 2 dirs): (link)
fix handling of grace notes in parts - http://git.io/sxYZOg

Note: I am currently unable to fix this myself.


Comments

GDB output:

Program received signal SIGSEGV, Segmentation fault.
MusicXml::xmlNote (this=0xbfffeb30, measure=0x8e3bf18, staff=0, partId=..., e=...)
at /home/lvi/dev/MuseScore/mscore/importxml.cpp:5064
5064 s->add(cr);
(gdb) bt
#0 MusicXml::xmlNote (this=0xbfffeb30, measure=0x8e3bf18, staff=0, partId=..., e=...)
at /home/lvi/dev/MuseScore/mscore/importxml.cpp:5064
#1 0x082418db in MusicXml::xmlMeasure (this=0xbfffeb30, part=0x8f0bc78, e=..., number=-1073747152,
measureLen=1920) at /home/lvi/dev/MuseScore/mscore/importxml.cpp:2270
#2 0x08243f6c in MusicXml::xmlPart (this=0xbfffeb30, e=..., id=...)
at /home/lvi/dev/MuseScore/mscore/importxml.cpp:2083
#3 0x082455ff in MusicXml::scorePartwise (this=0xbfffeb30, ee=...)
at /home/lvi/dev/MuseScore/mscore/importxml.cpp:1249
#4 0x082491dd in MusicXml::import (this=0xbfffeb30, s=0x0)
at /home/lvi/dev/MuseScore/mscore/importxml.cpp:812
#5 0x08249d12 in MuseScore::importMusicXml (score=0x8e0a6e0, name=...)
at /home/lvi/dev/MuseScore/mscore/importxml.cpp:746
#6 0x084395ad in MuseScore::readScore (this=0x8cf72e0, score=0x8e0a6e0, name=...)
at /home/lvi/dev/MuseScore/mscore/file.cpp:1814
#7 0x082b14ac in loadScores (argv=...) at /home/lvi/dev/MuseScore/mscore/musescore.cpp:1981
#8 0x081955bd in main (argc=-1244351608, av=0x8c0e4b8)
at /home/lvi/dev/MuseScore/mscore/musescore.cpp:2445
(gdb) p s
$1 = (Segment *) 0x0

Tested the current trunk as of this weekend and indeed, the crash has been fixed. Currently 5 out 65 testfiles fail, I am working on fixing that.

Title Segfault on MusicXML import. Segfault on MusicXML import
Status (old) fixed active

Hi Leon

I think it's still problematic, perhaps? There's a crash anyway.

Try exporting this and importing it.

Using MuseScore 2.0 Nightly Build (6d79b4d) - Mac 10.7.5.

Using the current trunk, most MusicXML files import without problems. The original problem reported in this issue (a segfault for 90% of imported MsuicXML files) has been fixed. Therefore I will close this issue. Please submit new issues for new problems instead of reopening closed issues for new problems.

The attachment in http://musescore.org/en/node/10205, when exported as MusicXML, imports without crashing MuseScore. It does take a very long file, so I created a new issue, see #19347: [MusicXML import] file "The Entertainer.xml" takes a long time to load.