You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2006/05/12 16:45:59 UTC

DO NOT REPLY [Bug 39571] New: - NullPointerException in InlineStackingLayoutManager.java:295

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39571>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39571

           Summary: NullPointerException in
                    InlineStackingLayoutManager.java:295
           Product: Fop
           Version: 1.0dev
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: page-master/layout
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: max@berger.name


When trying to format the attached .fo file, I get the following exception:

java.lang.NullPointerException
        at org.apache.fop.layoutmgr.inline.InlineStackingLayoutManager.addALetterSpaceTo
(InlineStackingLayoutManager.java:295)
        at org.apache.fop.layoutmgr.InlineKnuthSequence.addALetterSpace(InlineKnuthSequence.java:140)
        at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements
(LineLayoutManager.java:679)
        at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements
(LineLayoutManager.java:582)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements
(BlockStackingLayoutManager.java:275)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements
(BlockLayoutManager.java:105)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements
(BlockStackingLayoutManager.java:275)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements
(BlockLayoutManager.java:105)
        at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements
(BlockStackingLayoutManager.java:275)
        at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements
(BlockLayoutManager.java:105)
        at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:
98)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextKnuthElements
(PageSequenceLayoutManager.java:240)
        at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:510)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextBlockList
(PageSequenceLayoutManager.java:232)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:259)
        at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:227)
        at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout
(PageSequenceLayoutManager.java:153)
        at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:381)
        at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:147)
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:358)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:193)
        at org.apache.xalan.transformer.TransformerIdentityImpl.endElement
(TransformerIdentityImpl.java:1101)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:
484)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:164)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:114)
        at org.apache.fop.cli.Main.startFOP(Main.java:159)
        at org.apache.fop.cli.Main.main(Main.java:190)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39571] - NullPointerException in InlineStackingLayoutManager.java:295

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39571>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39571





------- Additional Comments From spepping@apache.org  2006-05-17 20:05 -------
Created an attachment (id=18308)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18308&action=view)
A minimal fo file for the problem

The NPE is caused by FOP's efforts to add a letter space to a box for padding.
It is triggered by the combination of NBSPACE, padding and an immediately
following inline level fo element.

I am still studying the best way to prevent this bug. Checking whether the box
is an InlineBox, like you do in your patch, is a good option.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39571] - NullPointerException in InlineStackingLayoutManager.java:295

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39571>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39571


spepping@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From spepping@apache.org  2006-05-19 15:15 -------
Patch applied, with a few modifications, in revision 407819. Thanks.

This patch is certainly not a definitive solution, rather it is an emergeny
patch. The problem is part of the range of problems with inline handling,
signalled earlier this year by Manuel Mall.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39571] - NullPointerException in InlineStackingLayoutManager.java:295

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39571>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39571





------- Additional Comments From max@berger.name  2006-05-12 14:49 -------
Created an attachment (id=18265)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18265&action=view)
Patch file for the bug presented

I've written a small fix that fixes the symptoms. This is probably a very bad
idea, someone that actually knows why this error is occuring should fix this.

However, the attached patch "works for me"

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 39571] - NullPointerException in InlineStackingLayoutManager.java:295

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39571>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39571





------- Additional Comments From max@berger.name  2006-05-12 14:47 -------
Created an attachment (id=18264)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18264&action=view)
sample fo file

forgot to mention my fop version: svn checkout from today (5/12)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.