I've got two FO xml files that are identical except that one has two inline images. Running ExampleFO2PDF.java breaks on the line: // Start XSLT transformation and FOP processing transformer.transform(src, res); with a java.lang.OutOfMemoryError. This is happening in Eclipse Version: 3.1.0 with the memory cranked way up (-vmargs -Xms1024m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=128m), these are small files (the "good" one is 166 KB --> http://hornet.titansolutions.com/fotestgood.xml, the "bad" one is 280 KB --> http://hornet.titansolutions.com/fotestbad.xml), so I don't believe it is the xml files themselves that are causing the OOM exception. The full stack trace: Exception in thread "main" java.lang.OutOfMemoryError at java.io.WinNTFileSystem.getBooleanAttributes(Native Method) at java.io.File.exists(File.java:702) at org.apache.fop.apps.FOURIResolver.resolve(FOURIResolver.java:67) at org.apache.fop.apps.FOUserAgent.resolveURI(FOUserAgent.java:549) at org.apache.fop.image.ImageFactory.loadImage(ImageFactory.java:204) at org.apache.fop.image.ImageLoader.loadImage(ImageLoader.java:54) at org.apache.fop.image.ContextImageCache.getImage(ImageFactory.java:441) at org.apache.fop.image.ImageFactory.getImage(ImageFactory.java:171) at org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:64) at org.apache.fop.fo.FObj.processNode(FObj.java:120) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:290) at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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 ms.ExampleFO2PDF.convertFO2PDF(ExampleFO2PDF.java:84) at ms.ExampleFO2PDF.main(ExampleFO2PDF.java:138) Regards, Jason Brice
The server seems to be down. I can't download the demo files.
Created attachment 18094 [details] xml contains inline images causes out of memory error
Created attachment 18095 [details] xml no inline images works fine
The bug should be fixed now in FOP Trunk: http://svn.apache.org/viewcvs?rev=396251&view=rev While running your examples I got a ClassCastException rather than an OutOfMemoryError because of a problem with markers in fo:static-content. Seems to be a problem with white space before and after the blocks in the marker. I'll take a closer look at that but I wonder why you didn't run into this. Or did you?
(In reply to comment #4) No, I never got a class cast exception... just the out of memory error. I did suspect that the OOM was a bogus error though because of how quickly it happened. When stepping over the line in question, it only took a split second to get the error, and yet my system showed no noticable spike in memory usage. I'll try the patch and follow up. Thx.
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed