On 2012-11-16 23:57, d...@gnu.org wrote:
I have not actually tried to understand the code. I just added checks
for existing array elements before access until I could no longer make
LilyPond segfault or produce programming errors.
So this is, indeed, strictly a patch on the "won't make things worse"
basis, except for the one, initial removal of a zero-duration check,
necessary for sane behavior in things like incipits without notes.
But that check was added for exactly that reason: To warn the user that
no output was produced (apparently, no regtest was added back then).
With this patch, even for an empty music, lilypond tries to do the
pagebreaking (and reports 0 pages):
-) With this patch applied
reinhold@zweistein:~$ lilypond empty.ly
GNU LilyPond 2.17.7
»empty.ly« wird verarbeitet
Analysieren...
Interpretation der Musik...
Warnung: keine Musik in der Partitur gefunden
Vorverarbeitung der grafischen Elemente...
Ideale Seitenanzahl wird gefunden...
Musik wird auf 0 Seiten angepasst...
Systeme erstellen...
Kompilation erfolgreich beendet
-) Without that patch:
reinhold@zweistein:~$ lilypond empty.ly
GNU LilyPond 2.17.7
»empty.ly« wird verarbeitet
Analysieren...
Warnung: keine Musik in der Partitur gefunden
Kompilation erfolgreich beendet
So there is a difference (to me, pagebreaking does not make much sense
if we already know there will be not output). But that doesn't mean that
I'll veto that patch.
The downside are problems with material that indeed produces no
output. The basic change is simple and just in
lily/global-context-scheme.cc. All the rest is attempting to remove
programming errors and warnings occuring for basically empty systems.
The current state is that
\new Staff { }
will segfault,
Really? With lilypond 2.17.7 it didn't crash here...
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, reinh...@kainhofer.com, http://www.kainhofer.com
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel