George Lindholm created FOP-3154: ------------------------------------ Summary: Concurrency problem when rendering document Key: FOP-3154 URL: https://issues.apache.org/jira/browse/FOP-3154 Project: FOP Issue Type: Bug Components: renderer/awt Affects Versions: 2.9 Environment: Windows 11 Java: openjdk version "1.8.0_312" openjdk version "17.0.5" 2022-10-18
Reporter: George Lindholm Attachments: fop.log, tran.xml 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: I{{{}NFO: 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 -- This message was sent by Atlassian Jira (v8.20.10#820010)