[trunk] Crash when inserting measure(s) on Measure 1

• Apr 11, 2011 - 21:17
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Setup: MuseScore trunk rev. 4156 under Win XP SP3

Steps:
1) load or create a score;
2) select measure 1;
3) click "Create\Measures\Insert One Measure" menu or "Create\Measures\Insert Measure" or use the "Insert" key;

Result:
MuseScore crashes with the following error message box:

Microsoft Visual C++ Runtime Library
Runtime Error!
Program C:\Program Files\MuseScore\bin\nightly.exe
This application has requested the Runtime to terminate it in an unual way. Please contact the application's support team for more information.

Notes:
* When a different measure is selected (not Measure 1), inserting measure works.


Comments

Still current at in R5275 (Windows).

Crashes in measure.cpp, Measure::remove(Segment* el)
case SEGMENT:
remove(static_cast(el));

Q_ASSERT output:
ASSERT: "el == _segments.first()" in file H:\MuseScore\trunk\mscore\libmscore\measure.cpp, line 252

And from Score::insertMeasure:
else if (s->subtype() == SegClef) {
Element* e = s->element(staffIdx * VOICES);
if (e) {
undoRemoveElement(e);
if (static_cast(e->parent())->isEmpty())
undoRemoveElement(e->parent()); <=====
}

Looks like it's trying to remove the clef, since that would have to go into the newly inserted measure now.

Stack:
NOT FOUND: 01

Attachment Size
10208.png 5.3 KB