Opening a MuseScore 2(.1.0) score with MuseScore 3(.6.2), saving and reopening causes a crash

• Aug 3, 2021 - 07:53
Reported version
3.6
Type
Functional
Frequency
Few
Severity
S2 - Critical
Reproducibility
Always
Status
duplicate
Regression
No
Workaround
No
Project

Run MuseScore AppImage, attempt to open the attached score after the application starts. I was editing the score just yesterday; it was a MuseScore 2 score that I opened with MuseScore 3 and saved as a separate file. After selecting the score, MuseScore3 instantly crashes. Not sure what caused the score to get corrupted.

Console log:

~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

~$ ./MuseScore-3.6.2.548021370-x86_64.AppImage -w
/usr/lib/x86_64-linux-gnu/libjack.so.0
/usr/lib/x86_64-linux-gnu/libnss3.so
Element::readProperties: linked elements have different types: BarLine, Chord. Input file corrupted?
Element::readProperties: could not link BarLine at staff 2
/tmp/.mount_MuseScesjhOp/AppRun: line 26: 7322 Segmentation fault (core dumped) "${APPDIR}/bin/mscore-portable" "$@"

Attachment Size
Northstar.mscz 64.62 KB

Comments

Title Segmentation fault on file load with AppImage on Ubuntu 18.04 Segmentation fault on file load

Crashes on Windows 10 too, using MuseScore 3.6.2

Latest 3.x development code crashes too. Stack trace:

1 QListData::isEmpty qlist.h 116 0x1096e8f
2 QList::isEmpty qlist.h 201 0x107ba08
3 Ms::LinkedElements::mainElement scoreElement.cpp 647 0xb93caa
4 Ms::Element::readProperties element.cpp 724 0x9a377e
5 Ms::BarLine::read barline.cpp 819 0x91d8b2
6 Ms::Measure::readVoice measure.cpp 2169 0xa2b5c8
7 Ms::Measure::read measure.cpp 2040 0xa2a68f
8 Ms::Score::readStaff scorefile.cpp 360 0xb4b58e
9 Ms::Score::read read302.cpp 60 0xbc8950
10 Ms::Score::read read302.cpp 198 0xbc9a52
11 Ms::MasterScore::read read302.cpp 368 0xbca8fa
12 Ms::MasterScore::read302 read302.cpp 420 0xbcac0f
13 Ms::MasterScore::read1 scorefile.cpp 1043 0xb4f957
14 Ms::MasterScore::loadCompressedMsc scorefile.cpp 859 0xb4e86e
15 Ms::MasterScore::loadMsc scorefile.cpp 946 0xb4ef28
16 Ms::MasterScore::loadMsc scorefile.cpp 937 0xb4ed8d
17 Ms::::operator()(Ms::MasterScore *, const QString &, bool, bool) const file.cpp 2275 0x4cb143
18 Ms::readScore file.cpp 2283 0x4cb3f3
19 Ms::MuseScore::readScore file.cpp 474 0x4bc5dc
20 Ms::MuseScore::openScore file.cpp 416 0x4bc09c
...

Warning: Element::readProperties: linked elements have different types: BarLine, Rest. Input file corrupted? (...\libmscore\element.cpp:728, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link BarLine at staff 1 (...\libmscore\element.cpp:731, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Debug: Reconnecting broken connectors (16 nodes) (...\libmscore\xmlreader.cpp:617, void Ms::XmlReader::reconnectBrokenConnectors())
Debug: reconnected 8 broken connectors (...\libmscore\xmlreader.cpp:649, void Ms::XmlReader::reconnectBrokenConnectors())
Warning: Element::readProperties: linked elements have different types: BarLine, Chord. Input file corrupted? (...\libmscore\element.cpp:728, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link BarLine at staff 4 (...\libmscore\element.cpp:731, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Debug: Reconnecting broken connectors (2 nodes) (...\libmscore\xmlreader.cpp:617, void Ms::XmlReader::reconnectBrokenConnectors())
Debug: reconnected 1 broken connectors (...\libmscore\xmlreader.cpp:649, void Ms::XmlReader::reconnectBrokenConnectors())
Warning: Element::readProperties: linked elements have different types: BarLine, Note. Input file corrupted? (...\libmscore\element.cpp:728, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link BarLine at staff 5 (...\libmscore\element.cpp:731, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: linked elements have different types: BarLine, Rest. Input file corrupted? (...\libmscore\element.cpp:728, virtual bool Ms::Element::readProperties(Ms::XmlReader&))
Warning: Element::readProperties: could not link BarLine at staff 6 (...\libmscore\element.cpp:731, virtual bool Ms::Element::readProperties(Ms::XmlReader&))

Fixed score attached.

I extracted the mscx from the mscz and removed all parts, then the score opened just fine. I've switched to page view and regenerated all parts, then saved. It still opens

Attachment Size
Northstar-fixed.mscz 69.18 KB

OK, the fixed version of the file can be opened, saved, closed, and reopened safely. Thank you very much! Thankfully, I still had the MS2 file and didn't lose anything.

However, the error handling on file load should be fixed - no corrupted file should cause the application to spontaneously crash. Expected behavior should be that a dialog box opens and explains that the file became corrupted.

Additionally, I'm guessing this is repeatable with a MuseScore2 file that was opened with MuseScore3 - because when I tried to create a new (uncorrupted) MS3 score from the original MS2 score (and save it as a new file), it re-corrupted. Attached to this comment is the original MuseScore2 .mscz file (Northstar.mscz ) that was opened in MuseScore3. When I opened it, I selected all the checkboxes for using the new MS3 display features. I made some small changes to the file (there is some overlapping text towards the end that I removed) and saved it, and it reproduced the corruption. That should probably also be fixed.

Attachment Size
Northstar.mscz 95.4 KB
Title Segmentation fault on file load Opening a MuseScore 2(.1.0) score with MuseScore 3(.6.2), saving and reopening causes a crash

We can only fix issues if we can reproduce them. This MuseScore 2 score might help in doing so.

I can confirm that simply saving that (2.1.0) score with 3.6.2 and opening it again causes a crash. Doesn't matter whether the new style or the old style is chosen.