lilypond-devel
[Top][All Lists]
Advanced

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

Re: segfault when making grob in scheme engraver


From: Jan-Peter Voigt
Subject: Re: segfault when making grob in scheme engraver
Date: Fri, 01 Mar 2013 09:57:36 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130221 Thunderbird/17.0.3

Hi Rekado,

I think, this is expectable. The stop-translation-step is too late ... you should create grobs in process-music. If you want this to happen as a last action, you should look at the order of all engravers. The last instanciated engraver should be processed last, IIRC

HTH, Jan-Peter



On 01.03.2013 05:10, rekado rekado wrote:
\version "2.16.1"

#(define segfault-engraver
   (list
    (cons 'stop-translation-timestep
     (lambda (trans)
      ;; creating the grob causes the segfault
      (let ((x (ly:engraver-make-grob trans 'TextScript '())))
       (ly:grob-set-property! x 'text "hi"))))))

\layout {
   \context {
     \Score
     \accepts "SegTab"
   }
   \context {
     \Staff
     \name "SegTab"
     \accepts "SegVoice"
   }
   \context {
     \Voice
     \name "SegVoice"
     \consists \segfault-engraver
   }
}

\header {
   title = "Segfault"
}

\score {
   \new GrandStaff
   <<
     \time 4/4
     \new SegTab {
       \new SegVoice = melody {
         \relative f {
           c'8-1\4 d-2 e4-3 f\3 g8-4
         }
       }
     }

     \new SegTab {
       \new SegVoice = bass {
         \relative f {
           c,8-1\8 d e f4 g
         }
       }
     }
   >>
}




reply via email to

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