Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1579

StackOverflow problem when using FOP in multi threaded environment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 0.95
    • None
    • fo/unqualified
    • None
    • Operating System: Linux
      Platform: PC
    • 45862

    Description

      while executing a simple pdf generation from a servlet context, there is a problem of Stack oveflow, but if i do call the same transformation commands (the same as FOP site examples, but using saxon fo having xslt2 features) a standalone application it doesn't crash:

      Starting Helma in directory /home/kraken/REPOSITORY
      Starting HTTP server on port 8090
      Starting AJP13 listener on port 8009
      Adding to classpath: /home/kraken/REPOSITORY/lib/ext/saxon9sa.jar
      Adding to classpath: /home/kraken/REPOSITORY/lib/ext/xmlgraphics-commons.jar
      Adding to classpath: /home/kraken/REPOSITORY/lib/ext/fop.jar
      Adding to classpath: /home/kraken/REPOSITORY/lib/ext/avalon-framework.jar
      Starting Helma 1.6.2 (September 23 2008) on Java 1.5.0_13
      [2008/09/23 11:12:28] [INFO] Starting Helma 1.6.2 (September 23 2008) on Java 1.5.0_13
      [2008/09/23 11:12:28] [INFO] Setting Helma Home to /home/kororaa/REPOSITORY
      [2008/09/23 11:12:28] [INFO] Starting AJP13-Listener on port 0.0.0.0:8009
      [2008/09/23 11:12:28] [INFO] Version Jetty/5.1.14
      ...
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.pdf.PDFRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.ps.PSRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.txt.TXTRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.bitmap.PNGRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.bitmap.TIFFRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.xml.XMLRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.awt.AWTRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.print.PrintRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.afp.AFPRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for Renderer: org.apache.fop.render.pcl.PCLRendererMaker
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding maker for FOEventHandler: org.apache.fop.render.rtf.RTFFOEventHandlerMaker
      [2008/09/23 12:03:11] [DEBUG] target-resolution set to: 72.0dpi (px2mm=0.35277778)
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding PDFImageHandler: org.apache.fop.render.pdf.PDFImageHandlerRawJPEG
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding PDFImageHandler: org.apache.fop.render.pdf.PDFImageHandlerRawCCITTFax
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding PDFImageHandler: org.apache.fop.render.pdf.PDFImageHandlerGraphics2D
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding PDFImageHandler: org.apache.fop.render.pdf.PDFImageHandlerRenderedImage
      [2008/09/23 12:03:11] [DEBUG] Dynamically adding PDFImageHandler: org.apache.fop.render.pdf.PDFImageHandlerXML
      [2008/09/23 12:03:11] [DEBUG] userconfig is null
      [2008/09/23 12:03:11] [DEBUG] Registering: any,normal,400 under F5
      [2008/09/23 12:03:11] [DEBUG] Registering: any,italic,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: any,oblique,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: any,normal,700 under F7
      [2008/09/23 12:03:11] [DEBUG] Registering: any,italic,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: any,oblique,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: sans-serif,normal,400 under F1
      [2008/09/23 12:03:11] [DEBUG] Registering: sans-serif,oblique,400 under F2
      [2008/09/23 12:03:11] [DEBUG] Registering: sans-serif,italic,400 under F2
      [2008/09/23 12:03:11] [DEBUG] Registering: sans-serif,normal,700 under F3
      [2008/09/23 12:03:11] [DEBUG] Registering: sans-serif,oblique,700 under F4
      [2008/09/23 12:03:11] [DEBUG] Registering: sans-serif,italic,700 under F4
      [2008/09/23 12:03:11] [DEBUG] Registering: SansSerif,normal,400 under F1
      [2008/09/23 12:03:11] [DEBUG] Registering: SansSerif,oblique,400 under F2
      [2008/09/23 12:03:11] [DEBUG] Registering: SansSerif,italic,400 under F2
      [2008/09/23 12:03:11] [DEBUG] Registering: SansSerif,normal,700 under F3
      [2008/09/23 12:03:11] [DEBUG] Registering: SansSerif,oblique,700 under F4
      [2008/09/23 12:03:11] [DEBUG] Registering: SansSerif,italic,700 under F4
      [2008/09/23 12:03:11] [DEBUG] Registering: serif,normal,400 under F5
      [2008/09/23 12:03:11] [DEBUG] Registering: serif,oblique,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: serif,italic,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: serif,normal,700 under F7
      [2008/09/23 12:03:11] [DEBUG] Registering: serif,oblique,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: serif,italic,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: monospace,normal,400 under F9
      [2008/09/23 12:03:11] [DEBUG] Registering: monospace,oblique,400 under F10
      [2008/09/23 12:03:11] [DEBUG] Registering: monospace,italic,400 under F10
      [2008/09/23 12:03:11] [DEBUG] Registering: monospace,normal,700 under F11
      [2008/09/23 12:03:11] [DEBUG] Registering: monospace,oblique,700 under F12
      [2008/09/23 12:03:11] [DEBUG] Registering: monospace,italic,700 under F12
      [2008/09/23 12:03:11] [DEBUG] Registering: Monospaced,normal,400 under F9
      [2008/09/23 12:03:11] [DEBUG] Registering: Monospaced,oblique,400 under F10
      [2008/09/23 12:03:11] [DEBUG] Registering: Monospaced,italic,400 under F10
      [2008/09/23 12:03:11] [DEBUG] Registering: Monospaced,normal,700 under F11
      [2008/09/23 12:03:11] [DEBUG] Registering: Monospaced,oblique,700 under F12
      [2008/09/23 12:03:11] [DEBUG] Registering: Monospaced,italic,700 under F12
      [2008/09/23 12:03:11] [DEBUG] Registering: Helvetica,normal,400 under F1
      [2008/09/23 12:03:11] [DEBUG] Registering: Helvetica,oblique,400 under F2
      [2008/09/23 12:03:11] [DEBUG] Registering: Helvetica,italic,400 under F2
      [2008/09/23 12:03:11] [DEBUG] Registering: Helvetica,normal,700 under F3
      [2008/09/23 12:03:11] [DEBUG] Registering: Helvetica,oblique,700 under F4
      [2008/09/23 12:03:11] [DEBUG] Registering: Helvetica,italic,700 under F4
      [2008/09/23 12:03:11] [DEBUG] Registering: Times,normal,400 under F5
      [2008/09/23 12:03:11] [DEBUG] Registering: Times,oblique,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: Times,italic,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: Times,normal,700 under F7
      [2008/09/23 12:03:11] [DEBUG] Registering: Times,oblique,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: Times,italic,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: Courier,normal,400 under F9
      [2008/09/23 12:03:11] [DEBUG] Registering: Courier,oblique,400 under F10
      [2008/09/23 12:03:11] [DEBUG] Registering: Courier,italic,400 under F10
      [2008/09/23 12:03:11] [DEBUG] Registering: Courier,normal,700 under F11
      [2008/09/23 12:03:11] [DEBUG] Registering: Courier,oblique,700 under F12
      [2008/09/23 12:03:11] [DEBUG] Registering: Courier,italic,700 under F12
      [2008/09/23 12:03:11] [DEBUG] Registering: Symbol,normal,400 under F13
      [2008/09/23 12:03:11] [DEBUG] Registering: ZapfDingbats,normal,400 under F14
      [2008/09/23 12:03:11] [DEBUG] Registering: Times-Roman,normal,400 under F5
      [2008/09/23 12:03:11] [DEBUG] Registering: Times-Roman,oblique,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: Times-Roman,italic,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: Times-Roman,normal,700 under F7
      [2008/09/23 12:03:11] [DEBUG] Registering: Times-Roman,oblique,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: Times-Roman,italic,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: Times Roman,normal,400 under F5
      [2008/09/23 12:03:11] [DEBUG] Registering: Times Roman,oblique,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: Times Roman,italic,400 under F6
      [2008/09/23 12:03:11] [DEBUG] Registering: Times Roman,normal,700 under F7
      [2008/09/23 12:03:11] [DEBUG] Registering: Times Roman,oblique,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: Times Roman,italic,700 under F8
      [2008/09/23 12:03:11] [DEBUG] Registering: Computer-Modern-Typewriter,normal,400 under F9
      [2008/09/23 12:03:11] [DEBUG] Building formatting object tree
      [2008/09/23 12:03:11] [DEBUG] Current heap size: 7229KB
      [2008/09/23 12:03:11] [DEBUG] Starting layout
      [2008/09/23 12:03:11] [DEBUG] [1]
      [2008/09/23 12:03:11] [DEBUG] PLM> flow BPD =792870
      [2008/09/23 12:03:11] [DEBUG] start of the next element list is: page=1 col=0
      [2008/09/23 12:03:11] [ERROR] null: java.lang.StackOverflowError
      java.lang.StackOverflowError
      at java.lang.ThreadLocal.get(ThreadLocal.java:125)
      at sun.misc.FloatingDecimal.developLongDigits(FloatingDecimal.java:312)
      at sun.misc.FloatingDecimal.dtoa(FloatingDecimal.java:549)
      at sun.misc.FloatingDecimal.(FloatingDecimal.java:442)
      at java.lang.StringBuffer.append(StringBuffer.java:365)
      at org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.datatypes.LengthBase.toString(LengthBase.java:135)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.datatypes.LengthBase.toString(LengthBase.java:135)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.datatypes.LengthBase.toString(LengthBase.java:135)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.fo.flow.table.TableColumn.toString(TableColumn.java:233)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.datatypes.LengthBase.toString(LengthBase.java:135)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuffer.append(StringBuffer.java:220)
      at org.apache.fop.fo.properties.PercentLength.toString(PercentLength.java:121)
      at java.lang.String.valueOf(String.java:2615)
      ...

      It seems a problem in the FOP library, or maybe a clash of some java classe in path.

      Attachments

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            kunitoki@gmail.com Lucio Asnaghi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: