To me, it dies in fraction.cpp, line 196 (func Fraction::ticks() ). The last meaningful call is made in measure.cpp, line 1676 (func Measure::adjustToLen() ).
The problem seems related to the measure rest in LH staff, which has a _duration of 0/0! It is not recognized as a measure rest in line 1670 and any attempt to compute its ticks raises a division by 0 fault.
May be an artifact of the score being an old 1.x score? Trying on a new 2.0 score with a measure rest, there is no problem...
I could trace the problem down to TDuration(const Fraction& _f) c'tor in file durationtype.cpp, which seems unable to create a TDuration out of any fraction whose numerator is not a either 2^n or 3 or 7.
5/4 does indeed generate a TDuration with a _val = V_INVALID, from which ChangeChordRestLen::flip() (file undo.cpp) assigns to the ChordRest (Rest in our case) a duration 0/0. Whence the crash.
The whole process is started by line 1642 - 1651 of Measure::adjustToLen(Fraction nf) (file measure.cpp). I think this is the point to fix, possibly by changing the call(s) to score()->undo(new ChangeChordRestDuration(rest, <some_timesig>));
into score()->undo(new ChangeChordRestDuration(rest, <a_whole_measure_duration>));
What's strange is that this doesn't work on my work unit (Win8.1 64-bit, Qt 5.2.0), tested with 3/4, 4/4 or 5/4, but works OK at home (Win8.1 64-bit, Qt 5.2.0). Changing a 5/4 measure definitely fails.
Comments
It seems to die in score.cpp line 3491, dereferencing _score.map()
To me, it dies in fraction.cpp, line 196 (func
Fraction::ticks()
). The last meaningful call is made in measure.cpp, line 1676 (funcMeasure::adjustToLen()
).The problem seems related to the measure rest in LH staff, which has a _duration of 0/0! It is not recognized as a measure rest in line 1670 and any attempt to compute its ticks raises a division by 0 fault.
May be an artifact of the score being an old 1.x score? Trying on a new 2.0 score with a measure rest, there is no problem...
M.
Hmm, it seems to crash on a new score with a full measure rest that is 5/4
I could trace the problem down to
TDuration(const Fraction& _f)
c'tor in file durationtype.cpp, which seems unable to create aTDuration
out of any fraction whose numerator is not a either 2^n or 3 or 7.5/4 does indeed generate a
TDuration
with a_val = V_INVALID
, from whichChangeChordRestLen::flip()
(file undo.cpp) assigns to the ChordRest (Rest in our case) a duration 0/0. Whence the crash.The whole process is started by line 1642 - 1651 of
Measure::adjustToLen(Fraction nf)
(file measure.cpp). I think this is the point to fix, possibly by changing the call(s) toscore()->undo(new ChangeChordRestDuration(rest, <some_timesig>));
into
score()->undo(new ChangeChordRestDuration(rest, <a_whole_measure_duration>));
I'll see if I can arrive at a pull request.
M.
Pull request [https://github.com/musescore/MuseScore/pull/809] submitted to Github.
M.
(What is wrong with links?)
What's strange is that this doesn't work on my work unit (Win8.1 64-bit, Qt 5.2.0), tested with 3/4, 4/4 or 5/4, but works OK at home (Win8.1 64-bit, Qt 5.2.0). Changing a 5/4 measure definitely fails.
It depends on the time signature of the measure you start with and on the resulting measure actual duration.
Anyway, a PR is pending which should fix the issue.
M.
Nothing wrong with links, if entered correctly ;-) PR #809
Perhaps ironically, this was the bug in 1.3 that prompted me to download the nightly. I guess I shall await the merging of the PR. ..
Fixed in 663ed4fe7c
Automatically closed -- issue fixed for 2 weeks with no activity.