Crash on deleting a staff when it is involved in a part

• Aug 22, 2014 - 14:48
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

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

Title [Guitar Pro] Crash on deleting a staff in imported score Crash on deleting a staff

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.

Title Crash on deleting a staff Crash on deleting a staff when it is involved in a part

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