Menu

#5217 random results for the merge-rests-engraver regression test

Fixed
Defect
2019-11-11
2017-10-20
No

There is some randomness in the placement of dots. The merge-rests-engraver.ly regtest (git-version557dc7) exposes the problem as the output might be one of the two attached pngs. The probability for both results is identical on my system.

Update Nov 5th 2019
Issue 5217: Fix sorting order without outside-staff-priority

If the two Grobs have no outside-staff-priority, the compare function
staff_priority_less() would relate the two pointers. This may lead to
changing sorting orders in subsequent runs, apparently resulting in
"random" positions in the regression tests rest-dot-position.ly and
sometimes merge-rests-engraver.ly.
Solve this by keeping the original order in the vector:
Mark two Grobs without outside-staff-priority as being equal by
always returning false (none is less than the other), and
use vector_stable_sort() to keep equal items in their relation.

http://codereview.appspot.com/554960043

2 Attachments

Related

Issues: #3208

Discussion

<< < 1 2 (Page 2 of 2)
  • Anonymous

    Anonymous - 2019-11-05
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,2 +1,17 @@
     There is some randomness in the placement of dots. The merge-rests-engraver.ly regtest (git-version557dc7) exposes the problem as the output might be one of the two attached pngs. The probability for both results is identical on my system.
    
    +**Update Nov 5th 2019**
    +Issue 5217: Fix sorting order without outside-staff-priority
    +
    +If the two Grobs have no outside-staff-priority, the compare function
    +staff_priority_less() would relate the two pointers. This may lead to
    +changing sorting orders in subsequent runs, apparently resulting in
    +&#34;random&#34; positions in the regression tests rest-dot-position.ly and
    +sometimes merge-rests-engraver.ly.
    +Solve this by keeping the original order in the vector:
    +* Mark two Grobs without outside-staff-priority as being equal by
    +always returning false (none is less than the other), and
    +* use vector_stable_sort() to keep equal items in their relation.
    +
    +http://codereview.appspot.com/554960043
    +
    
    • assigned_to: Knut Petersen --> Jonas Hahnfeld
    • Needs: -->
    • Type: -->
     
  • Anonymous

    Anonymous - 2019-11-07
    • Patch: new --> review
    • Type: --> Enhancement
     
  • Anonymous

    Anonymous - 2019-11-07

    Passes make make check and a full make doc.

     
  • Anonymous

    Anonymous - 2019-11-09
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2019-11-09

    Patch on countdown for Nov 11th

     
  • Anonymous

    Anonymous - 2019-11-11
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2019-11-11

    Patch counted down - please push.

     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2019-11-11
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
    • Type: Enhancement --> Defect
     
  • Jonas Hahnfeld

    Jonas Hahnfeld - 2019-11-11

    pushed to staging as

    commit 152a28103106cbe6556c40dc40a544cf8bd94136
    Author: Jonas Hahnfeld <hahnjo@hahnjo.de>
    Date:   Tue Nov 5 17:54:41 2019 +0100
    
        Issue 5217: Fix sorting order without outside-staff-priority
    
        If the two Grobs have no outside-staff-priority, the compare function
        staff_priority_less() would relate the two pointers. This may lead to
        changing sorting orders in subsequent runs, apparently resulting in
        "random" positions in the regression tests rest-dot-position.ly and
        sometimes merge-rests-engraver.ly.
        Solve this by keeping the original order in the vector:
         * Mark two Grobs without outside-staff-priority as being equal by
           always returning false (none is less than the other), and
         * use vector_stable_sort() to keep equal items in their relation.
    

    Please let me know if you're still having issues with the two mentioned regression tests after creating a new test-baseline.

     
<< < 1 2 (Page 2 of 2)