Switching instruments from an instrument with tabulature in a linked staff to one that does not support tablature causes crash

• Nov 30, 2020 - 06:16
Reported version
3.5
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
Yes
Project

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

In reply to by Jojo-Schmitz

Status active needs info

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]

      // check for any remaining fret conflict
      foreach(Note * note, sortedNotes)
            if (bUsed[note->string()] > 1)  // <<<<<<<<<<< crash here
                  note->setFretConflict(true);
Status PR created fixed

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

Fix version
3.6.0