Crash when creating new score using empty custom template

• Apr 5, 2015 - 15:51
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Windows, b518263

1. Put the "Spiewnik.mscz" in templates folder (.../My Documents/MuseScoreDevelopment/Templates)
2. Create new score
3. Select "Spiewnik" from list of templates
4. Click "Finish"
= Crash

I bet there's something wrong with this template, but it was created in 2.0 Beta version, so should be fully compatible;

EDIT: I don't understand why my attachment is not listed below, so there's direct link to the file: https://musescore.org/sites/musescore.org/files/issues/piewnik.mscz


Comments

stack trace

0 Ms::MuseScore::newFile() 0x5a2f3a
1 Ms::MuseScore::cmd(QAction*, QString const&) 0x49e5ae
2 Ms::MuseScore::cmd(QAction*) 0x49fa34
3 ?? 0x9e000c0
4 Ms::MuseScore::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) 0x6dd0b4
5 ZN11QMetaObject8activateEP7QObjectiiPPv ...\MuseScore\win32install\bin\Qt5Core.dll 0x68a64e31
6 ZN12QActionGroup7hoveredEP7QAction ...\MuseScore\win32install\bin\Qt5Widgets.dll 0x61dc4b95
7 ?? 0x9d69200
8 ZN7QAction8activateENS_11ActionEventE ...\MuseScore\win32install\bin\Qt5Widgets.dll 0x61dc3b6e
9 ?? 0x28d218
10 ?? 0x90900175
11 ?? 0x883025ff
12 ?? 0x90900175
13 ?? 0x83b825ff
14 ?? 0x90900175
15 ?? 0x8c8825ff
16 ?? 0x90900175
17 ?? 0x8c8425ff
18 ?? 0x90900175
19 ?? 0x962425ff
20 ?? 0x90900175
...

Can't make much sense out of that...

Ooops, apparently I've been build for RELEASE rather than DEBUG...

Here a slightly more meaningful stack trace

0 Ms::MuseScore::newFile file.cpp 539 0x57c411
1 Ms::MuseScore::cmd musescore.cpp 4006 0x491bda
2 Ms::MuseScore::cmd musescore.cpp 3879 0x491238
3 Ms::MuseScore::qt_static_metacall moc_musescore.cpp 810 0x69ac4a
4 ZN11QMetaObject8activateEP7QObjectiiPPv ...\MuseScore\win32install\bin\Qt5Core.dll 0x68a64e31
5 ZN12QActionGroup7hoveredEP7QAction ...\MuseScore\win32install\bin\Qt5Widgets.dll 0x61dc4b95
6 ?? 0x1e08c4f8
7 ZN7QAction8activateENS_11ActionEventE ...\MuseScore\win32install\bin\Qt5Widgets.dll 0x61dc3b6e
8 ?? 0x28ce08
9 ?? 0x909001a2
10 ?? 0x685c25ff
11 ?? 0x909001a2
12 ?? 0x63e825ff
13 ?? 0x909001a2
14 ?? 0x62bc25ff
15 ?? 0x909001a2
16 ?? 0x70d425ff
17 ?? 0x909001a2
18 ole32!StgSetTimes C:\Windows\syswow64\ole32.dll 0x757825ff

Ah, now I see, in file.cpp, line 538, tscore->first() is used and returns NULL, because the template score is empty, in the next line that NULL pointer gets dereferenced to obtain the type() of that first (and non existing) element, this of course crashes