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

Issue 182400043: Context: prevent dangling references in child contexts when the daddy is destroyed (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 5 months ago by Dan Eble
Modified:
9 years, 5 months ago
Reviewers:
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

I have some books which use an on-the-fly markup procedure that refers to a context in a closure. I now question the wisdom of this, but that's what I have. In certain circumstances (when processing a certain book with hundreds of scores, but not other books with tens of scores), one or more of the ancestors of the important context are destroyed. When the time finally comes to evaluate the markup, the first thing the on-the-fly procedure does is get a context property, which walks up the now-invalid hierarchy until a segfault occurs. Nullifying the child's pointer in the parent's destructor was the obvious way to fix this. Is there a better way?

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M lily/context.cc View 2 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 1
Dan Eble
9 years, 5 months ago (2014-12-03 04:08:12 UTC) #1

          
Sign in to reply to this message.

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