Half duration shortcut crashes musescore when time signature is 5/4
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
1) Open musescore and use default empty score
2) Change time signature to 5/4
3) click on the rest note in any bar
4) press Q
in console output you will see:
unknown:unknown: failed to create compose table
/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
Fix version
4.1.0
Comments
(you're all but one, and crashes are critical)
I can't reproduce in 3.6.2 in Windows 11
I can in a Debug build though. But that is nothing a mere mortal user would/should ever use. The released version os MuseScore, as available from this site's download page, should not have that issue (being build in Release mode, asserts disabled), so I guess you'd need to bring this up with whoever you got your version from.
Easy fix might be to just remove that Q_ASSERT()?
Code:
Possible fix:
I have no idea about any possible negative consequences though
Same crash with Shift+Q, W and Shift+W. So I think my proposed fix above is correct, it fixes them all and in the routine that handles those change duration shortcuts.
I'll add it to https://github.com/musescore/MuseScore/pull/9000 and check whether the same bug and fix applies to master (which will become MuseScore4) too.
Edit: apparently it does
See https://github.com/musescore/MuseScore/pull/12084
Wow that is quick.
I downloaded my version from Arch linux repository.
Thanks for fixing.
Please tell the Arch maintainer to build releases in Release mode rather than in Debug mode
But meanwhile, best to skip those unofficial third-party builds and instead download the official version of MuseScore directly from this site (see Download link above). For Linux, the AppImage is the supported build. The versions individual distribution maintainers build themselves are generally not tested and often contain errors like this.
Which is what I wrote above ;-)
Well, once you are used for all your software keeping up to date with new releases, it is hard to treat musescore differently.
I actually wen on and checked this with the package maintainer and it is not built in debug but in release mode
(see here: https://github.com/archlinux/svntogit-community/blob/packages/musescore…)
So this bug might have some other cause in my case.
Unless the maintaine did some further changes, a "Release" build does
#define NDEBUG
which in turn disables theabort()
inside theassert()
marco (which is used byQ_ASSERT()
), so it won't crash (not there at least). But "release" is not neccessarily the same as "RELEASE" or "Release".Whatever: just use the AppImage, this is provided by the MuseScore developers and the only supported version for Linux. And it won't crash in this situation
I undestand. thanks.
Seems fixed, I can't reproduce in 4.0.1 nor in a Debug build from the master branch
Should not be fixed though, guess my testing was flawed
Fixed in branch master, commit d6188228fb
_Fix #332925: Half duration shortcut crashes musescore when time signature is 5/4
Crash happens only in Debug builds._
Fixed in branch master, commit f3ce3c94c2
_Merge pull request #12084 from Jojo-Schmitz/cmdIncDecDuration
[MU4] Fix #332925: Half duration shortcut crashes musescore when time signature is 5/4_
Automatically closed -- issue fixed for 2 weeks with no activity.