Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.2
-
None
-
None
Description
While developing an ANT build.xml script to test some aspects of grails, we need a <groovy> task that invokes an ANT macro which uses a forked <java> task.
This consistently causes a stack overflow in ANT, apparently in the thread that ANT uses to monitor the output of the forked task.
Trace:
[java] Exception in thread "Thread-26" java.lang.StackOverflowError
[java] at org.apache.tools.ant.Project.getThreadTask(Project.java:2300)
[java] at org.apache.tools.ant.Project.demuxInput(Project.java:1244)
[java] at org.apache.tools.ant.DemuxInputStream.read(DemuxInputStream.java:70)
[java] at java.io.FilterInputStream.read(FilterInputStream.java:111)
[java] at org.apache.tools.ant.taskdefs.Redirector.handleInput(Redirector.java:666)
[java] at org.apache.tools.ant.taskdefs.Java.handleInput(Java.java:667)
[java] at org.apache.tools.ant.UnknownElement.handleInput(UnknownElement.java:229)
[java] at org.apache.tools.ant.Project.demuxInput(Project.java:1248)
[java] at org.apache.tools.ant.DemuxInputStream.read(DemuxInputStream.java:70)
[java] at java.io.FilterInputStream.read(FilterInputStream.java:111)
[java] at org.apache.tools.ant.taskdefs.Redirector.handleInput(Redirector.java:666)
[java] at org.apache.tools.ant.taskdefs.Java.handleInput(Java.java:667)
[java] at org.apache.tools.ant.UnknownElement.handleInput(UnknownElement.java:229)
[java] at org.apache.tools.ant.Project.demuxInput(Project.java:1248)
[java] at org.apache.tools.ant.DemuxInputStream.read(DemuxInputStream.java:70)
[java] at java.io.FilterInputStream.read(FilterInputStream.java:111)
[java] at org.apache.tools.ant.taskdefs.Redirector.handleInput(Redirector.java:666)
[java] at org.apache.tools.ant.taskdefs.Java.handleInput(Java.java:667)
[java] at org.apache.tools.ant.UnknownElement.handleInput(UnknownElement.java:229)
Script that suffers the problem is attached - its the functional-test target's use of <groovy> to call the "grails" macrodef that is the problem when the macrodef uses fork="true" on the <java> task. If fork=false there is no stack overflow.
Attachments
Attachments
Issue Links
- is duplicated by
-
GROOVY-2607 AntBuilder input task error
- Closed
- is related to
-
GROOVY-2424 Stackoverflow with groovy & ant
- Closed