System::scanElements collects TIE_SEGMENTs when it should not

• Feb 19, 2020 - 21:13
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

Not something you can see in the program, you must look in the debugger. Open the attached score and stick a breakpoint at this line in file.cpp:
https://github.com/musescore/MuseScore/blob/6bea8e24ae3bcdea8bc8515a49b…
Then look at the contents of the pel variable in the debugger. You'll see 3 tie segments at the end of the list. Those 3 are duplicates of elements already added to the list by MeasureBase::scanElements() (see Page::scanElements() for the calls to System:scanElements() and MeasureBase::scanElements()).
I have a very simple fix that excludes TIE elements from System::scanElements(). The PR is here:
https://github.com/musescore/MuseScore/pull/5735

Attachment Size
testties.mscz 3.21 KB

Comments

Hmm, I remember a similar issue coming up during GSoC, I believe as part of the tree structuring project. I thought it was fixed in 3.x as well as master already. Or maybe the fix was not right?

You forgot to mention that in order to hit that breakpoint you'd need to export to PNG ;-)
I do see 4 SlurTieSegements towards the end of the list (but not at the very end). That score does have 1 slur and 3 ties, so that seems pretty much like it should be?

Sorry to say that I somewhat recently rebuilt my PC and I don't have a version of MuseScore installed that will even open this old testties.mscz file without crashing. I have not been using MuseScore since then (working with sound, not so much sheet music).
It sounds like the answer to your question is YES, but I cannot be 100% certain until after I go through a series of motions that will take some time, and I have some other things going on. Thankfully this seems like an extremely minor issue that is probably resolved through other unrelated changes.

As my memory gradually refreshes itself on this topic I think one of the key phrases in the original post is "only visible in the debugger". So it's more of a memory leak problem than a user problem. And even that seems to be resolved based on your debugging results.

Status PR created closed

I don't doubt that :-)
I suppose you're saying that I could quickly download that version and at least be able to open this file, but I firmly believe in your ability to count slurs and tie segments correctly. Once I get MuseScore fully working on my machine I'll try to remember to review this... The PR is closed and I am setting this to closed as well.