Thanks for the test case.
The test seems to work fine on 0.95. And on FOP Trunk I don't see a
deadlock but an infinite loop in PageBreakingAlgorithm (related to
footnote handling).
I don't have time right now to dive deeper into this but the following
patch at least breaks the infinite loop. But I haven't tested the
semantics to see if I broke anything. So you may want to use FOP 0.95
for the moment. We need to take a closer look at this problem.
Index: PageBreakingAlgorithm.java
===================================================================
--- PageBreakingAlgorithm.java (revision 721769)
+++ PageBreakingAlgorithm.java (working copy)
@@ -26,6 +26,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.apache.fop.fo.Constants;
import org.apache.fop.fo.FObj;
import org.apache.fop.layoutmgr.AbstractBreaker.PageBreakPosition;
@@ -531,7 +532,7 @@
int prevIndex = -1;
int index = -1;
- while (!(somethingAdded && splitLength > availableLength)) {
+ while (!(somethingAdded && splitLength > availableLength) &&
noteListIterator.hasNext()) {
if (!somethingAdded) {
somethingAdded = true;
} else {
On 03.12.2008 09:23:14 Dongsheng Song wrote:
> Here is the related files:
>
> FO file:
> http://code.google.com/p/i18n-zh/downloads/list
> http://i18n-zh.googlecode.com/files/lenny-release-notes-r1053.i386.fo.gz
>
> userconfig.xml:
> http://i18n-zh.googlecode.com/svn/trunk/lib/fop/1.x/conf/
> http://i18n-zh.googlecode.com/svn/trunk/lib/fop/1.x/conf/userconfig.xml.tmpl
>
> Font file:
> http://i18n-zh.googlecode.com/svn/trunk/lib/fonts/
> http://i18n-zh.googlecode.com/svn/trunk/lib/fonts/fzcys.ttf
> http://i18n-zh.googlecode.com/svn/trunk/lib/fonts/fzbys.ttf
> http://i18n-zh.googlecode.com/svn/trunk/lib/fonts/fzfs.ttf
>
> Thanks.
>
> 2008/12/3 Jeremias Maerki <[EMAIL PROTECTED]>:
> > Please provide an FO file that allows us to reproduce the problem.
> >
> > On 03.12.2008 05:08:52 Dongsheng Song wrote:
> >> fop trunk 2008-12-03(r722618) has the same error.
> >>
> >> 2008/12/3 Dongsheng Song <[EMAIL PROTECTED]>:
> >> > When I use fop trunk 2008-11-22(r719654), use DynaFont(chinese font)
> >> > runing smoothly, but FounderFont(chinese font) keeping 100% cpu usage
> >> > at PageBreakingAlgorithm.getFootnoteSplit:
> >> >
> >> > % ant
> >> > Buildfile: build.xml
> >> >
> >> > i386:
> >> >
> >> > init:
> >> > [echo] java.version: 1.5.0_16
> >> >
> >> > pdf.init:
> >> >
> >> > pdf:
> >> > [echo] Making fo ...
> >> > [java] Making portrait pages on A4 paper (210mmx297mm)
> >> > [java] Read /usr/share/doc/docbook-xsl/README.Debian.gz section 5(a).
> >> > [echo] Making pdf ...
> >> > [java] Dec 3, 2008 11:28:24 AM
> >> > org.apache.fop.events.LoggingEventListener processEvent
> >> > [java] WARNING: Font "Symbol,normal,700" not found. Substituting
> >> > with "Symbol,normal,400".
> >> > [java] Dec 3, 2008 11:28:24 AM
> >> > org.apache.fop.events.LoggingEventListener processEvent
> >> > [java] WARNING: Font "ZapfDingbats,normal,700" not found.
> >> > Substituting with "ZapfDingbats,normal,400".
> >> > [java] Dec 3, 2008 11:28:25 AM
> >> > org.apache.fop.events.LoggingEventListener processEvent
> >> > [java] WARNING: Glyph "ñ" (0xf1, ntilde) not available in font
> >> > "FZCuYaSong".
> >> > [java] Dec 3, 2008 11:28:27 AM
> >> > org.apache.fop.events.LoggingEventListener processEvent
> >> > [java] WARNING: Line 1 of a paragraph overflows the available
> >> > area by more than 50 points. (See position 1045:162)
> >> > [java] Dec 3, 2008 11:28:27 AM
> >> > org.apache.fop.events.LoggingEventListener processEvent
> >> > [java] WARNING: Line 1 of a paragraph overflows the available
> >> > area by 10405 millipoints. (See position 1074:162)
> >> > [java] Full thread dump Java HotSpot(TM) 64-Bit Server VM
> >> > (1.5.0_16-b02 mixed mode):
> >> > [java]
> >> > [java] "Low Memory Detector" daemon prio=1 tid=0x00007fe9181274c0
> >> > nid=0x19cd runnable [0x0000000000000000..0x0000000000000000]
> >> > [java]
> >> > [java] "CompilerThread1" daemon prio=1 tid=0x00007fe918125a60
> >> > nid=0x19cc waiting on condition
> >> > [0x0000000000000000..0x00000000429f2540]
> >> > [java]
> >> > [java] "CompilerThread0" daemon prio=1 tid=0x00007fe9181246c0
> >> > nid=0x19cb waiting on condition
> >> > [0x0000000000000000..0x00000000428f1380]
> >> > [java]
> >> > [java] "AdapterThread" daemon prio=1 tid=0x00007fe9181232b0
> >> > nid=0x19ca waiting on condition
> >> > [0x0000000000000000..0x0000000000000000]
> >> > [java]
> >> > [java] "Signal Dispatcher" daemon prio=1 tid=0x00007fe918122030
> >> > nid=0x19c9 waiting on condition
> >> > [0x0000000000000000..0x0000000000000000]
> >> > [java]
> >> > [java] "Finalizer" daemon prio=1 tid=0x00007fe918110aa0
> >> > nid=0x19c8 in Object.wait() [0x0000000041ca4000..0x0000000041ca4e20]
> >> > [java] at java.lang.Object.wait(Native Method)
> >> > [java] - waiting on <0x00007fe921d18150> (a
> >> > java.lang.ref.ReferenceQueue$Lock)
> >> > [java] at
> >> > java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:120)
> >> > [java] - locked <0x00007fe921d18150> (a
> >> > java.lang.ref.ReferenceQueue$Lock)
> >> > [java] at
> >> > java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:136)
> >> > [java] at
> >> > java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
> >> > [java]
> >> > [java] "Reference Handler" daemon prio=1 tid=0x00007fe9181101d0
> >> > nid=0x19c7 in Object.wait() [0x0000000041ba3000..0x0000000041ba3ca0]
> >> > [java] at java.lang.Object.wait(Native Method)
> >> > [java] - waiting on <0x00007fe921d25168> (a
> >> > java.lang.ref.Reference$Lock)
> >> > [java] at java.lang.Object.wait(Object.java:474)
> >> > [java] at
> >> > java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
> >> > [java] - locked <0x00007fe921d25168> (a
> >> > java.lang.ref.Reference$Lock)
> >> > [java]
> >> > [java] "main" prio=1 tid=0x00000000417a72a0 nid=0x19ba runnable
> >> > [0x00007fff71c69000..0x00007fff71c6b120]
> >> > [java] at
> >> > org.apache.fop.layoutmgr.PageBreakingAlgorithm.getFootnoteSplit(PageBreakingAlgorithm.java:571)
> >> > [java] at
> >> > org.apache.fop.layoutmgr.PageBreakingAlgorithm.getFootnoteSplit(PageBreakingAlgorithm.java:463)
> >> > [java] at
> >> > org.apache.fop.layoutmgr.PageBreakingAlgorithm.computeDifference(PageBreakingAlgorithm.java:336)
> >> > [java] at
> >> > org.apache.fop.layoutmgr.BreakingAlgorithm.considerLegalBreak(BreakingAlgorithm.java:696)
> >> > [java] at
> >> > org.apache.fop.layoutmgr.PageBreakingAlgorithm.considerLegalBreak(PageBreakingAlgorithm.java:308)
> >> > [java] at
> >> > org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:485)
> >> > [java] at
> >> > org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:404)
> >> > [java] at
> >> > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:340)
> >> > [java] at
> >> > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:265)
> >> > [java] at
> >> > org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106)
> >> > [java] at
> >> > org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234)
> >> > [java] at
> >> > org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120)
> >> > [java] at
> >> > org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:346)
> >> > [java] at
> >> > org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177)
> >> > [java] at
> >> > com.icl.saxon.aelfred.SAXDriver.endElement(SAXDriver.java:792)
> >> > [java] at
> >> > com.icl.saxon.aelfred.XmlParser.parseETag(XmlParser.java:1133)
> >> > [java] at
> >> > com.icl.saxon.aelfred.XmlParser.parseContent(XmlParser.java:1217)
> >> > [java] at
> >> > com.icl.saxon.aelfred.XmlParser.parseElement(XmlParser.java:1037)
> >> > [java] at
> >> > com.icl.saxon.aelfred.XmlParser.parseContent(XmlParser.java:1222)
> >> > [java] at
> >> > com.icl.saxon.aelfred.XmlParser.parseElement(XmlParser.java:1037)
> >> > [java] at
> >> > com.icl.saxon.aelfred.XmlParser.parseDocument(XmlParser.java:510)
> >> > [java] at
> >> > com.icl.saxon.aelfred.XmlParser.doParse(XmlParser.java:163)
> >> > [java] at
> >> > com.icl.saxon.aelfred.SAXDriver.parse(SAXDriver.java:320)
> >> > [java] - locked <0x00007fe921bffab0> (a
> >> > com.icl.saxon.aelfred.DefaultHandler)
> >> > [java] at
> >> > com.icl.saxon.IdentityTransformer.transform(IdentityTransformer.java:59)
> >> > [java] at
> >> > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:233)
> >> > [java] at
> >> > org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
> >> > [java] at org.apache.fop.cli.Main.startFOP(Main.java:174)
> >> > [java] at org.apache.fop.cli.Main.main(Main.java:205)
> >> > [java]
> >> > [java] "VM Thread" prio=1 tid=0x00007fe91810bf10 nid=0x19c6 runnable
> >> > [java]
> >> > [java] "GC task thread#0 (ParallelGC)" prio=1
> >> > tid=0x00000000417c5990 nid=0x19be runnable
> >> > [java]
> >> > [java] "GC task thread#1 (ParallelGC)" prio=1
> >> > tid=0x00000000417c6810 nid=0x19bf runnable
> >> > [java]
> >> > [java] "GC task thread#2 (ParallelGC)" prio=1
> >> > tid=0x00000000417c7690 nid=0x19c0 runnable
> >> > [java]
> >> > [java] "GC task thread#3 (ParallelGC)" prio=1
> >> > tid=0x00000000417c8510 nid=0x19c1 runnable
> >> > [java]
> >> > [java] "GC task thread#4 (ParallelGC)" prio=1
> >> > tid=0x00000000417c9390 nid=0x19c2 runnable
> >> > [java]
> >> > [java] "GC task thread#5 (ParallelGC)" prio=1
> >> > tid=0x00000000417ca210 nid=0x19c3 runnable
> >> > [java]
> >> > [java] "GC task thread#6 (ParallelGC)" prio=1
> >> > tid=0x00000000417cb090 nid=0x19c4 runnable
> >> > [java]
> >> > [java] "GC task thread#7 (ParallelGC)" prio=1
> >> > tid=0x00000000417cbf10 nid=0x19c5 runnable
> >> > [java]
> >> > [java] "VM Periodic Task Thread" prio=1 tid=0x00007fe918129ea0
> >> > nid=0x19ce waiting on condition
> >> > [java]
> >> >
> >
> >
> >
> >
> > Jeremias Maerki
> >
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]