Channel lists contain bad values after an instrument change

• May 4, 2020 - 20:00
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

1.) At measure 62 in the 2 synth part add a staff text.
2.) Use staff text to change the sound t distorted guitar
3.) Play back after staff text is added. It will crash

Attachment Size
Percussion Etude.mscz 228.83 KB

Comments

Frequency Many Once
Severity S3 - Major S2 - Critical

Confirmed, even in the latest development code. A Debug build dies from a failed assertion, deep in Qt code:
Fatal: ASSERT failure in QList::operator[]: "index out of range", file C:/Qt/5.12.8/mingw73_64/include/QtCore/qlist.h, line 552 (C:/Qt/5.12.8/mingw73_64/include/QtCore/qlist.h:552, )
Bad news: no stack trace, so difficult to debug

Not sure it is a regression, against what version?

Regression No Yes

I can't reproduce the crash. For one thing, I don't have an instrument named “distorted guitar”. But even if I switch to a different guitar, I don't get a crash on playback.

In that measure, that staff, at the instrument change text add a staff text, change its properties to switch to a different sound, play.

Distorted guitar isn't an instrument, it's a sound you select in the Mixer (well, it's called "Distortion Guitar" at least on my system, but still...)

Status PR created fixed

Fixed in branch 3.x, commit a1bafa3efc

_Fix #304918: Channel lists contain bad values after an instrument change

Resolves: https://musescore.org/en/node/304918.

Since an instrument change applies to an entire part rather than a single
staff, it is necessary to update the channel lists for all staves belonging
to the part when an instrument change occurs, and not just the staff where
the instrument change is placed._

Fix version
3.5.0