Crash after "n+1" insert measure operations after undo of add part in score "n" measures long

• Aug 24, 2014 - 16:06
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Ubuntu Studio 14.04, GIT commit: 57dd451

Strange sounding title I know, but it's a good description of how to reproduce the problem. The problerm itself is deeper, though - undo of generate parts leaves linked staves behind internally.

1) new score, flute, 8 measures
2) add a note to measure 2
3) generate parts
4) undo
5) select measure 2
6) Press Ins repeatedly, or just hold it down

Result: first 8 measures insert normally, then it crashes.

The crash occurs a few levels deep within the following line:

https://github.com/musescore/MuseScore/blob/57dd45139cfa09d2c095af4758b…

"m" is actually null at this point, and that's because "score" is *not* equal to "this", so tick2measure was being called. Since there no parts any more, score should never *not* be "this". And sure enough, "ostaff" still shows as having a linked staff.

Seems this would cause all sorts of havoc beyond this, my "n+1 insert measure operations" was just one.


Comments