bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue 1336 in lilypond: skipTypesetting segfaults when set during a


From: lilypond
Subject: Re: Issue 1336 in lilypond: skipTypesetting segfaults when set during a skipBars-induced MultiMeasureRest spanner
Date: Sat, 11 Dec 2010 17:39:09 +0000


Comment #31 on issue 1336 by Carl.D.Sorensen: skipTypesetting segfaults when set during a skipBars-induced MultiMeasureRest spanner
http://code.google.com/p/lilypond/issues/detail?id=1336

I've put together Neil's patch, together with Graham's patch (modifed to use the lilypond error call).

Everything seems fine.

I'll post it on Rietveld.



diff --git a/lily/paper-column-engraver.cc b/lily/paper-column-engraver.cc
index 33690e3..764937c 100644
--- a/lily/paper-column-engraver.cc
+++ b/lily/paper-column-engraver.cc
@@ -199,6 +199,8 @@ Paper_column_engraver::process_music ()
 void
 Paper_column_engraver::stop_translation_timestep ()
 {
+  if (to_boolean (get_property ("skipTypesetting")))
+    return;
   SCM m = now_mom ().smobbed_copy ();
   command_column_->set_property ("when", m);
   musical_column_->set_property ("when", m);
@@ -267,7 +269,7 @@ Paper_column_engraver::start_translation_timestep ()
   /*
     TODO: don't make columns when skipTypesetting is true.
   */
-  if (!first_)
+  if (!first_ && !to_boolean (get_property ("skipTypesetting")))
     make_columns ();
 }

diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc
index 9cdf664..f9d9cd2 100644
--- a/lily/simple-spacer.cc
+++ b/lily/simple-spacer.cc
@@ -245,7 +245,7 @@ Simple_spacer::compress_line ()
          assert (fabs (configuration_length (cur_force) - cur_len) < 1e-6);
          return cur_force;
        }
-
+
       cur_len -= block_dist;
inv_hooke -= compressed ? sp.inverse_compress_strength () : sp.inverse_stretch_strength ();
       cur_force = sp.blocking_force ();
@@ -381,7 +381,7 @@ get_column_description (vector<Grob*> const &cols, vsize col_index, bool line_st description.end_rods_.push_back (Rod_description (j, scm_to_double (scm_cdar (s))));
        }
     }
-
+
   if (!line_starter && to_boolean (col->get_property ("keep-inside-line")))
     description.keep_inside_line_ = col->extent (col, X_AXIS);

@@ -393,6 +393,8 @@ vector<Real>
 get_line_forces (vector<Grob*> const &columns,
                 Real line_len, Real indent, bool ragged)
 {
+  if (columns.size () < 2)
+      error (_ ("no music remaining to typeset"));
   vector<vsize> breaks;
   vector<Real> force;
   vector<Grob*> non_loose;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]