lilypond-auto
[Top][All Lists]
Advanced

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

Re: [Lilypond-auto] Issue 2813 in lilypond: Patch: Allows user to set Ch


From: lilypond
Subject: Re: [Lilypond-auto] Issue 2813 in lilypond: Patch: Allows user to set ChordName text
Date: Tue, 24 Jun 2014 10:54:44 +0000

Updates:
        Status: Accepted
        Labels: -Patch-push

Comment #11 on issue 2813 by address@hidden: Patch: Allows user to set ChordName text
http://code.google.com/p/lilypond/issues/detail?id=2813

The code is broken so badly that it needs to get reverted. Here is an example that crashes with a segfault:
\new ChordNames \with { chordChanges = ##t }
{ \override ChordName.text = #(lambda (grob) "Ouch!") c2
  c2
}

The problematic error path is pointed out by gcc:
chord-name-engraver.cc: In member function 'void Chord_name_engraver::process_music()': chord-name-engraver.cc:147:49: warning: 'markup' may be used uninitialized in this function [-Wmaybe-uninitialized]
   context ()->set_property ("lastChord", markup);

While this particular call has been introduced in a later issue, the original code of this issue contains the equivalent last_chord_ = markup; causing the same kind of crash.

The logic used for deciding whether to hide a chord at the beginning of a line is also quite broken. lastChord is assigned a markup, but is checked for being a list. A flag make_markup is splattered all over the code but not checked consistently.

Reverting this change will require changes in issue 3835 as well. I will reopen a separate bug report for the reversal to keep the history of this issue and then mark this issue as duplicate. As this patch does not manage to create a useful/clean separation between chord formatting and the chord change logic belonging in the engraver, I don't see a point in trying to further patch it up. This rather calls for a clean redesign.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



reply via email to

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