Generate courtesy signature if next system has a local time signature on any staff
Reported version
3.2
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project
Create a score with more than one instrument, in the first measure of the second system put a local time signature in the second staff, and there's no courtesy time signature generated at the end of the first system.
Fix version
3.3.0
Comments
It's just so weird, so so weird...
A breakpoint test shows that in libmscore/edit.cpp line 4224 does break when adding local time signature (whatever staff), but line 4233 doesn't, which I believe means the conditional sentence is false. Between lines 4224 and 4277 the function cannot possibly return if lines 4233 to 4274 are skipped, but line 4277 doesn't break. Why on earth can this happen?
Why should it break after the if?
Ah, I see, in that case it should hit a breakpoint at 4277
In reply to Why should it? if (et… by Jojo-Schmitz
Yes, so this is examined and found not correct, then the program should move to the next conditional sentence!
if (et == ElementType::LAYOUT_BREAK)
But it doesn't.
Maybe the optimizer is playing dirty tricks?
In reply to Maybe the optimizer is… by Jojo-Schmitz
Those are completely different things, why would the optimizer want to do that?
Ask the optimizer ;-). They do in fact tend to also optimize jump tables
In reply to Aske the optimizer ;-). They… by Jojo-Schmitz
OK, but line 4327 doesn't break too. If the program doesn't load this, then this function is directly returned, then there shouldn't be any difference between staves...
OK, probably the problem is not in this function.
I cannot find any possible cause for now...
I think the cause could be inside function Measure::addSystemTrailer, here:
https://github.com/musescore/MuseScore/blob/436ec48541eaa2b6fee860ba308…
I think (but this has to be verified) that the check for time signature change is probably done only for the first staff (i.e. staff number 0; probably here: https://github.com/musescore/MuseScore/blob/436ec48541eaa2b6fee860ba308… ?).
In reply to I think the cause could be… by ABL
You mean element(0)? Does that mean staff no.0?
In reply to You mean element(0)? Does… by Howard-C
From what I understand, practically yes, see here: https://github.com/musescore/MuseScore/blob/436ec48541eaa2b6fee860ba308…
To be precise, it refers to the first voice of the first staff.
Each track is one voice, so each staff contains 4 tracks; the total number of tracks in a score is nstaves * VOICES, where nstaves is the total number of staves and VOICES (a constant =4) is the number of voices per staff.
In reply to (No subject) by geetar
Geez, I still make grammar mistakes like this! :O
In reply to From what I understand, yes,… by ABL
A million thanks! This is the cause!
See https://github.com/musescore/MuseScore/pull/5330.
Fixed in branch master, commit 4bd390e7a1
_fix #294580: generate courtesy signature if next system has a local time signature on any staff
Resolves: https://musescore.org/node/294580.
Right now a courtesy time signature only generates if the local time signature is on the first staff, because the code only checks for the first track. The fix checks for all tracks._
Fixed in branch master, commit ebfd3ea346
_Merge pull request #5330 from Howard-C/local-timesig
fix #294580: generate courtesy signature if next system has a local time signature on any staff_
Automatically closed -- issue fixed for 2 weeks with no activity.