Assertion failure on adding instrument change in score with parts

• Mar 28, 2019 - 11:53
Reported version
3.0
Priority
P1 - High
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
active
Regression
Yes
Workaround
No
Project

This is certainly related to my parts playback patch so I'll probably work on this issue, this page is mostly to describe it.

Steps to reproduce:
1) Create a new score, for example, treble clef.
2) Create parts.
3) Drag an instrument change to any rest in master score.
Result: assertion failure in midimapping.cpp

Not sure whether this issue has any practical implications for scores playback but it would be better to handle such cases correctly.


Comments

Status active needs info

Issue could be reproduced in 3.3 only, not in earlier version of MuseScore and also not in 3.4.
Can you confirm it still an issue in 3.4?

Status closed active
Fix version 3.4.0  

It is still an issue, it is an assertion failure so happens only in debug builds. This does not affect release builds but may indicate that something goes potentially wrong which may lead to actual problems in some corner cases.

it needs to be a Debug build, not Release or RelWithDebInfo for those asserts to show
It is not a plain messeg then, but the abrupt end and death of the program

I see the offending assert Q_ASSERT(p->instruments()->size() == masterPart->instruments()->size()); (in midimapping.cpp:149) but I'm wandering why this assert is there is the first place :-(.