]> git.donarmstrong.com Git - lilypond.git/commitdiff
(mark_smob): don't mark parents, explain why.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 30 Jun 2002 15:17:12 +0000 (15:17 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 30 Jun 2002 15:17:12 +0000 (15:17 +0000)
ChangeLog
lily/break-substitution.cc
lily/grob.cc

index ba51941fb6a665157ace907852e3dc202787190f..2c70e2ce7bcfa340b11ff57387393fb659d292be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2002-06-30  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * lily/grob.cc (mark_smob): don't mark parents, explain why.
+
        * tex/lilyponddefs.tex: Define outputscale only once.
 
 2002-06-29  Jan Nieuwenhuizen  <janneke@gnu.org>
@@ -68,7 +70,7 @@
        lists of grobs. This should fix the problems of lily in
        combination with pthreads/qthreads.
 
-       * lily/grob.cc (mark_smob): bugfix: mark X parent too.
+       * lily/grob.cc (mark_smob): bugfix: mark other parent too.
 
 2002-06-23  Chris Jackson  <chris@fluffhouse.org.uk>
 
index 73c24c20e5723fdd462220c828a38f1dac6fc5bf..4f560e85cd1c2b286b8e9106a0fc31e2a2442cb7 100644 (file)
@@ -44,6 +44,15 @@ substitute_grob (Grob *sc)
       if (!line)
        return sc->self_scm();
 
+      /*
+       We don't return SCM_UNDEFINED for
+       suicided grobs, for two reasons
+
+       - it doesn't work (strange disappearing objects)
+
+       - it forces us to mark the parents of a grob, leading to
+       a huge recursion in the GC routine.
+       */
 
       /*
        This was introduced in 1.3.49 as a measure to prevent
index 992c4c9e340b7fa18909335f5f3a3fd4a54c3535..c39d0125bdd955e7cfa1cb52e8585540bd612cd2 100644 (file)
@@ -762,9 +762,15 @@ Grob::mark_smob (SCM ses)
     {
       scm_gc_mark (s->dim_cache_[a].offset_callbacks_);
       scm_gc_mark (s->dim_cache_[a].dimension_);
-      Grob *p = s->get_parent (Axis (a));
-      if (p)
-       scm_gc_mark (p->self_scm ());
+      
+      /*
+       don't mark the parents. The pointers in the mutable property
+       list form two tree like structures (one for X relations, one
+       for Y relations). Marking these can be done in limited stack
+       space.  If we add the parents, we will jump between X and Y in
+       an erratic manner, leading to much more recursion depth (and
+       core dumps if we link to pthreads.
+       */
     }
   
   if (s->original_l_)