Also some debug Output, not sure whether it is related:
Debug: there is alread a type at 0 (...\MuseScore\libmscore\staff.cpp:955, Ms::StaffType* Ms::Staff::setStaffType(int, const Ms::StaffType*))
Debug: tick2measure 97920 (max 80640) not found (...\MuseScore\libmscore\utils.cpp:60, Ms::Measure* Ms::Score::tick2measure(int) const)
Edit: at least that last message is related, because tick2measure doesn't find tick 97920 , it Returns a nullptr and this gets dereferenced in the next step
If this is the right approach (I'm not really sure, even though it fixes this crash, at least for master), it should go into 2.1 and master #164456: File created with version 1.3 can't be read: bad format however makes me think this might not be the right fix?
Comments
Because of problems opening it on Mac, I'm unable to check 3.0 nightly build.
master crashes too, stack trace:
1 Ms::Measure::getSegment measure.cpp 699 0x7cae20
2 Ms::MidiKey::assignKeyListToStaff importmidi_key.cpp 62 0x654a2b
3 Ms::MTrack::createKeys importmidi.cpp 596 0x6135f3
4 Ms::createKeys importmidi.cpp 988 0x6151ae
5 Ms::convertMidi importmidi.cpp 1149 0x615c3f
6 Ms::importMidi importmidi.cpp 1211 0x615fbe
7 Ms::readScore file.cpp 2133 0x5a245c
8 Ms::MuseScore::readScore file.cpp 331 0x59290b
9 Ms::MuseScore::openScore file.cpp 310 0x5927a8
10 Ms::MuseScore::loadFiles file.cpp 291 0x59246a
11 Ms::MuseScore::cmd musescore.cpp 4669 0x49de98
12 Ms::MuseScore::cmd musescore.cpp 4524 0x49d52e
13 Ms::MuseScore::qt_static_metacall moc_musescore_IKSZSQWDH4YDZS.cpp 733 0x693ca0
14 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a08942
15 ZN12QActionGroup7hoveredEP7QAction 0x1d1b5295
16 ?? 0x23140cc0
17 ZN7QAction8activateENS_11ActionEventE 0x1d1b4248
18 ?? 0x28c918
19 ?? 0x909001fb
20 ?? 0xa9c825ff
...
Also some debug Output, not sure whether it is related:
Debug: there is alread a type at 0 (...\MuseScore\libmscore\staff.cpp:955, Ms::StaffType* Ms::Staff::setStaffType(int, const Ms::StaffType*))
Debug: tick2measure 97920 (max 80640) not found (...\MuseScore\libmscore\utils.cpp:60, Ms::Measure* Ms::Score::tick2measure(int) const)
Edit: at least that last message is related, because tick2measure doesn't find tick 97920 , it Returns a nullptr and this gets dereferenced in the next step
Crashes in 2.0.3 too
See https://github.com/musescore/MuseScore/pull/2967
If this is the right approach (I'm not really sure, even though it fixes this crash, at least for master), it should go into 2.1 and master
#164456: File created with version 1.3 can't be read: bad format however makes me think this might not be the right fix?
Fixed in branch master, commit 30add6f018
fix #164446: crash when opening MIDI file
Fixed in branch master, commit 7a3dee41c8
Merge pull request #2967 from Jojo-Schmitz/midi
fix #164446: crash when opening MIDI file
Fixed in branch 2.1, commit 75b66fda7f
fix #164446: crash when opening MIDI file
And I can confirm now that this indeed fixed the issue in 2.1 too (earlier I only tested master)
Automatically closed -- issue fixed for 2 weeks with no activity.