Hi,
It seems the source of the NPE is a debug line:
        AbstractBreaker.log.debug("restart: optimalPageCount= " + 
optimalPageCount                + " pageBreaks.size()= " + 
algRestart.getPageBreaks().size());
The algRestart.getPageBreaks() is null here causing the issue. When I comment 
out the line it seems to render the document without further issue. However, 
the output was not what I imagine you were expecting. I've attached two PDF's 
with and without the span using the float. 
I am not sure if having multiple columns with a float is a corner case in which 
unexpected results occur but as can be seen in the output without the span (and 
obscured with the span), everything is placed in the first column.
Luis would be better at answering this than me if he hasn't moved to greener 
pastures ;-) I'll take another look in a day or two if I get a chance.
Regards,
Robert Meyer
Date: Thu, 19 Mar 2015 17:01:09 +0100
From: andreas.argira...@maindialog.se
To: fop-users@xmlgraphics.apache.org
Subject: bug: fop crashes when using float and span="all"

Hi.
 
Using fop nightly 20150319 on Windows 7.
 
Attached are three .fo files showing that a combination of using 
fo:float and fo:block span="all" will sometimes crash fop.
 
The file two-columns-with-float-and-two-blocks-and-span.fo will crash 
fop with the following stack trace:
 
SEVERE: Exception
org.apache.fop.apps.FOPException
java.lang.NullPointerException
         at 
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:288)
         at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
         at org.apache.fop.cli.Main.startFOP(Main.java:186)
         at org.apache.fop.cli.Main.main(Main.java:217)
Caused by: java.lang.NullPointerException
         at 
org.apache.fop.layoutmgr.PageBreaker.redoLayout(PageBreaker.java:420)
         at 
org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:329)
         at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:427)
         at 
org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:112)
         at
<snip>
 
If one block is removed as in the file 
two-columns-with-float-and-one-block-and-span.fo a pdf can be produced, 
however one block will not show up and the two-column block will be cut.
 
If the fo:float is removed as in two-columns-with-span.fo the resulting 
outcome is as expected.
 
Attached are minimal .fo files and pdfs.
 
Best regards,
Andreas Argirakis
 
Andreas Argirakis
Tel +46 31 15 04 90
Mob +46 733 41 44 26
Fax +46 31 15 04 09
andreas.argira...@maindialog.se
 
Main Dialog AB
Västra Hamngatan 12
SE-411 17 Göteborg
www.maindialog.s

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

Attachment: output-without-span.pdf
Description: Adobe PDF document

Attachment: output-with-span.pdf
Description: Adobe PDF document

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

Reply via email to