[trunk] Crash when inserting measure(s) on Measure 1
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
If there's a crash, then it's critical.
I have the crash too, after rebuilding from scratch (SVN revision 4282:4416M shown in About Box) on Ubuntu 11.04.
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
I can't reproduce in the current development version fcdc24be61
I put the bug on fixed. Feel free to reopen if you still encounter it.
Automatically closed -- issue fixed for 2 weeks with no activity.