OutOfMemoryError when during `ant build` for Community Edition

$ export ANT_OPTS="-Xmx8g -XX:-UseGCOverheadLimit"

$ ant build

(snip)

     [java] /Applications/idea/intellij-community/plugins/coverage/src/com/intellij/execution/configurations/coverage/JavaCoverageEnabledConfiguration.java uses or overrides a deprecated API.

     [java] Recompile with -Xlint:deprecation for details.

     [java] Some input files use unchecked or unsafe operations.

     [java] Recompile with -Xlint:unchecked for details.

     [java] Some input files use or override a deprecated API.

     [java] Recompile with -Xlint:deprecation for details.

     [java] Some input files use unchecked or unsafe operations.

     [java] Recompile with -Xlint:unchecked for details.

     [java] Some input files use or override a deprecated API.

     [java] Recompile with -Xlint:deprecation for details.

     [java] Some input files use unchecked or unsafe operations.

     [java] Recompile with -Xlint:unchecked for details.

     [java] Some input files use unchecked or unsafe operations.

     [java] Recompile with -Xlint:unchecked for details.

     [java] Some input files use or override a deprecated API.

     [java] Recompile with -Xlint:deprecation for details.

     [java] Some input files use unchecked or unsafe operations.

     [java] Recompile with -Xlint:unchecked for details.

     [java] Kotlin JPS plugin version 1.0.5-eap-66

     [java] Plugin loaded: KotlinAndroidJpsPlugin

     [java] Using kotlin-home = /Applications/idea/intellij-community/build/kotlinc

     [java] Kotlin Compiler version @snapshot@

     [java] Some input files use or override a deprecated API.

     [java] Recompile with -Xlint:deprecation for details.

     [java] Some input files use unchecked or unsafe operations.

     [java] Recompile with -Xlint:unchecked for details.

     [java] Some input files use or override a deprecated API.

     [java] Recompile with -Xlint:deprecation for details.

     [java] Some input files use unchecked or unsafe operations.

     [java] Recompile with -Xlint:unchecked for details.

     [java] Some input files use or override a deprecated API.

     [java] Recompile with -Xlint:deprecation for details.

     [java] Some input files use unchecked or unsafe operations.

     [java] Recompile with -Xlint:unchecked for details.

     [java] The system is out of resources.

     [java] Consult the following stack trace for details.

     [java]

     [java] BUILD FAILED

     [java] /Applications/idea/intellij-community/build/gant.xml:57: Module 'android' production: org.apache.tools.ant.BuildException: OutOfMemoryError: insufficient memory

     [java]

     [java] Total time: 9 minutes 9 seconds

 

BUILD FAILED

/Applications/idea/intellij-community/build.xml:74: The following error occurred while executing this line:

/Applications/idea/intellij-community/build.xml:55: Java returned: 1

 

 

6 comments
Comment actions Permalink

And one more question. Now that I can't build, I tried to run Dart plugin the conventional way. i.e. opening Dart-plugin project in IDE (instead of community-edition, as recommended in the plugin's README.md). It does not compile, because it does not find dartanalyzer_server.jar. Where do I get that? I did complete hard drive search, could not find it. I did install the Dart plugin from the repo.

Or, if I mark thirdPartySrc/analysisServer and thirdPartySrc/vmServiceDrivers as source directories, then it complains it's not finding  

de.roderick.weberknecht.WebSocketEventHandler

Fixed that by downloading the above library from github, now I am getting 

import com.intellij.javascript.debugger.execution.JavascriptDebugConfigurationType;

I can proceed downloading and building dependencies, but something's telling me I am not on the right track.

 

0
Comment actions Permalink

OutOfMemory happens inside the compilation process, so increasing Xmx for Ant process won't help. I've corrected our build scripts to increase Xmx for the compiler, this should fix the problem.

0
Comment actions Permalink

About Dart plugin setup. That 2nd way of the project setup has not been used by developers for some time, so instructions became outdated. Since you and may be someone else needs them, I'll fix it.

Marking thirdPartySrc/analysisServer and thirdPartySrc/vmServiceDrivers as source directories is a correct step.

Instead of downloading weberknecht.jar from the internet you'd better configure jars from Dart/lib folder. 

