SegFault when undo after deleting initial 4/4 time signature if had set first measure Actual Duration to 2/4 and had chord symbols with timeline open

• May 10, 2021 - 02:17
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
duplicate
Regression
No
Workaround
Yes
Project

Steps to reproduce:
(0. View->Timeline needs to be open)
1. open attached score.
2. Right-click first measure and change "Actual" "Measure Duration" from 4/4 to 2/4 and hit OK.
3. click the 4/4 time signature and delete it.
4. undo (by pressing Ctrl-Z)

At this point MuseScore will hang and observe a SegFault with the following console output:

/build/musescore/src/MuseScore/libmscore/utils.cpp:Ms::Score::tick2measure: tick2measure 40320 (max 37440) not found
Segmentation fault (core dumped)

note that the presence of the chord symbols is necessary for this crash. If I remove the chord symbols prior to attempting the reproduction steps, then there won't be any crash.

I'm on MuseScore3 3.6.2 arch linux community repo build.


Comments

One possible clue is that step 3 turns the first measure which had "Actual Duration" of 2/4 into becoming a full 4/4 with new "Actual Duration" of 4/4.

The undo stack probably doesn't include the change of the "Actual Duration" from 2/4 to 4/4 (which it shouldn't because that measure shouldn't have gotten it's "Actual Duration" changed when deleting the time signature). So I suspect the crash might be fixed if fixed the action of deleting the 4/4 time signature to not change that measure actual duration from 2/4 to 4/4.

But that is just a hunch.

Status active needs info

Well, deleting the initial time signature is never correct. You can prevent it from getting shown in the staff properties, bit you should never delete it,

Anyway: I can't reproduce the issue, it just works, Windows 10, MuseScore 3.6.2

Status needs info active

I've just tried with latest AppImage (MuseScore-3.6.2.548021370-x86_64.AppImage) but still get SegFault upon undo:

/tmp/.mount_MuseScKjiYgq/AppRun: line 26: 25031 Segmentation fault      (core dumped) "${APPDIR}/bin/mscore-portable" "$@"

Also it doesn't matter if deleting the initial time signature isn't correct...could say it is a bad idea...but still it shouldn't result in a SegFault when I undo.

Title SegFault when undo after deleting initial 4/4 time signature if had set first measure Actual Duration to 2/4 and had chord symbols SegFault when undo after deleting initial 4/4 time signature if had set first measure Actual Duration to 2/4 and had chord symbols with timeline open
Status needs info active

aha...timeline needs to be open

Severity S3 - Major S2 - Critical
Workaround No Yes

confirmed (workaround is to not use the timeline or to not delete the time signatur but rather jiust don't disolay it via staff properties)