Crash by undoing/redoing in main score a copy-paste made in the parts
Reported version
3.2
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
Version 3.2.3 and current 3.3. R.C.
Steps with minimal score:
1) Default score (one measure is enough, with a whole note)
2) Create Part
(the test file: minimal.mscz )
3) From main score: Copy the single measure
4) Paste it in Part
5) Return in main score (necessary condition) : Undo + Redo
----------------------------> Crash
Fix version
3.3.0
Comments
See also #151521: Crash due to bad selection after undo of operation originally performed in linked score - this was closed as unreproducible because we stopped trying to preserve the selection, not because we really fixed anything. The crash still seems to be about managing the selection, but this code is changed very much from when I submitted my PR for the original, I doubt it's still relevant.
Wow, I had completely forgotten this issue of 2016! 😳
(I was currently testing something after a corruption)
This appears to be the result of a very recent commit, specifically 710cd6a. The crash can be prevented by simply checking if
_startSegment
is not null before dereferencing it. But it worries me that_startSegment
is null, given that_state
is equal toSelState::RANGE
.Hmm, sure? @cadiz1 reported it to happen with 3.2.3 already
Anyway, it does the same check in the
SelState::LIST
case, so I see no harm in doing it for theSelState::RANGE
case tooHow about this:
Yes, I confirm for the date (and commit). This nightly works: 37067ee
Crash with this one: d1411bb (or https://github.com/musescore/MuseScore/pull/5422)
(my bad, sorry, for have written that 3.2.3 was also involved. Not true. Probably I missed step#5 before checking and writing the report)
Ah, OK, so a true and very recent regression then
Jojo, the change that you propose is identical to the one that I tried, and it does indeed prevent the crash, and it certainly does not do any harm. It would probably be a good idea to get this fix into 3.3, which will be released tomorrow.
Are you going to PR it?
Fixed in branch master, commit 9bf62a17f7
fix #296271: Crash by undoing/redoing in main score a copy-paste made in the parts
Fixed in branch master, commit 3dc7638913
_Merge pull request #5438 from Jojo-Schmitz/copy-paste-undo-crash
fix #296271: Crash by undoing/redoing in main score a copy-paste made in the parts_
Fixed in branch 3.3, commit 7662fabfd4
_Merge pull request #5438 from Jojo-Schmitz/copy-paste-undo-crash
fix #296271: Crash by undoing/redoing in main score a copy-paste made in the parts_
Automatically closed -- issue fixed for 2 weeks with no activity.