IntelliJ IDEA always asks for more memory

Answered

This issue started happening just randomly a few days ago. Whenever I open IntelliJ IDEA it either asks for more heap, and I have given already 3000MB, or whenever I try to run tests, it fails with OutOfMemoryError. Overall experience became awful, and every time I open new source file, IDE freezes for a minute. Intellisense is also slow when writing code and sometimes appears very late.

Meanwhile, when idling, IDE uses all of its memory and you can see it on the screenshot attached. Might it be a memory leak? It started happening on the last version 2020.2.2. However, I decided to uninstall it and installed 2020.1 but the same behavior persists. I ran memory test on my machine and no errors were found. Any ideas what is going on? I never had such an issue earlier. I will appreciate any help.

 

Some info about the environment.

RAM: 8GB.

OS: Windows 10.

 

 

This is an error thrown when running tests:

Full stacktrace:

Error:Internal error: (java.lang.OutOfMemoryError) Java heap space
java.lang.OutOfMemoryError: Java heap space
at org.jdom.Element.getAttributeList(Element.java:1102)
at org.jdom.Element.setAttribute(Element.java:1355)
at com.intellij.openapi.util.SafeStAXStreamBuilder.processElement(SafeStAXStreamBuilder.java:162)
at com.intellij.openapi.util.SafeStAXStreamBuilder.processElementFragment(SafeStAXStreamBuilder.java:119)
at com.intellij.openapi.util.SafeStAXStreamBuilder.build(SafeStAXStreamBuilder.java:86)
at com.intellij.openapi.util.JDOMUtil.loadUsingStaX(JDOMUtil.java:277)
at com.intellij.openapi.util.JDOMUtil.load(JDOMUtil.java:361)
at org.jetbrains.jps.model.serialization.JpsLoaderBase.tryLoadRootElement(JpsLoaderBase.java:76)
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:64)
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadRootElement(JpsLoaderBase.java:34)
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponentData(JpsLoaderBase.java:56)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadComponentData(JpsProjectLoader.java:109)
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents(JpsLoaderBase.java:44)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadFromDirectory(JpsProjectLoader.java:140)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:95)
at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:39)
at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:34)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:77)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:274)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:130)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:218)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$$Lambda$76/0x0000000800c47c40.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
1 comment
Comment actions Permalink

Can you please collect additional information for the investigation?

  • Disable all third-party plug-ins.
  • Quit the IDE.
  • Remove the logs folder.
  • Launch the IDE, reproduce the problem, and capture a memory snapshot. (Help | Diagnostic Tools | Capture Memory Snapshot)
  • Attach a snapshot along with a log folder compressed.

The files can be uploaded at https://uploads.jetbrains.com. (do not forget to specify the Upload ID)

0

Please sign in to leave a comment.