Switching instruments from an instrument with tabulature in a linked staff to one that does not support tablature causes crash
Steps to produce:
1) Make a score with an instrument that supports tablature and add the tablature as a linked staff (the Guitar + Tablature preset works)
2) Right-click staff and go to Staff/Part properties
3) Press change instrument and switch to any instrument that does not support tablature (piano, for example)
Inputting any notes will cause a crash.
If there were notes beforehand, the crash will occur on pressing ok in the Staff/Parts properties window.
This does not happen when switching between instruments that support tablature (tested with acoustic guitar and acoustic bass)
It also does not happen when the tablature is not a linked staff.
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.5.2.311459983, revision: 465e7b6
Also tested on Nightly: MuseScore version (64-bit): 3.6.0.390828250
Comments
Doesn't seem to crash in the latest 3.x development build
I can reproduce it with an MSCV RelWithDebInfo build, but not with a QtCreator/MinGW Debug build...
In reply to Doesn't seem to crash in the… by Jojo-Schmitz
Crash exists with OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.6.0.390828250
and OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.6.0.367377422, revision: github-musescore-musescore-
(NB: links of "Help/About" don't work!)
But to receive the crash, you must change Instrument by clicking-right (Staff properties) on the first standard staff (not the TAB)
Stack trace in MSVC:
> MuseScore3.exe!Ms::StringData::fretChords(Ms::Chord * chord) Zeile 248 C++
MuseScore3.exe!Ms::Chord::cmdUpdateNotes(Ms::AccidentalState * as) Zeile 1740 C++
MuseScore3.exe!Ms::Score::getNextMeasure(Ms::LayoutContext & lc) Zeile 2914 C++
MuseScore3.exe!Ms::Score::doLayoutRange(const Ms::Fraction & st, const Ms::Fraction & et) Zeile 4940 C++
MuseScore3.exe!Ms::Score::update(bool resetCmdState) Zeile 301 C++
MuseScore3.exe!Ms::Score::endCmd(bool rollback) Zeile 264 C++
MuseScore3.exe!Ms::ScoreView::mousePressEvent(QMouseEvent * ev) Zeile 568 C++
[Externer Code]
MuseScore3.exe!Ms::runApplication(int & argc, char * * av) Zeile 7943 C++
MuseScore3.exe!main(int argc, char * * argv) Zeile 95 C++
[Externer Code]
Apparently MinGW allows for an array index of -1, but MSVC does not
See https://github.com/musescore/MuseScore/pull/6973
Fixed in branch 3.x, commit 62eb10afee
Fix #313771: Switching instruments from an instrument with tabulature in a linked staff to one that does not support tablature causes crash
Fixed in branch master, commit deb8b6dddd
Fix #313771: Switching instruments from an instrument with tabulature in a linked staff to one that does not support tablature causes crash
Automatically closed -- issue fixed for 2 weeks with no activity.