Using Edit > Preferences causes crash when no score is open

• Apr 23, 2020 - 12:24
Reported version
3.x-dev
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project
  1. Start MuseScore, without any score open
  2. Edit > Preferences > Language, change to another one
  3. Hit OK

-> Crash!

Stack trace:
1 QListData::begin qlist.h 116 0xfe355c
2 QList::begin qlist.h 325 0xfd14bc
3 Ms::Timeline::drawSelection timeline.cpp 1767 0x4580cb
4 Ms::Timeline::updateTimelineTheme timeline.cpp 2888 0x45ff9b
5 QtPrivate::FunctorCall, QtPrivate::List<>, void, void (Ms::Timeline:: *)()>::call(void (Ms::Timeline:: *)(), Ms::Timeline *, void * *) qobjectdefs_impl.h 152 0xf5fbdc
6 QtPrivate::FunctionPointer::call, void>(void (Ms::Timeline:: *)(), Ms::Timeline *, void * *) qobjectdefs_impl.h 185 0xf677cf
7 QtPrivate::QSlotObject, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void * *, bool *) qobjectdefs_impl.h 414 0xf656cd
8 QMetaObject::activate(QObject *, int, int, void * *) 0x68a948cd
9 Ms::PreferenceDialog::preferencesChanged moc_prefsdialog.cpp 309 0x5ac301
10 Ms::PreferenceDialog::apply prefsdialog.cpp 1207 0x5c5337
11 Ms::PreferenceDialog::buttonBoxClicked prefsdialog.cpp 952 0x5c0c0e
12 Ms::PreferenceDialog::qt_static_metacall moc_prefsdialog.cpp 210 0x5abe08
13 QMetaObject::activate(QObject *, int, int, void * *) 0x68a947c8
14 QDialogButtonBox::button(QDialogButtonBox::StandardButton) const 0x2a909fcf
15 QDialogButtonBox::qt_static_metacall(QObject *, QMetaObject::Call, int, void * *) 0x2a90b349
16 QMetaObject::activate(QObject *, int, int, void * *) 0x68a947c8
17 QAbstractButton::toggled(bool) 0x2a87e172
18 QAbstractButton::setIconSize(QSize const&) 0x2a87f5a9
19 QAbstractButton::mouseReleaseEvent(QMouseEvent *) 0x2a87f775
20 QWidget::event(QEvent *) 0x2a7e5f18
...


Comments

Status PR created fixed

Fixed in branch master, commit cd1d693f5c

_Fix #304333: Using Edit > Preferences causes crash when no score is open

Resolves: https://musescore.org/en/node/304333.

It is unnecessary for Timeline::updateTimelineTheme() to call updateView()
and drawSelection() since it calls updateGrid() which already calls both
of these methods. However, Timeline::updateTimelineTheme() does need to set
the background brush for the rownames object in order to ensure that the
new theme applies to the whole timeline.

Fix version
3.5.0