The problem occurs after editing build.XML to set debug="on" and rebuilding FOP with Ant and JDK1.4. (I required debug on to step into the program using Jbuilder6.) FOP then crashes with a run-time exception, "No such method" when rendering an fo file to PostScript. The crash occurs in the file PSRenderer.java at line 697: psString = (new StringBuffer("(").append(sb).append(") t")).toString(); where sb is a previously defined StringBuffer. Changing this to: psString = (new StringBuffer("(").append(sb.toString()).append(") t")).toString (); fixes the problem. Note that Java does not have a method StringBuffer.append(StringBuffer) There is .append(object) which is why the program compiles but this results in .append(object.valueOf()) rather than .toString(). What I don't understand is why it crashes with debugging on but not when debug is off? I have rebuilt and run FOP several times with debugging on and off but always get the same result; maybe there is some optimization not present in debugging version.
Fix committed to the maintenance branch.
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed