Sending build to account: my@email.net /app/build.xml:137: java.lang.OutOfMemoryError: Java heap space

48 views
Skip to first unread message

Rex

unread,
Jul 11, 2015, 8:55:41 AM7/11/15
to codenameone...@googlegroups.com
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: IDEA
Desktop OS: OSX 10.10.3



any ideas how to resolve this?
i have tried setting the "build process heap size" option larger in IDEA prefs - didnt help.
also tried setting the VM_PARAMETERS and vmparams options with larger heaps in the workspace.xml



output from ant build:

build-for-ios-device
codeNameOne
Sending build request to the server, notice that the build might take a while to complete!
Sending build to account: m...@email.net
/app/build.xml:137: java.lang.OutOfMemoryError: Java heap space
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.Main.start(Main.java:198)
    at org.apache.tools.ant.Main.main(Main.java:286)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2271)
    at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
    at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
    at java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1852)
    at java.io.ObjectOutputStream.write(ObjectOutputStream.java:689)
    at com.codename1.build.client.BuildProcess.createRequest(BuildProcess.java:250)
    at com.codename1.build.client.BuildProcess.sendRequestToServer(BuildProcess.java:299)
    at com.codename1.build.client.CodeNameOneBuildTask.execute(CodeNameOneBuildTask.java:371)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    ... 16 more
/app/build.xml:137: java.lang.OutOfMemoryError: Java heap space
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.Main.start(Main.java:198)
    at org.apache.tools.ant.Main.main(Main.java:286)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2271)
    at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
    at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
    at java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1852)
    at java.io.ObjectOutputStream.write(ObjectOutputStream.java:689)
    at com.codename1.build.client.BuildProcess.createRequest(BuildProcess.java:250)
    at com.codename1.build.client.BuildProcess.sendRequestToServer(BuildProcess.java:299)
    at com.codename1.build.client.CodeNameOneBuildTask.execute(CodeNameOneBuildTask.java:371)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    ... 16 more
/app/build.xml:137: java.lang.OutOfMemoryError: Java heap space
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:116)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.Main.start(Main.java:198)
    at org.apache.tools.ant.Main.main(Main.java:286)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:30)
Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2271)
    at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:113)
    at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:140)
    at java.io.ObjectOutputStream$BlockDataOutputStream.write(ObjectOutputStream.java:1852)
    at java.io.ObjectOutputStream.write(ObjectOutputStream.java:689)
    at com.codename1.build.client.BuildProcess.createRequest(BuildProcess.java:250)
    at com.codename1.build.client.BuildProcess.sendRequestToServer(BuildProcess.java:299)
    at com.codename1.build.client.CodeNameOneBuildTask.execute(CodeNameOneBuildTask.java:371)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    ... 16 more

Ant build completed with 3 errors and no warnings in 13s at 15/07/11, 2:37 PM


Rex

unread,
Jul 11, 2015, 9:00:05 AM7/11/15
to codenameone...@googlegroups.com
resolved this.

For anyone else having this issue - it was being caused by extraneous files that got into /src/ and /res/

Rex

unread,
Jul 12, 2015, 3:36:50 PM7/12/15
to codenameone...@googlegroups.com
aaand now its back. no more extraneous files to remove. hmm... anyone have ideas?

Rex Green

unread,
Jul 12, 2015, 4:14:15 PM7/12/15
to codenameone...@googlegroups.com
if i cut down the data files that are being packaged with the build, then i'm able to build again but without some files. Anyone know if there is some way to change the heap limit that the ant process is using? i have had a look around but i cant see any obvious way of doing it...

Shai Almog

unread,
Jul 12, 2015, 11:56:34 PM7/12/15
to codenameone...@googlegroups.com, rex.gr...@gmail.com
We struggled with this ourselves: http://devnet.jetbrains.com/message/5301721

Rex Green

unread,
Jul 13, 2015, 4:18:11 PM7/13/15
to codenameone...@googlegroups.com
hmm... i have now tried setting "-Xss512m -Xmx2048m" in the additional build process VM options on IDEA. will see if the problem recurs.

On Mon, Jul 13, 2015 at 5:56 AM, Shai Almog <shai....@gmail.com> wrote:
We struggled with this ourselves: http://devnet.jetbrains.com/message/5301721

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/KK_z0gIql4Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/8eb7565e-c127-40b8-82e7-21fe3d07e85d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages