Change instrument causes a crash

• Dec 30, 2016 - 13:28
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project

35b948a /Windows 7

1) "My First Score"
2) Right-click -> Staff Properties
3) Change instrument -> eg for Flute
4) Ok

Result: crash


Comments

Strange, no stack trace, no assertion failure, just aborting or exiting with a return value of 3.
Prior to that the following "amous last words":
Debug: unhandled id mag (...\MuseScore\libmscore\staff.cpp:1206, virtual QVariant Ms::Staff::getProperty(Ms::P_ID) const)
Debug: unhandled id mag (...\MuseScore\libmscore\staff.cpp:1206, virtual QVariant Ms::Staff::getProperty(Ms::P_ID) const)
Debug: unhandled id mag (...\MuseScore\libmscore\staff.cpp:1246, virtual bool Ms::Staff::setProperty(Ms::P_ID, const QVariant&))

Hi Jojo
Hope you don't mind me asking but how do you view the stacktrace? Is it withing the IDE or is it the special degbug version of Musescore? What is all the text you have there i.e. .... "Debug: unhandled id mag (...\MuseScore\libmscore\....etc......"

Yes, this is the same, but it can even be reproduced easier:
1) "My First Score"
2) Right-click -> Stave (or Staff) Properties (which English version should be used?)
3) Ok or Apply

As shown by Jojo-Schmitz's stack trace, the problem is unhandled id mag and the abort instruction at line 1247 of libmscore/staff.cpp
Indeed, handling of the property P_ID::MAG in Staff::setProperty was deleted by commit 337e885896
and it was moved to StaffTypeChange::setProperty

The change of property is called in by line 3313 of libmscore/undo.cpp

However, I don't know what should be done in this case, since I am not familiar with the changes Werner is implementing in the "core" objects.

There is no stack trace, just some debug output.

Outch! I missed that abort() instrunction! No wonder there's no stack trace.
Should have used a QFatal() rather than a QDebug() there?

Just deleting that abort() fixes the crash, I can't see any ill effect, except for the continued debug messages, but currently the code is in a pretty bad state, not much works.

That abort() got added in 6251397