MuseScore crashing when entering font name

• Apr 9, 2020 - 14:30
Reported version
3.4
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

Precondition
MuseScore 3.4.2.25137 on macOS Catalina 10.15.4

Steps to reproduce
1. Open a score
2. Add a System text from the text palette
3. Open inspector panel
4. Go to the font setting and type in the two letters Mu and then click on the little drop-down arrow at the right to drop down the list

Actual result
MuseScore crashes

Expected result
List of fonts should be displayed

Note
See attached screen cast video

Attachment Size
Crach-1.mov_.zip 3.5 MB

Comments

Priority P0 - Critical

I can reproduce. It's a little tricky, you have to first select the existing font name text and be sure not to dropdown the font selector before you start typing, but it's reproducible when you follow those steps. Debugger on Linux shows the crash is somewhere inside the Qt combobox code, but that's about all I can tell. it actually hangs up the debugger for me pretty good.

I could reproduce in Linux with the given steps.
Basically the full backtrace is inside Qt functions; attached the backtrace obtained with AddressSanitizer and using Qt debug libraries (Qt 5.12.8).
QComboBox::showPopup() in qtbase src/widgets/widgets/qcombobox.cpp line 2832 seems to be the line at which the crash occurs.

Attachment Size
asan_log.txt 3.15 KB

Another data point: I can't reproduce this under Windows.

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.4.2.9788, revision: 148e43f

Status PR created fixed

Fixed in branch 3.x, commit 443ead70ac

_Fix #303619: MuseScore crashing when entering font name

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

Passing an empty string to QWidget::setStyleSheet() causes the widget's
current style sheet to be removed, thus causing the widget's style to be
inherited from its parent. This creates a problem in QComboBox::showPopup(),
where it becomes possible that a pointer to a QStyle object could used after
the object itself has been destroyed. A style sheet of " " can be used to
override any previous style sheet without invalidating the current QStyle
object._

Fix version
3.5.0