On 10/22/10 3:10 AM, "Valentin Villenave" <[email protected]> wrote:
> The following code causes a segfault.
> LilyPond 2.13.36, GNU/Linux x86_64.
>
> toto =
> #(define-music-function (parser location arg) (ly:music?)
> (display (ly:event-property arg 'name))
> (make-sequential-music arg))
>
> { \toto a }
As near as I can tell, this code is triggering an infinite loop that fails
when the scheme heap overflows.
arg is *not* a stream-event, it's a music-event.
(display (ly:music-property arg 'name))
will give you the name EventChord.
Also, (make-sequential-music arg) generates an error, because
make-sequential-music needs a list as an argument.
(make-sequential-music (list arg))
will work fine.
So here's your code working properly:
toto =
#(define-music-function (parser location arg) (ly:music?)
(display (ly:music-property arg 'name))
(make-sequential-music (list arg)))
{ \toto a4 }
Segfaults are supposed to always be critical errors, but I think that in the
case of incorrect Scheme code, we shouldn't label it as a LilyPond error.
HTH,
Carl
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel