Crash when accessing a generated part with multiple instruments
GIT commit: 877cf8e
1. get the attached musescore file
2. open it up in musescore
3. create a part with 3 instruments
4. click on the part-name to view the part
5. musescore crashes
Attachment | Size |
---|---|
Snackaert-Concertino-nieuw.mscz | 46.8 KB |
Comments
Confirmed. I used the first three parts. Generating the part goes fine, but upon trying to view the part, I get what is presumably an infinite loop generating the message "Debug: System::staff(): bad index 113291" (well, starting at a lower number, then increasing steadily); that's how high it got before I killed it.
This message is apparently generated in system.h, but only if NDEBUG is not defined.
Setting a breakpoint there, I see this is called from BarLine::pagePos() from within a loop looking for the first non-hidden staff within the system. It appears we've run off the end and not found one. So I guess this has something to do with hide empty staves.
I can't reproduce.
Using MuseScore 2.0 Nightly Build (bb9c7b3) - Mac 10.7.5.
in that newer build, bb9c7b3, in that very function a fix has been made, not sure whether it is related and/or helps though?
Grrrr. Yes, I just updated my sources and saw that same fix, must have been in the last day or two. Currently re-building to test, it won't finish before I need to leave for the rest of the day, though.
Still crashes for me when building from latest sources (06a7a75), but somewhere else. And it's another of those annoying crashes I can';t trap in the debugger - I guess an explicit call to abort(). And this is after the spurious call to abort() was removed from musescore.cpp, and I have a breakpoint set on the one that is supposed to be there.
Maybe it is about time to do as #14764: Need to remove all direct uses of abort(). qFatal should be used instead. asks for?
I fixed it by removing the abort() here for the moment https://github.com/musescore/MuseScore/commit/8532f6b0148a0b761d7763068…
But no, removing all abort() is not a solution for the moment... if there is an abort(), it's a code path that shouldn't happen.
I keep this bug open for Werner's reference.
the question it not to remove the abort(), but to replace it with a qFatal() or something similar that is more useful in on Windows
Is the one you changed the culprit for the Travis failures?
Talk it through with Werner. The added lines were a debugging artifact.
Automatically closed -- issue fixed for 2 weeks with no activity.