Footnotes broken?

View: New views
3 Messages — Rating Filter:   Alert me  

Footnotes broken?

by MatthiasR :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

with FOP-Trunk (Rev 822329) I'm getting a NPE when using footnotes.

That's the markup I have tried:

<fo:block line-height="120%" orphans="3" space-after="12pt"
space-before="3pt" widows="4">
        par test fußnote: <fo:footnote>
                <fo:inline baseline-shift="super" font-size="8pt">1</fo:inline>
                <fo:footnote-body>
                        <fo:block>1 oh yeah</fo:block>
                </fo:footnote-body>
        </fo:footnote> aslödkfj.
</fo:block>


Am I doing something wrong or is this feature broken?

Thanks & Regards,
Matthias Reischenbacher

Here is the stack trace:

java.lang.NullPointerException
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.handleFootnotes(PageBreakingAlgorithm.java:352)
        at
org.apache.fop.layoutmgr.PageBreakingAlgorithm.handleBox(PageBreakingAlgorithm.java:302)
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.handleElementAt(BreakingAlgorithm.java:655)
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:490)
        at
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:439)
        at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:368)
        at
org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElementsAbsolute(BlockContainerLayoutManager.java:817)
        at
org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(BlockContainerLayoutManager.java:198)
        at
org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:199)
        at
org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:140)
        at
org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:129)
        at
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:70)
        at
org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:216)
        at
org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:682)
        at
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:149)
        at
org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:132)
        at
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:336)
        at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
        at
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
        at
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
        at
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
        at
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
        at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
        at org.apache.xml.serializer.TreeWalker.endNode(TreeWalker.java:460)
        at org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:151)
        at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:390)


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4533 (20091022) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



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


Re: Footnotes broken?

by MatthiasR :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've did some further testing on this issue and I created a small test
case which reproduces the exception. The error has to do with an
absolute positioned block container.

Please find attached the fo file (footnote_in_absolute_block-container.fo).

Any hints how I could fix this error in the FOP-trunk code?

Regards,
Matthias Reischenbacher

Matthias Reischenbacher wrote:

> Hi,
>
> with FOP-Trunk (Rev 822329) I'm getting a NPE when using footnotes.
>
> That's the markup I have tried:
>
> <fo:block line-height="120%" orphans="3" space-after="12pt"
> space-before="3pt" widows="4">
>     par test fußnote: <fo:footnote>
>         <fo:inline baseline-shift="super" font-size="8pt">1</fo:inline>
>         <fo:footnote-body>
>             <fo:block>1 oh yeah</fo:block>
>         </fo:footnote-body>
>     </fo:footnote> aslödkfj.
> </fo:block>
>
>
> Am I doing something wrong or is this feature broken?
>
> Thanks & Regards,
> Matthias Reischenbacher
>
> Here is the stack trace:
>
> java.lang.NullPointerException
>     at
> org.apache.fop.layoutmgr.PageBreakingAlgorithm.handleFootnotes(PageBreakingAlgorithm.java:352)
>
>     at
> org.apache.fop.layoutmgr.PageBreakingAlgorithm.handleBox(PageBreakingAlgorithm.java:302)
>
>     at
> org.apache.fop.layoutmgr.BreakingAlgorithm.handleElementAt(BreakingAlgorithm.java:655)
>
>     at
> org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:490)
>
>     at
> org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:439)
>
>     at
> org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:368)
>     at
> org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElementsAbsolute(BlockContainerLayoutManager.java:817)
>
>     at
> org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(BlockContainerLayoutManager.java:198)
>
>     at
> org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:199)
>
>     at
> org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:140)
>
>     at
> org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:129)
>
>     at
> org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:70)
>
>     at
> org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:216)
>
>     at
> org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:682)
>
>     at
> org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:149)
>     at
> org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:132)
>     at
> org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:336)
>     at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
>     at
> org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
>
>     at
> org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
>
>     at
> org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
>     at
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
>
>     at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
>     at
> org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
>
>     at org.apache.xml.serializer.TreeWalker.endNode(TreeWalker.java:460)
>     at org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:151)
>     at
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:390)
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4533 (20091022) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@...
> For additional commands, e-mail: fop-users-help@...
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4533 (20091022) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4541 (20091025) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
        <fo:layout-master-set>
                <fo:simple-page-master master-name="normal" page-width="210mm" page-height="297mm">
                        <fo:region-body/>
                </fo:simple-page-master>
        </fo:layout-master-set>
        <fo:page-sequence master-reference="normal" white-space-collapse="true">
                <fo:flow flow-name="xsl-region-body">
                        <fo:block-container absolute-position="absolute" height="100mm" left="50mm" top="50mm" width="100mm">
                                <fo:block>
                                        This is a block with a footnote<fo:footnote>
                                                <fo:inline font-size="50%" vertical-align="top">1</fo:inline>
                                                <fo:footnote-body>
                                                        <fo:block>
                                                                <fo:inline font-size="50%" vertical-align="top">1</fo:inline>I'm a footnote!
                                                        </fo:block>
                                                </fo:footnote-body>
                                        </fo:footnote> in it.
                                </fo:block>
                        </fo:block-container>
                </fo:flow>
        </fo:page-sequence>
