[xmlroff] Debugging xmlroff
Tony Graham
Tony.Graham at MenteithConsulting.com
Sun Feb 24 21:09:01 UTC 2008
(Originally answered on IRC. Answering here so it's archived.)
On Wed, Feb 20 2008 22:07:58 +0000, seefeld at sympatico.ca wrote:
> Processing a fo file generated by xsl-docbook I get errors of the form
>
> (xmlroff:4384): libfo-CRITICAL **:
> fo_area_area_split_before_height_check: assertion `max_height > 0'
> failed
It looks like there's a block or sequence of blocks that xmlroff doesn't
know where to break. Obviously it shouldn't just die at that point,
though the error message isn't being all that helpful either.
> The document in question is rather big, so I'm hesitant to send that
> in as a test case. Is this a known limitation / error, or should I try
> to generate a minimal test case for this ?
>
> Is there a way to turn those libfo-CRITICAL messages into actual
> aborts so I can hook this into a debugger ?
See http://library.gnome.org/devel/glib/stable/glib-running.html
If you set G_DEBUG=fatal-critical, xmlroff should abort (though I've
never tried it).
I usually run xmlroff in GDB and break on g_log(), since that's what
actually writes the message. (I then disable the breakpoint if I'm
using fo_object_debug_dump(), etc., to look at FOs and properties.) See
the 'debugging' page in the xmlroff manual.
Regards,
Tony.
More information about the xmlroff-list
mailing list