You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "ron.vandenbranden@kantl.be" <ro...@kantl.be> on 2012/06/04 15:58:05 UTC

footnotes(?) cause Fop to hang

Hi,

I have an annoying problem, in that I can't pinpoint it exactly. I'm 
using Fop-1.0 to generate PDF files in a web app. The XSL-FO source file 
is derived from a master XML file via XSLT, according to selected user 
parameters. Depending on the complexity of the visualization options 
(which mostly affect the number of footnotes to be generated), the 
rendering process seems to halt at certain points.

The problem seems to be related to the number and/or length of 
footnotes, which causes the PDF rendering to hang at a certain point. 
Unfortunately, I haven't been able to trace the cause of this problem in 
the FO tree. In order to get some more information, I tried to process 
such a problematic XSL-FO file with the CLI version of Fop-trunk (rev. 
1345838), which also hangs, but provides more output. The sole output I 
get from running CLI Fop-trunk, is:

   4-jun-2012 15:00:58 org.apache.fop.fo.properties.PropertyCache fetch
   INFO: 10 hashCode() collisions for org.apache.fop.fo.properties.CondLengthProperty
   4-jun-2012 15:00:58 org.apache.fop.fo.properties.PropertyCache fetch
   INFO: 10 hashCode() collisions for org.apache.fop.fo.properties.CommonBorderPaddingBackground
   4-jun-2012 15:00:58 org.apache.fop.fo.properties.PropertyCache fetch
   INFO: 20 hashCode() collisions for org.apache.fop.fo.properties.CondLengthProperty
   4-jun-2012 15:00:58 org.apache.fop.fo.properties.PropertyCache fetch
   INFO: 20 hashCode() collisions for org.apache.fop.fo.properties.CommonBorderPaddingBackground
   [... many repetitions of above messages ...]
   4-jun-2012 15:01:01 org.apache.fop.events.LoggingEventListener processEvent
   INFO: Rendered page #144.

...after which the rendering hangs without finishing.

I'll try to attach the (anonymized) XSL-FO source as well as the STDOUT 
output messages it produces.

Since this makes PDF generation highly unstable for my web app, *any* 
help / pointers for further debugging are much appreciated! If it can be 
of any help: Fop-0.20.5 doesn't have this problem (though downgrading to 
that version is no option for me).

Kind regards,

Ron

Re: footnotes(?) cause Fop to hang

Posted by "ron.vandenbranden" <ro...@kantl.be>.
Hi Glenn,


Glenn Adams-2 wrote:
> 
> Have you tested this with a recent (post FOP-1.0) build [1]?
> 
> [1] fop-20120601-bin.zip
> <http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20120601-bin.zip>
> 

Thanks for the suggestion. Yes, I did test with FOP-trunk (rev. 1345838):
same result. To make sure, I've just tested with the snapshot you suggested,
also with the same result.

In the meantime I've managed to isolate the problem in a simpler test case
(attached:  http://old.nabble.com/file/p33962613/fop_hangs.fo fop_hangs.fo
). The problem seems to lie when a block stretches a page due to the amount
of footnotes it contains. This is illustrated in the test case: it fails as
long as the span of text containing the last footnote isn't commented out. 

I'll check if this is connected with bugs 
https://issues.apache.org/bugzilla/show_bug.cgi?id=45159 45159  and 
https://issues.apache.org/bugzilla/show_bug.cgi?id=47424 47424 , and if the
patch at  https://issues.apache.org/bugzilla/show_bug.cgi?id=48397 48397 
can help me out.

