When a file with external graphics is processed a write error occured for the first grahpic referenced in the file. The rest of the file processed fine except the first graphic. This did not occur on NT but did on Solaris. The there are two possible exceptions that are raised from the same stack trace (See below). The outcome is the same in both cases. Not sure why one exception is raised some times and the other one other tiems. ---------------------------------------------------------------------- Error1: ---------------------------------------------------------------------- FOP 0.20.1 using SAX parser org.apache.xerces.parsers.SAXParser building formatting object tree setting up fonts rendering areas to PostScript [1] [2]java.io.IOException: Pipe broken at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.<init>(Compiled Code) at java.lang.Exception.<init>(Compiled Code) at java.io.IOException.<init>(Compiled Code) at java.io.PipedInputStream.receive(Compiled Code) at java.io.PipedInputStream.receive(Compiled Code) at java.io.PipedOutputStream.write(PipedOutputStream.java:136) at java.util.zip.DeflaterOutputStream.deflate(Compiled Code) at java.util.zip.DeflaterOutputStream.finish(Compiled Code) at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:132) at org.apache.fop.render.ps.FlateEncodeFilter.doFilter(FlateEncodeFilter.java:34) at org.apache.fop.render.ps.FilterThread.run(FilterThread.java:27) [3] Parsing of document complete, stopping renderer written out PostScript Initial heap size: 975Kb Current heap size: 2356Kb Total memory used: 1381Kb Memory use is indicative; no GC was performed These figures should not be used comparatively Total time used: 3988ms Pages rendererd: 3 Avg render time: 1329ms/page Mon Oct 8 17:22:53 CDT 2001 ---------------------------------------------------------------------- Error2: ---------------------------------------------------------------------- FOP 0.20.1 using SAX parser org.apache.xerces.parsers.SAXParser building formatting object tree setting up fonts rendering areas to PostScript [1]java.io.IOException: Read end dead at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.<init>(Compiled Code) at java.lang.Exception.<init>(Compiled Code) at java.io.IOException.<init>(Compiled Code) at java.io.PipedInputStream.receive(Compiled Code) at java.io.PipedInputStream.receive(Compiled Code) at java.io.PipedOutputStream.write(PipedOutputStream.java:136) at java.util.zip.DeflaterOutputStream.deflate(Compiled Code) at java.util.zip.DeflaterOutputStream.finish(Compiled Code) at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:132) at org.apache.fop.render.ps.FlateEncodeFilter.doFilter(FlateEncodeFilter.java:34) at org.apache.fop.render.ps.FilterThread.run(FilterThread.java:27) [2] [3] Parsing of document complete, stopping renderer written out PostScript Initial heap size: 975Kb Current heap size: 2356Kb Total memory used: 1381Kb Memory use is indicative; no GC was performed These figures should not be used comparatively Total time used: 4056ms Pages rendererd: 3 Avg render time: 1352ms/page Mon Oct 8 17:33:46 CDT 2001
Created attachment 651 [details] The FO file that causes the problem.
As I run it more the symptoms change a little (for no appearant reason). Now it is occuring on the second and third graphic in the file and not the first one. All else is the same. BTW, the version of FOP is 0.20.1 and the version of java is 1.2.2.
Created attachment 652 [details] Another error output when there are 100 graphic references. Shows they only occur sometimes.
I feared that something like this might happen. The problem seems to be something related to different implementations of threads between the JDK on Windows and Solaris. Maybe there is also a problem with piped streams that I'm using to run the filters. When I wrote those filters I was a bit lazy to implement proper descendants of FilterOutputStreams. Instead I implemented them so they rather worked on the whole stream at once than in chunks like it would have to being implemented as FilterOutputStreams. That's why I had to introduce the piped streams. So, to resolve this we have to find out if there's a known problem with threads or piped stream in Solaris JDK and maybe try to find a work-around. Unfortunately, I can't help here because I don't have a Solaris machine handy. You might also try another version of the JDK. The other solution would be to reimplement the filters as descendants of FilterOutputStream. It would be so nice if someone could do this and also implement the RunLengthFilter which is part of PostScript Level 2, so we have at least some kind of compression on bitmaps. The problem here is that PS Level 2 supports LZW compression which brings up licence issues, but the RunLength compression is free. Only PS Level 3 has Flate compression.
In recent versions of FOP this is no longer implemented this way and this particular bug shouldn't pop up anymore. Closing this issue.
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed