lilypond-devel
[Top][All Lists]
Advanced

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

Re: opening bar check crashes the compiler


From: Steve Yegge
Subject: Re: opening bar check crashes the compiler
Date: Sun, 24 Feb 2013 18:33:56 -0800

Hi Thomas, thanks for the reply.

I think there are two issues at play here.  One issue is that user input should never crash the program.  It took nontrivial effort to track down why my scores were crashing after upgrading Lilypond (since in some distant past version, it didn't crash.)  Even if the input is invalid, a compiler error with line number information is greatly preferable to seeing "bus error" with no diagnostics.

The second issue is that disallowing bar checks at the beginning of a section hampers composability.  It turns out that my bar check is, in fact, positioned at a place where a bar line is expected.  Here is a slightly larger input file that demonstrates the problem:

\version "2.16.0"

introRest = {
  \set Score.skipBars = ##t
  R2.*11
  \unset Score.skipBars
}

orch = {
  \key g \minor
  \time 3/4
  \tempo "Andante" 4 = 84
  \override TupletBracket #'stencil = ##f
  \introRest
}

intro = \relative c {
  | r4 r d
}

music = {
  \intro
}

\score {
  <<
    \new Staff { \orch \music }
  >>
}

\score {
  \unfoldRepeats
  \music
  \midi {
    \context {
      \Score
    }
    \context {
      \Voice
      \remove "Dynamic_performer"
    }
  }
}

My bar check that's crashing the program is not at the beginning of the music.  It does fall on a bar line, which is consistent with the docs.

It improves composability of sections -- copying them, commenting them out, moving them around -- if you don't have to special-case bar checks happening at the beginning of a section.

If we agree that this is a bug then I'll go ahead and report it.

Thanks,

-steve


On Sun, Feb 24, 2013 at 8:21 AM, Thomas Morley <address@hidden> wrote:
2013/2/24 Steve Yegge <address@hidden>:
> Here's a small input file which for me produces a bus error when compiled
> with version 2.16.2 on OS X 10.7.5 (intel):
>
> \version "2.16.2"
>
> music = {
>   | d
> }
>
> \score {
>   << \new Staff { \music } >>
> }
>
> \score {
>   \music
>   \midi {
>     \context {
>       \Score
>       midiInstrument = #"acoustic guitar (steel)"
>     }
>   }
> }
>
> If you remove the | bar-check, it no longer crashes.
>
> This was happening in 2.14.x as well.
>
> Regards,
>
> -steve
>
> _______________________________________________
> lilypond-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-devel
>

Hi Steve,

if you think having found a bug you should report it following the
guidelines from
http://lilypond.org/website/bug-reports.html

That said, quoting the NR
http://lilypond.org/doc/v2.17/Documentation/notation-big-page#bar-and-bar-number-checks

%%%%

Bar and bar number checks

Bar checks help detect errors in the entered durations. A bar check
may be entered using the bar symbol, |, at any place where a bar line
is expected to fall. If bar check lines are encountered at other
places, a list of warnings is printed in the log file, showing the
line numbers and lines in which the bar checks failed. In the next
example, the second bar check will signal an error.

    \time 3/4 c2 e4 | g2 |

%%%

Shows that the bar-check should be written _after_ the section which
should be checked.

So, writing
| d
is a user-error.

Well, perhaps this error shouldn't result in a crash or perhaps the
doc should be more clear.

Seems to me that this is the real problem.

-Harm


reply via email to

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