segfault with wrong argument for dash-definition

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

segfault with wrong argument for dash-definition

Thomas Morley-2
Hi,

the following segfaults with any tested lily-version.
{ \override Slur #'dash-definition = #'(0 1.0 0.5 0.5) c( c) }
No other error-message than:
segmentation fault (core dumped)

Wheras
{ \override Slur #'dash-definition = #"foo" c( c) }
returns a meaningful message, a warning not even an error:
warning: type check for `dash-definition' failed; value `"foo"' must
be of type `pair'

Obviously '(0 1.0 0.5 0.5) full-fills the pair?-typechecking for this property.

Not sure how to improve this.

One could define something at the lines of
(define (list-list? x)
  (and (list? x)
       (every list? x)))
for the type-checking of dash-definition.

Or can a better warning/error be emitted during processing?

Thoughts?


Cheers,
  Harm

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: segfault with wrong argument for dash-definition

Thomas Morley-2
2017-08-01 14:07 GMT+02:00 Carl Sorensen <[hidden email]>:

> On 8/1/17 4:36 AM, "lilypond-devel on behalf of Thomas Morley"
> <lilypond-devel-bounces+c_sorensen=[hidden email] on behalf of
> [hidden email]> wrote:
>
>>Hi,
>>
>>the following segfaults with any tested lily-version.
>>{ \override Slur #'dash-definition = #'(0 1.0 0.5 0.5) c( c) }
>>No other error-message than:
>>segmentation fault (core dumped)
>>
>>Wheras
>>{ \override Slur #'dash-definition = #"foo" c( c) }
>>returns a meaningful message, a warning not even an error:
>>warning: type check for `dash-definition' failed; value `"foo"' must
>>be of type `pair'
>>
>>Obviously '(0 1.0 0.5 0.5) full-fills the pair?-typechecking for this
>>property.
>>
>>Not sure how to improve this.
>>
>>One could define something at the lines of
>>(define (list-list? x)
>>  (and (list? x)
>>       (every list? x)))
>>for the type-checking of dash-definition.
>
> I would think that this would be a good solution for dash-definition.
> It's a fairly expensive check, but we wouldn't expect to have lots of
> dash-definitions in a score.
>
> Maybe a better name would be list-of-lists?  I think it would be nice to
> see the error message
>
> warning: type check for `dash-definition' failed; value `"foo"' must
> be of type `list-of-lists'
>
> instead of
>
>
> warning: type check for `dash-definition' failed; value `"foo"' must
> be of type `list-list'
>
>
>
>
> Thanks,
>
> Carl
>

Patch is up.
https://sourceforge.net/p/testlilyissues/issues/5170/

Thanks,
  Harm

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Loading...