ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: How to dump heap on OutOfMemoryError from ant
Date Fri, 20 Oct 2006 12:49:05 GMT
On 10/20/06, Milan Kubec <Milan.Kubec@sun.com> wrote:
> Peter Reilly wrote:
> > On 10/18/06, Steve Loughran <stevel@apache.org> wrote:
> >> Milan Kubec wrote:
> >> > Hello,
> >> > I want ant to generate heap dump when OutOfMemoryError happens during
> >> > the build to find the problem in the task. I tried adding following
> >> > switches to .antrc file: -XX:+HeapDumpOnOutOfMemoryError
> >> > -XX:HeapDumpPath=e:\ant.hprof
> >> > But it doesn't seem to get to the correct process, in other words -
> >> > nothing happens. Is there some other way to generate heap dump from
> >> ant.
> >> > I'm using Ant 1.6.5 on JDK 1.5.0_09.
> >> >
> >>
> >> If the problem is in Ant's own process, set the ANT_OPTS env variable to
> >> the options.
> >
> > export ANT_OPTS="-XX:+HeapDumpOnOutOfMemoryError"
> > on unix or cygwin
> > set ANT_OPTS="-XX:+HeapDumpOnOutOfMemoryError"
> > on windows.
> >
>
> That's exactly what I did, but from whatever reason I thought that putting it to
> .antrc file in my windows home dir (C:\Documents and Settings\...) would work,
> but for windows the file is called antrc_pre.bat. But still seem to have some
> problem with it, ant.bat refers to the file as %HOME%\antrc_pre.bat, but in fact
> it doesn't work on my WinXP box, it needs to be changed to
> %SYSTEMDRIVE%\%HOMEPATH%\antrc_pre.bat and it works OK.
>
This has been fixed ant 1.7.

Peter

>    Milan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message