This is really a showstopper. Does anyone know a possible workaround on
XSL-FO level (I've tried all kinds of alternatives without success) that
could at least make the PDF rendering finish?

Kind regards,

Ron
-- 
View this message in context: http://old.nabble.com/footnotes%28-%29-cause-Fop-to-hang-tp33958692p33962613.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: footnotes(?) cause Fop to hang

Posted by Glenn Adams <gl...@skynav.com>.
Have you tested this with a recent (post FOP-1.0) build [1]?

[1] fop-20120601-bin.zip
<http://ci.apache.org/projects/xmlgraphics/fop/snapshots/fop-20120601-bin.zip>

On Mon, Jun 4, 2012 at 7:58 AM, ron.vandenbranden@kantl.be <
ron.vandenbranden@kantl.be> wrote:

> Hi,
>
> I have an annoying problem, in that I can't pinpoint it exactly. I'm using
> Fop-1.0 to generate PDF files in a web app. The XSL-FO source file is
> derived from a master XML file via XSLT, according to selected user
> parameters. Depending on the complexity of the visualization options (which
> mostly affect the number of footnotes to be generated), the rendering
> process seems to halt at certain points.
>
> The problem seems to be related to the number and/or length of footnotes,
> which causes the PDF rendering to hang at a certain point. Unfortunately, I
> haven't been able to trace the cause of this problem in the FO tree. In
> order to get some more information, I tried to process such a problematic
> XSL-FO file with the CLI version of Fop-trunk (rev. 1345838), which also
> hangs, but provides more output. The sole output I get from running CLI
> Fop-trunk, is:
>
>  4-jun-2012 15:00:58 org.apache.fop.fo.properties.**PropertyCache fetch
>  INFO: 10 hashCode() collisions for org.apache.fop.fo.properties.**
> CondLengthProperty
>  4-jun-2012 15:00:58 org.apache.fop.fo.properties.**PropertyCache fetch
>  INFO: 10 hashCode() collisions for org.apache.fop.fo.properties.**
> CommonBorderPaddingBackground
>  4-jun-2012 15:00:58 org.apache.fop.fo.properties.**PropertyCache fetch
>  INFO: 20 hashCode() collisions for org.apache.fop.fo.properties.**
> CondLengthProperty
>  4-jun-2012 15:00:58 org.apache.fop.fo.properties.**PropertyCache fetch
>  INFO: 20 hashCode() collisions for org.apache.fop.fo.properties.**
> CommonBorderPaddingBackground
>  [... many repetitions of above messages ...]
>  4-jun-2012 15:01:01 org.apache.fop.events.**LoggingEventListener
> processEvent
>  INFO: Rendered page #144.
>
> ...after which the rendering hangs without finishing.
>
> I'll try to attach the (anonymized) XSL-FO source as well as the STDOUT
> output messages it produces.
>
> Since this makes PDF generation highly unstable for my web app, *any* help
> / pointers for further debugging are much appreciated! If it can be of any
> help: Fop-0.20.5 doesn't have this problem (though downgrading to that
> version is no option for me).
>
> Kind regards,
>
> Ron
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>

Re: footnotes(?) cause Fop to hang

Posted by Alexios Giotis <al...@gmail.com>.
Hi Ron,

This output means that org.apache.fop.fo.properties.PropertyCache can not work effectively and some extra memory is used because too many, not-equal but with the same hash code, instances of CondLengthProperty & CommonBorderPaddingBackground are cached. This indicates an incomplete implementation of the hashCode() / equals() methods of CondLengthProperty & CommonBorderPaddingBackground or of any of it's member variables. 

This should not hang FOP but I suggest to file a bugzilla ticket with an XSL:FO attachment that reproduces this problem. You could also provide a patch for this. If nobody else provides a patch in the next few days, I will most probably have a look.


Alexios Giotis



On Jun 4, 2012, at 4:58 PM, ron.vandenbranden@kantl.be wrote:

> The sole output I get from running CLI Fop-trunk, is:
> 
>  4-jun-2012 15:00:58 org.apache.fop.fo.properties.PropertyCache fetch
>  INFO: 10 hashCode() collisions for org.apache.fop.fo.properties.CondLengthProperty
>  4-jun-2012 15:00:58 org.apache.fop.fo.properties.PropertyCache fetch
>  INFO: 10 hashCode() collisions for org.apache.fop.fo.properties.CommonBorderPaddingBackground
>  4-jun-2012 15:00:58 org.apache.fop.fo.properties.PropertyCache fetch
>  INFO: 20 hashCode() collisions for org.apache.fop.fo.properties.CondLengthProperty
>  4-jun-2012 15:00:58 org.apache.fop.fo.properties.PropertyCache fetch
>  INFO: 20 hashCode() collisions for org.apache.fop.fo.properties.CommonBorderPaddingBackground
>  [... many repetitions of above messages ...]
>  4-jun-2012 15:01:01 org.apache.fop.events.LoggingEventListener processEvent
>  INFO: Rendered page #144.
> 
> ...after which the rendering hangs without finishing.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org