Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(36)

Issue 63890043: Report an error instead of crashing when iteration encounters non-music.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 2 months ago by Devon Schudy
Modified:
10 years, 2 months ago
Reviewers:
dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Report an error instead of crashing when iteration encounters non-music. The parser checks that it got music where expected, but Scheme functions like make-music don't, so it's easy to create invalid music. Previously this often crashed Lilypond. There are some existing checks that silently ignore non-music instead of reporting an error. Probably most of these should be changed.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -37 lines) Patch
M lily/event-chord-iterator.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M lily/include/music.hh View 1 chunk +1 line, -0 lines 0 comments Download
M lily/lyric-combine-music.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M lily/lyric-combine-music-iterator.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/music.cc View 3 chunks +15 lines, -2 lines 0 comments Download
M lily/music-iterator.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M lily/music-sequence.cc View 12 chunks +12 lines, -12 lines 0 comments Download
M lily/music-wrapper.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M lily/part-combine-iterator.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M lily/property-iterator.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M lily/relative-octave-check.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/repeated-music.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M lily/sequential-iterator.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M lily/simultaneous-music-iterator.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/tuplet-iterator.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2
dak
Shouldn't most of those get caught earlier by making use of the types defined in ...
10 years, 2 months ago (2014-02-14 10:54:12 UTC) #1
Devon Schudy
10 years, 2 months ago (2014-02-16 02:56:14 UTC) #2
dak wrote:
> Shouldn't most of those get caught earlier by making use of the types
> defined in scm/define-music-properties.scm ?
>
> If we are missing proper typechecks in make-music et al, maybe we should
> fix that there?

They're already caught in make-music by -dcheck-internal-types, but
that's disabled by default (presumably for performance, although it
only slows make check by less than 1%).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b