</fo:root>

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

Re: Footnotes broken?

by MatthiasR :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

after debugging the code I think have a possible solution for this error.

Please have a look at the patch I submitted:
https://issues.apache.org/bugzilla/show_bug.cgi?id=48053

Regards,
Matthias Reischenbacher

Matthias Reischenbacher wrote:

> Hi,
>
> I've did some further testing on this issue and I created a small test
> case which reproduces the exception. The error has to do with an
> absolute positioned block container.
>
> Please find attached the fo file (footnote_in_absolute_block-container.fo).
>
> Any hints how I could fix this error in the FOP-trunk code?
>
> Regards,
> Matthias Reischenbacher
>
> Matthias Reischenbacher wrote:
>> Hi,
>>
>> with FOP-Trunk (Rev 822329) I'm getting a NPE when using footnotes.
>>
>> That's the markup I have tried:
>>
>> <fo:block line-height="120%" orphans="3" space-after="12pt"
>> space-before="3pt" widows="4">
>>     par test fußnote: <fo:footnote>
>>         <fo:inline baseline-shift="super" font-size="8pt">1</fo:inline>
>>         <fo:footnote-body>
>>             <fo:block>1 oh yeah</fo:block>
>>         </fo:footnote-body>
>>     </fo:footnote> aslödkfj.
>> </fo:block>
>>
>>
>> Am I doing something wrong or is this feature broken?
>>
>> Thanks & Regards,
>> Matthias Reischenbacher
>>
>> Here is the stack trace:
>>
>> java.lang.NullPointerException
>>     at
>> org.apache.fop.layoutmgr.PageBreakingAlgorithm.handleFootnotes(PageBreakingAlgorithm.java:352)
>>
>>     at
>> org.apache.fop.layoutmgr.PageBreakingAlgorithm.handleBox(PageBreakingAlgorithm.java:302)
>>
>>     at
>> org.apache.fop.layoutmgr.BreakingAlgorithm.handleElementAt(BreakingAlgorithm.java:655)
>>
>>     at
>> org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:490)
>>
>>     at
>> org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:439)
>>
>>     at
>> org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:368)
>>
>>     at
>> org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElementsAbsolute(BlockContainerLayoutManager.java:817)
>>
>>     at
>> org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(BlockContainerLayoutManager.java:198)
>>
>>     at
>> org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:199)
>>
>>     at
>> org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:140)
>>
>>     at
>> org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:129)
>>
>>     at
>> org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:70)
>>
>>     at
>> org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:216)
>>
>>     at
>> org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:682)
>>
>>     at
>> org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:149)
>>
>>     at
>> org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:132)
>>
>>     at
>> org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:336)
>>
>>     at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:85)
>>     at
>> org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107)
>>
>>     at
>> org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238)
>>
>>     at
>> org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
>>
>>     at
>> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:349)
>>
>>     at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
>>     at
>> org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
>>
>>     at org.apache.xml.serializer.TreeWalker.endNode(TreeWalker.java:460)
>>     at org.apache.xml.serializer.TreeWalker.traverse(TreeWalker.java:151)
>>     at
>> org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:390)
>>
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 4533 (20091022) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@...
>> For additional commands, e-mail: fop-users-help@...
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 4533 (20091022) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4541 (20091025) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4541 (20091025) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@...
> For additional commands, e-mail: fop-users-help@...
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4541 (20091025) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4541 (20091025) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



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