lilypond-user
[Top][All Lists]
Advanced

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

"bus error" crash, possibly because of custom (ScoreMarks) context?


From: Kieren MacMillan
Subject: "bus error" crash, possibly because of custom (ScoreMarks) context?
Date: Sun, 1 Sep 2013 15:50:49 -0400

Hello all,

I use my own "ScoreMarks" context to display RehearsalMarks and MetronomeMarks. 
Most of the time, it works perfectly — unfortunately, I have recently been 
getting fatal crashes (i.e., Lily stops right after "Preprocessing"; DEBUG log 
stops after the two lines "Guile 1.8" + "Bus Error").

The crashes seem to be directly related to any MetronomeMark which is at the 
very beginning of the score — I deduced this mostly because Lily outputs

    programming error: cyclic chain in pure-Y-offset callbacks

right at that point in the score, and if I put s4 \tempo FOOBAR, everything is 
fine.

I use a custom wrapper function to format MetronomeMarks, which may certainly 
be part of the problem (especially because I've been using it for many, many 
versions, and things may have changed in the meantime). I've included a 
"minimal example" incorporating both the custom context and custom function. 
Unfortunate, it doesn't actually demonstrate the problem (i.e., it doesn't 
crash on my machine) — but I thought maybe someone might be able see something 
obvious (like the way parameters are handled in my tempoMUMM function) that is 
a likely culprit for the bus error.

Thanks for any help!
Kieren.
____________________________

\version "2.17"

\layout {
  \context {
    \type "Engraver_group"
    \name ScoreMarks
    \consists "Staff_collecting_engraver"
    \consists "Axis_group_engraver"
    \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0)
    \override VerticalAxisGroup.staff-affinity = #DOWN
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #2
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.minimum-distance 
= #4
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.stretchability = 
#0.5
    \consists "Metronome_mark_engraver"
    \override MetronomeMark #'self-alignment-Y = #-1
    \override MetronomeMark #'font-size = #3
    \override MetronomeMark #'font-series = #'normal
    \override MetronomeMark #'padding = #0
    \override MetronomeMark #'outside-staff-priority = #200
    \override MetronomeMark #'Y-offset = #3.5
    \consists "Text_spanner_engraver"
    \override TextSpanner #'font-size = #2
    \consists "Mark_engraver"
    \override RehearsalMark #'outside-staff-priority = #75
    \override RehearsalMark #'font-size = #4
    \consists "Time_signature_engraver"
    \override TimeSignature #'stencil = #point-stencil
  }
  \context {
    \StaffGroup
    \accepts ScoreMarks
  }
  \context {
    \GrandStaff
    \accepts ScoreMarks
  }
  \context {
    \Score
    \remove "Metronome_mark_engraver"
    \remove "Mark_engraver"
    \accepts ScoreMarks
  }
}

tempoMUMM =
  #(define-music-function
    (parser location prependText notevalue mmText)
    (string? string? string?)
    #{
      \tempo \markup \concat {
        \bold $prependText
        \bold \override #'(word-space . 0.5) \line {
          " ("
          \fontsize #-0.8 {
            \fontsize #-2.2 \general-align #Y #DOWN \note #notevalue #1
            "="
            $mmText
          }
          ")"
        }
      }
    #})

global = {
  \tempoMUMM #"Testing" #"4" #"ca. 100" s1
}

someMusic = \relative c' { c1 }

\score {
  <<
    \new ScoreMarks \global
    \new Staff \someMusic
  >>
}


reply via email to

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