Crash on deleting a staff when it is involved in a part
Commit 7ccbeb1
Reproduce:
1. Open MuseScore, import attached score
2. Go Add->Instrument
3. Select the last staff "Drums" and press "Remove". Click "Ok"
Actual behaviour: Crash with "ASSERT: "idx >= 0" in file /MuseScore/libmscore/undo.cpp, line 688"
Expected behaviour: Last staff removed.
Attachment | Size |
---|---|
rammstein_amour.gp4 | 40.17 KB |
Comments
See also #24181: Removing instruments causes crash. Could possibly be same cause.
I can recreate with the MSCZ, not closing as duplicate of #24181 as the test looks handy, but this doesn't look like a GP problem to me.
Are you working on fixing this? if not, can you share the steps for reproducing this from an MSCZ created from scratch?
From scratch
Steps:
1- Create a score with 2 flutes;
2- Insert notes in both staves;
3- File -> Parts... -> New All -> Ok;
4- Add -> Instruments...
5- Select the first flute -> Remove;
6- Press Ok -> crash.
Instruction staffIdx(staff) in libmscore\undo.cpp, line 690 gives -1 and this triggers the assert in the next line.
Commit e057101 Windows 8.1 and Linux Mint 17
Fixed in 26dfd95eb9
Automatically closed -- issue fixed for 2 weeks with no activity.