Consistent crash reading file with linked staves

• Dec 2, 2012 - 15:08
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Current trunk consistently crashes when reading attached (very simple) file LinkedStaffCrash.mscx. A similar simple file (LinkedStaffOK.mscx) is read without problems. The files only differ in the number of notes in the first and only measure.

Stacktrace:
Program received signal SIGSEGV, Segmentation fault.
Staff::primaryStaff (this=0x0) at /home/lvi/dev/MuseScore/libmscore/staff.cpp:640
640 if (!_linkedStaves)
(gdb) bt
#0 Staff::primaryStaff (this=0x0) at /home/lvi/dev/MuseScore/libmscore/staff.cpp:640
#1 0x0856b9d5 in Score::createPlayEvents (this=0x8f5bee8, m=0x8fa6140, track=8, slurs=0xbfffe8fc)
at /home/lvi/dev/MuseScore/libmscore/rendermidi.cpp:751
#2 0x0856bdb4 in Score::createPlayEvents (this=0x8f5bee8)
at /home/lvi/dev/MuseScore/libmscore/rendermidi.cpp:784
#3 0x085f9515 in Score::read (this=0x8f5bee8, de=...)
at /home/lvi/dev/MuseScore/libmscore/scorefile.cpp:1069
#4 0x085fb69c in Score::read1 (this=0x8f5bee8, de=..., ignoreVersionError=false)
at /home/lvi/dev/MuseScore/libmscore/scorefile.cpp:767
#5 0x085fd574 in Score::loadMsc (this=0x8f5bee8, name=..., ignoreVersionError=false)
at /home/lvi/dev/MuseScore/libmscore/scorefile.cpp:678
#6 0x084424dc in readScore (score=0x8f5bee8, name=..., ignoreVersionError=false)
at /home/lvi/dev/MuseScore/mscore/file.cpp:1815
#7 0x08442c79 in MuseScore::readScore (this=0x8d04998, name=...)
at /home/lvi/dev/MuseScore/mscore/file.cpp:304
#8 0x082b6101 in loadScores (argv=...) at /home/lvi/dev/MuseScore/mscore/musescore.cpp:1962
#9 0x081992ad in main (argc=Cannot access memory at address 0x0
) at /home/lvi/dev/MuseScore/mscore/musescore.cpp:2425

Attachment Size
LinkedStaffCrash.mscx 5.85 KB
LinkedStaffCrash.png 33.73 KB
LinkedStaffOK.mscx 5.36 KB
LinkedStaffOK.png 32.88 KB

Comments

I can confirm that this allows me to open all the files on my Mac which had been crashing MuseScore.

Thanks.