Double bar + key sig change + break + delete break removes the double bar

• Oct 3, 2011 - 18:07
S4 - Minor

Weird bug, easy to reproduce:

  1. Open a score.
  2. Add a double bar line between 2 random measures.
  3. Now change the key signature from the double bar onward.
  4. Now add a break on the double bar line
  5. Delete the break.

The double bar is gone!


And linked to this bug: if you now change the clef signature on the measure where you changed the signature, the double bar appears on the next measure!

Yes, on my Windows 7 system with ba31a1b. At least, as described in the original post. The followup #1 behavior I don't see, but I did see other strange but not exactly reproducible behaviors when trying to add a clef change to that measure (random clef signs appearing in other measures).

I think this is related to the courtesy key signature.
(still present in Nightly build 6952215; Windows XP SP2)
If you uncheck "Create courtesy key signatures" in Style->General->Page it behaves as expected (at least for what concerns the original bug).

A possible way to get rid of the bug (this one and also the one I am referring to in comment #8) is to comment (or delete) line 1817 of MuseScore/libmscore/layout.cpp, i.e.
m->setEndBarLineType(DOUBLE_BAR, true);
// m->setEndBarLineType(DOUBLE_BAR, true);
By doing so, the program does not force a double bar line before a courtesy key signature and whichever bar line style the user has set is preserved.
[Note that this change does not affect the case in which the bar line is a starting repeat, which is dealt with at line 1904 of layout.cpp, i.e. in this case a double bar line precedes the courtesy key signature and a starting repeat is displayed at the beginning of next line]
(Tested with self-compiled MuseScore on LInux Mint 9, revision b9653be)

And fwiw, while I normally would add a double bar at key changes, I would prefer to be in charge of that myself - I don't really want MuseScore adding it for me.

I haven't had a chance to try out the new "left barline" facility, but it would be important this fix play nice with that. I'd expect to be able to add a double bar, add line break, change left bar line of the new line to also be double, then delete the line break and be back where I started. Well, not where I started - I expect the double bar to still be there.

I think the left barline of the next system is basically independent of the (right) barline at the end of one system.
I tried to use the self-compiled version with the "fix" described in #9 and the left barline utility, see the screencast.
(note that the left barline is linked to the system and not the the measure)
(I could not hide the clefs because of a strange behavior)
(Linux Mint 9; revision 763af76 self-compiled)

Checked out the video, looks great. Not so sure about tying the left barline to the system rather than the measure; at the last step in your video (deleting the line break), I was rather surprised to see the left double bar line stay behind, now attached to a different measure than originally. But that's a separate issue, and once I have a chance to play with the new left barline facility more, I'll probably have more to say about that.

BTW, regarding the repeat behavior, if I under you correctly, I'd be fine with a forced double bar before courtesy key changes leading into a double bar at the start of a line. So your proposed one line fix to the problem at hand (disappearing double bars) is looking good to me.

Hi there,
I'm a bit confused - I'm plagued by this problem at the moment - but having read the comments above, I'm not sure what I can do about it. I'm using Version 1.3 with Windows 7. I want courtesy key signatures to be created, so I don't want to turn this off if I can avoid it, and I don't understand the comments about editing MuseScore/libmscore/layout.cpp. Where do I find it? Or is this something an ordinary user shouldn't be messing with...

The latter :-). Those comments are amongst the developers, discussing where in the MuseScore source code the problem needs to be fixed. And it apparently already has been fixed in the next major version. Meanwhile, you have to just work around it, unfortunately.

Thanks Jojo, I tried that - it's still got a problem. I'm working on a score with transposing instruments, and when I swap between concert pitch and transposed pitch, the double bar line disappears again. It's there when the music is transposed, but not when it's at concert pitch. I've attached the file for you to have a look at. The double bar lines I've been looking at are at bars 387 and 392 where there is a key change. The double bar lines at 395 where there is just a time signature change are unaffected.

I just tried it and it works fine as far as switching concert pitch on and off goes. Not sure if it's deliberate that the key signatures are not consistent between instruments. Can you post the exact series of steps to reproduce what you are seeing with a nightly build?

Anyhow, I'm not sure it's reasonable to expect the bug fix in 2.0 to also help with scores that already have the problem. The question would seem to be whether a newly created score demonstrates the problem, I think. Following the steps in the original post no longer seems to cause a problem.