To get JavascriptDebugConfigurationType resolved add [IDEA Installation]/plugins/JavaScriptLanguage/lib/*.jar files to the Plugin SDK.

0
Comment actions Permalink

Hi Alexander,

Thank you for a fast response.

After doing `git pull`, `ant build` now produces the following error:

 

     [java] Run parallel tasks

     [java]  Started 3 tasks in parallel: [win, linux, mac]

     [java]  Building distributions for Windows

     [java]  Building distributions for Linux

     [java]  Building distributions for Mac OS

     [java]  Building Linux tar archive (without JRE)

     [java]  Building zip archive for Mac OS

     [java]  Building Windows .win.zip archive

     [java]  Building Linux tar.gz archive (without JRE)

     [java]  'mac' task finished in 26s 874ms

     [java]  'win' task finished in 27s 247ms

     [java]  'linux' task finished in 29s 530ms

     [java] [win] Build Windows Distribution

     [java]  [win]  [copy] Copying 14 files to /Applications/idea/intellij-community/out/dist.win/bin

     [java]  [win]  [copy] Copying 7 files to /Applications/idea/intellij-community/out/dist.win/lib/libpty/win

     [java]  [win]  [copy] Copying 1 file to /Applications/idea/intellij-community/out/dist.win/bin

     [java]  [win]  [copy] Copying 1 file to /Applications/idea/intellij-community/out/dist.win/bin

     [java]  [win]  [copy] Copying 4 files to /Applications/idea/intellij-community/out/dist.win/bin

     [java]  [win] Build Windows executable x32

     [java]   [win]  [java] Picked up _JAVA_OPTIONS: -Xmx4g

     [java]  [win] Build Windows executable x64

     [java]   [win]  [java] Picked up _JAVA_OPTIONS: -Xmx4g

     [java]  [win] Sign tool isn't defined, /Applications/idea/intellij-community/out/dist.win/bin/fsnotifier.exe won't be signed

     [java]  [win] Sign tool isn't defined, /Applications/idea/intellij-community/out/dist.win/bin/fsnotifier64.exe won't be signed

     [java]  [win] Sign tool isn't defined, /Applications/idea/intellij-community/out/dist.win/bin/idea.exe won't be signed

     [java]  [win] Sign tool isn't defined, /Applications/idea/intellij-community/out/dist.win/bin/idea64.exe won't be signed

     [java]  [win] Sign tool isn't defined, /Applications/idea/intellij-community/out/dist.win/bin/restarter.exe won't be signed

     [java]  [win] Sign tool isn't defined, /Applications/idea/intellij-community/out/dist.win/bin/runnerw.exe won't be signed

     [java]  [win] Sign tool isn't defined, /Applications/idea/intellij-community/out/dist.win/bin/vistalauncher.exe won't be signed

     [java]  [win] Sign tool isn't defined, /Applications/idea/intellij-community/out/dist.win/bin/WinProcessListHelper.exe won't be signed

     [java]  [win] Cannot extract win JRE: no 'jbrex8..._x86.tar.gz' files found in /Applications/idea/intellij-community/build/jdk/win

     [java]  [win] Build Windows .win.zip distribution

     [java]   [win]   [zip] Building zip: /Applications/idea/intellij-community/out/artifacts/ideaIC-171.SNAPSHOT.win.zip

     [java]   [win] Artifact built: out/artifacts/ideaIC-171.SNAPSHOT.win.zip

     [java]  [win] Build Windows Exe Installer

     [java]   [win] Windows installer can be built only under Windows or Linux

     [java] [linux] Build Linux Distribution

     [java]  [linux]  [copy] Copying 7 files to /Applications/idea/intellij-community/out/dist.unix/bin

     [java]  [linux]  [copy] Copying 2 files to /Applications/idea/intellij-community/out/dist.unix/lib/libpty/linux

     [java]  [linux]  [copy] Copying 1 file to /Applications/idea/intellij-community/out/dist.unix/bin

     [java]  [linux]  [copy] Copying 1 file to /Applications/idea/intellij-community/out/dist.unix/bin

     [java]  [linux]  [copy] Copying 3 files to /Applications/idea/intellij-community/out/dist.unix/bin

     [java]  [linux] Build Linux tar.gz archive (without JRE)

     [java]   [linux]   [tar] Building tar: /Applications/idea/intellij-community/out/artifacts/ideaIC-171.SNAPSHOT-no-jdk.tar

     [java]   [linux]  [gzip] Building: /Applications/idea/intellij-community/out/artifacts/ideaIC-171.SNAPSHOT-no-jdk.tar.gz

     [java]   [linux] [delete] Deleting: /Applications/idea/intellij-community/out/artifacts/ideaIC-171.SNAPSHOT-no-jdk.tar

     [java]   [linux] Artifact built: out/artifacts/ideaIC-171.SNAPSHOT-no-jdk.tar.gz

     [java]  [linux] Cannot extract linux JRE: no 'jbrex8..._x64.tar.gz' files found in /Applications/idea/intellij-community/build/jdk/linux

     [java]  [linux] Skipping building Linux distribution with bundled JRE because JRE archive is missing

     [java] [mac] Build Mac OS Distribution

     [java]  [mac]  [copy] Copying 8 files to /Applications/idea/intellij-community/out/dist.mac/bin

     [java]  [mac]  [copy] Copying 2 files to /Applications/idea/intellij-community/out/dist.mac/lib/libpty/macosx

     [java]  [mac]  [copy] Copying 3 files to /Applications/idea/intellij-community/out/dist.mac

     [java]  [mac]  [copy] Copying 1 file to /Applications/idea/intellij-community/out/dist.mac/Resources/IJ.help/Contents/Resources/Shared

     [java]  [mac] Build zip archive for Mac OS

     [java]   [mac]   [zip] Building zip: /Applications/idea/intellij-community/out/artifacts/ideaIC-171.SNAPSHOT.mac.zip

     [java]  [mac] A Mac OS build agent isn't configured, dmg artifact won't be produced

     [java]  [mac] Artifact built: out/artifacts/ideaIC-171.SNAPSHOT.mac.zip

     [java] Build cross-platform distribution

     [java]  Building cross-platform zip

     [java]    [copy] Copying 1 file to /Applications/idea/intellij-community/out/temp/cross-platform-zip/bin/win

     [java]    [copy] Copying 3 files to /Applications/idea/intellij-community/out/temp/cross-platform-zip/bin/linux

     [java]    [copy] Copying 2 files to /Applications/idea/intellij-community/out/temp/cross-platform-zip/bin/mac

     [java]    [copy] Copying 1 file to /Applications/idea/intellij-community/out/temp/cross-platform-zip/bin/mac

     [java]    [copy] Copying 2 files to /Applications/idea/intellij-community/out/temp/cross-platform-zip/bin

     [java]     [zip] Building zip: /Applications/idea/intellij-community/out/artifacts/ideaIC-171.SNAPSHOT.zip

     [java]   Artifact built: out/artifacts/ideaIC-171.SNAPSHOT.zip

     [java] Build intellij-core

     [java]  [mkdir] Created dir: /Applications/idea/intellij-community/out/artifacts/core

     [java]    [jar] Building jar: /Applications/idea/intellij-community/out/artifacts/core/___tmp___/_0/intellij-core.jar

     [java]    [jar] Building jar: /Applications/idea/intellij-community/out/artifacts/core/___tmp___/_1/annotations.jar

     [java]    [jar] Building jar: /Applications/idea/intellij-community/out/artifacts/core/___tmp___/_2/intellij-core-analysis.jar

     [java]   [copy] Copying 1 file to /Applications/idea/intellij-community/out/artifacts/core

     [java]   [copy] Copying 1 file to /Applications/idea/intellij-community/out/artifacts/core

     [java]   [copy] Copying 1 file to /Applications/idea/intellij-community/out/artifacts/core

     [java]   [copy] Copying 10 files to /Applications/idea/intellij-community/out/artifacts/core

     [java]  Artifact built: out/artifacts/core=>core

     [java]    [zip] Building zip: /Applications/idea/intellij-community/out/artifacts/intellij-core-171.SNAPSHOT.zip

     [java]  Artifact built: out/artifacts/intellij-core-171.SNAPSHOT.zip

     [java] Build standalone JPS

     [java]

     [java] BUILD FAILED

     [java] /Applications/idea/intellij-community/build/gant.xml:57: : No production output found for module javac-ref-scanner-8. Either modules.output property references project output that doesn't contain this module or module.javac-ref-scanner-8.output.main is not defined or references non-existing directory.

     [java]

     [java] Total time: 7 minutes 7 seconds

 

0
Comment actions Permalink

Please ignore the last post, I was able to build after pulling a fresh version a couple of hours later.

 

Now I am having this problem: it can't find symbol:

import com.jetbrains.debugger.wip.ChromeDebugProcess;

Only finding:

com.intellij.chromeConnector.debugger.ChromeDebugProcess.

 

0
Comment actions Permalink

Use the latest IntelliJ IDEA 2016.3 EAP as the Plugin SDK (with all corresponding *.jar files added as written in Dart's readme).

0

Please sign in to leave a comment.