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

Concurrency problem when rendering document

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.9
    • None
    • renderer/awt
    • None
    • Windows 11
      Java:
        openjdk version "1.8.0_312"
        openjdk version "17.0.5" 2022-10-18

    Description

      Hi,
         I've been working on upgrading our ancient use of fop (0.20.5) to the latest version of xmlgraphics (2.9) but I've been stymied by a concurrency problem that causes a FOPException
      org.apache.fop.apps.FOPException: Requested page number is out of range: 0; only 0 page(s) available.

      Complicating the issue is that when I try to debug the workflow the problem does not happen. I've been able to trace part of the flow by using conditional breakpoints that prints to the console which has helped, but the more conditionals I put in, the less likely the problem shows up

      An extract of the log shows:
      INFO: table-layout="fixed" and width="auto", but auto-layout not supported => assuming width="100%". (See position 201:18)
      Thread[Thread-4,5,main]PreviewPanel.Reloader.run()
      Thread[AWT-EventQueue-0,6,main]Java2DRenderer.getPageViewport()
      org.apache.fop.apps.FOPException: Requested page number is out of range: 0; only 0 page(s) available.
          at org.apache.fop.render.java2d.Java2DRenderer.getPageViewport(Java2DRenderer.java:421)
          at org.apache.fop.render.java2d.Java2DRenderer.getPageImage(Java2DRenderer.java:436)
          at org.apache.fop.render.awt.viewer.ImageProxyPanel.paintComponent(ImageProxyPanel.java:123)
      ...
      INFO: table-layout="fixed" and width="auto", but auto-layout not supported => assuming width="100%". (See position 201:18)
      Thread[Thread-4,5,main]PreviewPanel.setPage()

      Somehow the AWT thread is dispatched while Reloader.run() is still running so the data is un-available to render.

      I run fop in Eclipse using the arguments: -awt  tran.xml

      The only way I've been able to cause the issue is to keep running fop until it happens.

      Any insight would be appreciated

      George

       

      Attachments

        1. fop.log
          69 kB
          George Lindholm
        2. tran.xml
          361 kB
          George Lindholm

        Activity

          People

            Unassigned Unassigned
            gnl42 George Lindholm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: