Crash when using Eighth Notes with Real-Time(Manual) Input

• May 28, 2021 - 21:39
Reported version
3.6
Type
Functional
Frequency
Few
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

1) Create a new score
2) Set note input to Real-Time (manual)
3) Set note length to eighth
4) Press and hold any key on a midi keyboard or virtual piano keyboard
5) Press enter or real-time advance three times
6) Musescore crashes

Tested on Arch Linux

STDOUT logs:
unknown:unknown: changeState NORMAL -> NOTE_ENTRY
unknown:unknown: unknown cmd
unknown:unknown: midiNoteReceived: pitch 60, chord 0, velocity 57
unknown:unknown: Internal error: shortcut <> not found
unknown:unknown: unknown cmd <>
qrc:/qml/palettes/Palette.qml:onStateChanged: STATE CHANGED
qrc:/qml/palettes/Palette.qml:onStateChanged: STATE CHANGED HOVERED
unknown:unknown: midiNoteReceived: pitch 64, chord 1, velocity 71
unknown:unknown: Internal error: shortcut <> not found
unknown:unknown: unknown cmd <>
unknown:unknown: midiNoteReceived: pitch 60, chord 0, velocity 0
unknown:unknown: Internal error: shortcut <> not found
unknown:unknown: unknown cmd <>
unknown:unknown: Pitches match! Note 60, Pitch 60
unknown:unknown: midiNoteReceived: pitch 65, chord 1, velocity 56
unknown:unknown: Internal error: shortcut <> not found
unknown:unknown: unknown cmd <>
unknown:unknown: midiNoteReceived: pitch 64, chord 0, velocity 0
unknown:unknown: Internal error: shortcut <> not found
unknown:unknown: unknown cmd <>
unknown:unknown: Pitches match! Note 64, Pitch 64
/build/musescore/src/MuseScore/libmscore/durationtype.cpp:unknown: ASSERT: "truncate || (fraction() - l).numerator() == 0" in file /build/musescore/src/MuseScore/libmscore/durationtype.cpp, line 438
Aborted (core dumped)


Comments

Frequency Once Few

I can reproduce the exact symptoms with eighth notes and shorter, which makes realtime not input basically unusable. Quarters or longer have no issue.

Let me know if I can provide anything else (logs, debug traces, etc).

I did some testing today. I cannot reproduce the issue on a Windows 10 machine. I've only reproduced it on Linux. I've tested the ALSA, Pipewire, and JACK backends and they all crash. Based on frnx's other bug report is seems we're both using Pipewire/JACK, so this is likely to be an issue exclusive to Pipewire.

Furthermore, I've managed to reproduce it in new ways. It happens in both automatic and manual real-time modes. It seems to be the insertion of the fourth quarter note that causes it, no manual advance necessary. You can put in three quarter rests and hit any MIDI key and it will crash.

I spent some time getting a MuseScore build up and running with gdb and tracked the root cause down.

I haven't yet looked into how to get it integrated into MuseScore as I'm not too familiar with the contribution process, but here's a patch that appears to fix the issue for me (see attachment).

I'm not exactly sure as to how the issue is not more widespread, because from what I can see it has nothing to do with Pipewire.

Attachment Size
fix-noteentry-8th-realtime.patch 1.78 KB