Bug 13433 - PS rendering crashes with a run-time exception, "No such method"
Summary: PS rendering crashes with a run-time exception, "No such method"
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.20.4
Hardware: PC All
: P3 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-09 02:25 UTC by Garry Peek
Modified: 2012-04-01 07:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Garry Peek 2002-10-09 02:25:48 UTC
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.
Comment 1 J.Pietschmann 2002-10-09 19:31:43 UTC
Fix committed to the maintenance branch.
Comment 2 Glenn Adams 2012-04-01 07:06:50 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed