Bug 45370 - StackOverflowError when compiling XOM
Summary: StackOverflowError when compiling XOM
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.7.1
Hardware: PC Windows Vista
: P1 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2008-07-09 10:18 UTC by Gili
Modified: 2008-08-22 04:30 UTC (History)
0 users

modified build.xml (30.21 KB, text/plain)
2008-07-09 10:24 UTC, Gili
Output log (236.06 KB, text/plain)
2008-07-09 10:25 UTC, Gili

Note You need to log in before you can comment on or make changes to this bug.
Description Gili 2008-07-09 10:18:42 UTC

When building XOM using Ant I get a StackOverflowError that I cannot reproduce outside of Ant. Here is how you can reproduce it:

1) Download http://www.cafeconleche.org/XOM/xom-1.2b2.zip and extract it into <xom-dir>

2) Download http://dist.codehaus.org/jaxen/distributions/jaxen-1.1.1-src.zip into <xom-dir>

3) Copy the attached build.xml into <xom-dir> and run "ant dist"

4) You should see the same output mentioned in output.txt

This is reproducible 100% of the time both under JDK 1.5 or 1.6
Comment 1 Gili 2008-07-09 10:24:53 UTC
Created attachment 22240 [details]
modified build.xml
Comment 2 Gili 2008-07-09 10:25:12 UTC
Created attachment 22241 [details]
Output log
Comment 3 Gili 2008-07-09 10:36:10 UTC
FYI: I get this same exception running "ant dist" against XOM 1.1 without modifying build.xml
Comment 4 Matt Benson 2008-07-09 10:40:45 UTC
Did Ant 1.7.0 fail in this way?
Comment 5 Gili 2008-07-09 11:06:51 UTC
Yes, I believe 1.6.x failed this way too.
Comment 6 Stefan Bodewig 2008-07-10 02:33:03 UTC
I vaguely recall seeing it fail in Gump that way on some JDK.

If you look into the stacktrace, you see the stack is taken up by some recursive calls inside Sun's javac.  I'm a bit surprised you wouldn't see the same error when compiling the same set of files outside of Ant.

Does the problem go away if you fork the javac task?
Comment 7 Gili 2008-07-10 09:22:55 UTC
That's correct, fork="true" makes the problem go away.
Comment 8 Stefan Bodewig 2008-08-22 04:30:35 UTC
rather CANTFIX