lilypond-devel
[Top][All Lists]
Advanced

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

Re: issue 1464 (was: a plea to new contributors)


From: Phil Holmes
Subject: Re: issue 1464 (was: a plea to new contributors)
Date: Sun, 2 Jan 2011 16:18:17 -0000

Joe asked:

"In your original backtrace, is the X_AXIS parent of the Item in frame #2 0x0? If so, I'm fine with the patch."

I've been using this as a learning exercise, and can say that Item::spanned_rank_interval calls Item::get_column to return the parent, as below.

Paper_column *
Item::get_column () const
{
 Item *parent = dynamic_cast<Item *> (get_parent (X_AXIS));
 return parent ? parent->get_column () : 0;
}

The call to get_parent above does return 0x0.

--
Phil Holmes


----- Original Message ----- From: Joe Neeman
To: Graham Percival ; address@hidden ; Neil Puttock
Sent: Sunday, January 02, 2011 1:39 AM
Subject: Re: issue 1464 (was: a plea to new contributors)





On Sun, Jan 2, 2011 at 2:14 AM, Matthias Kilian <address@hidden> wrote:

On Sat, Jan 01, 2011 at 02:10:04PM +0100, Matthias Kilian wrote:
I don't know why gdb doesn't find paper-column.hh, but anyaway...
it looks like Item::get_column() returns NULL, because its parent's
get_column() returns NULL (I checked that the parent on the X_AXIS
itself is not NULL).


Bisected to this one (cc'd Neil):


commit 6d28aebbaaab1be9961a00bf15a1ef93acb91e30
Author: Neil Puttock <address@hidden>
Date:   Mon Sep 6 22:49:28 2010 +0100

  Fix metronome alignment.

  Don't align on KeySignature unless explicitly requested via
  'break-align-symbols and make order of 'break-align-symbols
  significant.

  * remove `key-signature' from 'break-align-symbols

  * acknowledge break_alignment, and set this as X-parent
    instead of break_aligned, but only if found break_aligned
    is visible

  * add regression test to test ordering

  * tweak existing test to reflect change in default for
    'break-align-symbols

[...]


I tried the diff below, which `fixed' the segfault, but it may be
completely wrong (I'm currently not familiar with the LilyPond code
at all). Unfortunately, I don't have a new enough ImageMagick on my
system, so I can't run the regression tests.

diff --git a/lily/metronome-engraver.cc b/lily/metronome-engraver.cc
index 0a41fc9..e34c0ad 100644
--- a/lily/metronome-engraver.cc
+++ b/lily/metronome-engraver.cc
@@ -95,7 +95,10 @@ Metronome_mark_engraver::acknowledge_break_aligned (Grob_info info)
         && safe_is_member (g->get_property ("break-align-symbol"),
                            text_->get_property ("break-align-symbols"))
         && Item::break_visible (g))
-    support_ = g;
+    {
+      support_ = g;
+      text_->set_parent (g, X_AXIS);
+    }
}


In your original backtrace, is the X_AXIS parent of the Item in frame #2 0x0? If so, I'm fine with the patch.

Cheers,
Joe





_______________________________________________
lilypond-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-devel



reply via email to

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