lilypond-devel
[Top][All Lists]
Advanced

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

Re: can error messages output the measure number being processed?


From: David Kastrup
Subject: Re: can error messages output the measure number being processed?
Date: Mon, 25 Feb 2013 00:00:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Kieren MacMillan <address@hidden> writes:

> Hello all,
>
> I'm working on a medium-sized score (chamber opera). I'm currently
> getting the following output:
>
> Drawing
> systems.../Applications/Lilypond/LilyPond.app/Contents/Resources/share/lilypond/current/scm/bar-line.scm:926:28:
> In procedure ly:grob-array-length in expression (ly:grob-array-length
> bar-array):
> /Applications/Lilypond/LilyPond.app/Contents/Resources/share/lilypond/current/scm/bar-line.scm:926:28:
> Wrong type argument in position 1 (expecting Grob_array): ()
>
> 1. I know the problem is in my own code (not bar-line.scm).
> 2. I even know with near certainty which of the 10 movements is
> causing the problem.
> 3. But it will still take a great deal of time to hunt down this
> problem in my code.
> 4. Lily-code debug time would be significantly decreased if errors
> outputted the measure number(s) being processed at the time the error
> occurred.
>
> Is anything like this possible?

I doubt it: this is a Scheme error and "bar number information" is just
not available at the time the problem occurs.  Trapping the Scheme error
is possible, but I can't right away figure out a good way to have the
measure number available there.

> If so, how difficult is it to add this kind of logging to the codebase?

What you can do, of course, is adding an engraver at score level that
just outputs the current moment to stderr at every time step.  Then you
can just check after which moment your error message occurs in the
output.

This will be rather verbose, but picking out the error message among the
trace output should be reasonably straightforward.

-- 
David Kastrup




reply via email to

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