Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2011)

Issue 6449126: hairpin.cc: consider suicide before drawing stencil; issue 2583 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 8 months ago by Keith
Modified:
11 years, 5 months ago
Reviewers:
dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

hairpin.cc: consider suicide before drawing stencil; issue 2583

Patch Set 1 #

Total comments: 1

Patch Set 2 : amend regtest #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -7 lines) Patch
M input/regression/hairpin-barline-break.ly View 1 1 chunk +9 lines, -1 line 1 comment Download
M lily/grob-property.cc View 1 chunk +1 line, -1 line 2 comments Download
M lily/hairpin.cc View 1 chunk +7 lines, -5 lines 0 comments Download

Messages

Total messages: 4
Keith
http://codereview.appspot.com/6449126/diff/1/lily/grob-property.cc File lily/grob-property.cc (right): http://codereview.appspot.com/6449126/diff/1/lily/grob-property.cc#newcode254 lily/grob-property.cc:254: *alist = scm_assq_remove_x (*alist, sym); Separate fix. Earlier we ...
11 years, 8 months ago (2012-08-10 09:15:19 UTC) #1
Keith
http://codereview.appspot.com/6449126/diff/1003/input/regression/hairpin-barline-break.ly File input/regression/hairpin-barline-break.ly (right): http://codereview.appspot.com/6449126/diff/1003/input/regression/hairpin-barline-break.ly#newcode11 input/regression/hairpin-barline-break.ly:11: line-width = 4.\cm parallel with dynamics-broken-hairpin.ly
11 years, 8 months ago (2012-08-11 02:36:13 UTC) #2
dak
http://codereview.appspot.com/6449126/diff/1003/lily/grob-property.cc File lily/grob-property.cc (right): http://codereview.appspot.com/6449126/diff/1003/lily/grob-property.cc#newcode254 lily/grob-property.cc:254: *alist = scm_assq_remove_x (*alist, sym); I was considering cherry-picking ...
11 years, 8 months ago (2012-08-23 10:09:18 UTC) #3
Keith
11 years, 8 months ago (2012-08-24 04:03:30 UTC) #4
http://codereview.appspot.com/6449126/diff/1003/lily/grob-property.cc
File lily/grob-property.cc (right):

http://codereview.appspot.com/6449126/diff/1003/lily/grob-property.cc#newcode254
lily/grob-property.cc:254: *alist = scm_assq_remove_x (*alist, sym);
On 2012/08/23 10:09:18, dak wrote:
> However, if the comment above is supposed to make any sense, 
> namely that the property is assumed
> to be set (or cleared) [by the callback]
> then the assertion would have to be "assert (value !=
> marker)", and the path "value == marker" should never be reached at all.
> 

That comment made sense when first written in 2005, explaining why we are
reading a property that just set (with the calculation-in-progress marker).  Its
assumption didn't last very long; the next commit ten hours later added the
(buggy) call to scm_assq_remove_x() attempting to clear that marker, in case the
callback forgot.  (In today's code I find no callbacks clearing their own
markers.)  The assert was added two years after that, largely preventing the
scenario described in the comment from happening in any useful way.

I'll delete the comment.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b