7 Replies Last post: May 3, 2011 11:43 AM by Alexander Doroshko  
Dave Padovano Newbie 7 posts since
Jul 22, 2010
Currently Being Moderated

Apr 28, 2011 9:39 PM

ANT build java heap space

I'm getting a java heap space error when running an ANT build script that targets the flex sdk flex_sdk_4.5.0.17689. I know this is typically a memory issue and I have tried to allocate 1024mb of memory everwhere I could on my system I can't get it to compile. I've been able to compile this for months and this has just started to happen.

 

If anyone has any ideas on what i could do to fix this, you would rock!

Alexander Doroshko JetBrains 1,329 posts since
Jun 9, 2009
Currently Being Moderated
Apr 28, 2011 9:54 PM in response to: Dave Padovano
Re: ANT build java heap space

Hi Dave!

How does your question relates to IntelliJ IDEA?

Alexander Doroshko JetBrains 1,329 posts since
Jun 9, 2009
Currently Being Moderated
Apr 29, 2011 9:34 PM in response to: Dave Padovano
Re: ANT build java heap space

Please make sure that you increased heap in a correct place. You need to click 'Properties' button in IDEA's Ant tool window and edit 'Maximum heap size (Mb)' field there.

heap.png

Alexander Doroshko JetBrains 1,329 posts since
Jun 9, 2009
Currently Being Moderated
Apr 29, 2011 9:53 PM in response to: Dave Padovano
Re: ANT build java heap space

I don't think you need to increase stack size. Java's default is 512K and if it is overflowed that usually means that there's a bug in a program. Increasing the value only makes program hang for longer period until StackOverflowError. I'm not sure that this value should be measured in Megabytes.

 

Well, how big is the project being built? Which heap is enough for it when launching ant from command line? Please paste a screenshot with the error (and some stacktrace is probably available).

Alexander Doroshko JetBrains 1,329 posts since
Jun 9, 2009
Currently Being Moderated
May 3, 2011 11:43 AM in response to: Dave Padovano
Re: ANT build java heap space

There's nothing magic in the way IDEA executes ant tasks. It just launches separate java process. So I can hardly imagine what kind of bug in IDEA could lead to problems like yours.

So all I can suggest is not really related to IDEA:

- decrease stack size to 1Mb. Unless you get unexpected StackOverflowError - no need in increasing it.

- increase heap just more

- try different version of ant

- try the same command as IDEA uses from command line

 

Is OutOfMemory stack trace the same each time you launch this task? What is there in compile-phones.xml:26?

More Like This

  • Retrieving data ...