Untick "Visible" for all the staves/instruments causes a crash

• Nov 18, 2016 - 07:18
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

GIT commit: 6a0fb3f / Windows7

1) New score for a few instruments, eg String Quartet template

2) "I" -> Untick "Visible" for ALL the instruments -> Ok

Result: crash


Comments

See also #141391: Crash when a staff containing hyphens is unticked "Visible" in a score with multimeasure rests

Stack trace:
1 Ms::System::layout2 system.cpp 360 0x7dede9
2 Ms::Score::collectSystem layout.cpp 3257 0x899eeb
3 Ms::Score::collectPage layout.cpp 3317 0x89a2b7
4 Ms::Score::doLayout layout.cpp 3442 0x89ae22
5 Ms::Score::update cmd.cpp 199 0x7a5a45
6 Ms::Score::endCmd cmd.cpp 174 0x7a5894
7 Ms::MuseScore::editInstrList instrdialog.cpp 504 0x464405
8 Ms::MuseScore::cmd musescore.cpp 4596 0x49e5b7
9 Ms::MuseScore::cmd musescore.cpp 4477 0x49de54
10 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 733 0x69c314
11 ZN11QMetaObject8activateEP7QObjectiiPPv 0x68a08942
12 ZN12QActionGroup7hoveredEP7QAction 0x1bf35295
13 ?? 0x225a3018
14 ZN7QAction8activateENS_11ActionEventE 0x1bf34248
15 ?? 0x28ce08
16 ?? 0x1e3b5e40
17 ZN7QThread18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv 0x68a68380
18 ZN7QThreadD2Ev 0x6889adc0
19 ZN7QObject11customEventEP6QEvent 0x68a06950
20 ZN26QAbstractDynamicMetaObjectD2Ev 0x68a06920
...

self-built 6a0fb3f, Windows 7

And indeed making all staves invisible doesn't cause a crash in 2.0.3

There is a check whether there are no visible staves, and a debug message gets printed if there is none, but then it goes on and cycles thru all visibleStaves, which of course fails miserably

There is a check whether there are no visible staves, and a debug message gets printed if there is none, but then it goes on and cycles thru all visibleStaves, which of course fails miserably

for some strange reason that debug message reg. no visible staves gets printed even if there are visible staves and just one got made invisible?? In a score that does work with 'Hide empty staves' when making a staff invisible that is hidden in some Systems due to being empty therre, but visible in the top one due to haveing notes there.
Another strangeness: if leaving only that stave visible, regardless of 'Hide empty staves it then shows in full length (and with empty measures).

yeah, it is another one of those single-line fixes where one word makes all the difference! ;)

Probably between now and 2016, there must have be been other things that helped with the fix, but at least my commit here made the final difference.