Export to GitHub

lilypond - issue #2813

Patch: Allows user to set ChordName text


Posted on Sep 6, 2012 by Quick Horse

Allows user to set ChordName text

http://codereview.appspot.com/6496085

Comment #1

Posted on Sep 6, 2012 by Swift Camel

Build results are available at

http://grenouille.lilynet.net/patches-tests/2813/.

07:56:13 (UTC) Begin LilyPond compile, previous commit at 2c00d625e88fb68342ac2fbaaffc6e8f9a182483 07:56:28 Merged master, now at: 2c00d625e88fb68342ac2fbaaffc6e8f9a182483 07:56:30 Success: sudo -u lilybuild ./autogen.sh --noconfigure 07:57:06 Success: sudo -u lilybuild /home/lilybuild/master/configure --disable-optimising 07:57:16 Success: sudo -u lilybuild nice make clean 08:12:32 Success: sudo -u lilybuild nice make -j2 CPU_COUNT=2 ANTI_ALIAS_FACTOR=1 08:34:13 Success: sudo -u lilybuild nice make test-baseline -j2 CPU_COUNT=2 ANTI_ALIAS_FACTOR=1

08:34:19 Issue 2813: Patch: Allows user to set ChordName text 08:34:19 Issue 2813: Testing patch issue6496085_1_diff 08:34:19 Success: sudo -u lilybuild git apply --index /home/jmandereau/lily-test-patches/issue6496085_1.diff 08:34:21 Success: sudo -u lilybuild ./autogen.sh --noconfigure 08:34:45 Success: sudo -u lilybuild /home/lilybuild/master/configure --disable-optimising 08:34:51 Success: sudo -u lilybuild nice make clean 08:50:10 Success: sudo -u lilybuild nice make -j2 CPU_COUNT=2 ANTI_ALIAS_FACTOR=1 08:58:34 * FAILED BUILD * sudo -u lilybuild nice make check -j2 CPU_COUNT=2 ANTI_ALIAS_FACTOR=1 Previous good commit: 1092c0a96b39227cee9e51fb80d9518ad740cf1d Current broken commit: 2c00d625e88fb68342ac2fbaaffc6e8f9a182483 08:58:34 Error: issue 2813: Problem encountered 08:58:34 Traceback (most recent call last): File "/home/jmandereau/lilypond-extra/patches/projecthosting_patches.py", line 275, in do_check results_url = autoCompile.test_issue (issue_id, patch) File "/home/jmandereau/lilypond-extra/patches/compile_lilypond_test/init.py", line 273, in test_issue self.build (patch_test=True, issue_id=issue_id) File "/home/jmandereau/lilypond-extra/patches/compile_lilypond_test/init.py", line 315, in build issue_id) File "/home/jmandereau/lilypond-extra/patches/compile_lilypond_test/init.py", line 266, in runner raise FailedCommand ("Failed runner: %s\nSee the log file %s" % (command, this_logfilename)) FailedCommand: Failed runner: sudo -u lilybuild nice make check -j2 CPU_COUNT=2 ANTI_ALIAS_FACTOR=1 See the log file log-2813-nice-make-check--j2-CPU_COUNT=2-ANTI_ALIAS_FACTOR=1.txt

Comment #2

Posted on Sep 6, 2012 by Quick Lion

Patchy the autobot says: make check failed

Comment #3

Posted on Sep 7, 2012 by Quick Horse

Allows user to set ChordName text

http://codereview.appspot.com/6496085

Comment #4

Posted on Sep 7, 2012 by Quick Kangaroo

Patchy the autobot says: passes tests.

Comment #5

Posted on Sep 8, 2012 by Quick Lion

(No comment was entered for this change.)

Comment #6

Posted on Sep 10, 2012 by Happy Camel

(No comment was entered for this change.)

Comment #7

Posted on Sep 12, 2012 by Happy Camel

Counted down to 20120911, please push.

Comment #8

Posted on Sep 12, 2012 by Quick Horse

Pushed as 0d4c79ec0f5d728ac7fe58b87ccf51079ec33766.

Comment #9

Posted on Sep 12, 2012 by Happy Wombat

Pushed after I started GUB

Comment #10

Posted on Sep 24, 2012 by Happy Camel

(No comment was entered for this change.)

Comment #11

Posted on Jun 24, 2014 by Quick Lion

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.

Comment #12

Posted on Jun 24, 2014 by Quick Lion

(No comment was entered for this change.)

Comment #13

Posted on Jun 24, 2014 by Quick Lion

Another bug of this patch: \new ChordNames \with { noChordSymbol = ##f } { c2 r2 c2 r2 } worked fine previous to the patch, but produces

Interpreting music... Preprocessing graphical objects... programming error: Object is not a markup. continuing, cross fingers This object should be a markup: () programming error: Object is not a markup. continuing, cross fingers This object should be a markup: () Finding the ideal number of pages...

after the patch.

Status: Duplicate

Labels:
Type-Enhancement Fixed_2_17_3