Search code examples
javacrashintellij-ideamemory-management

Intellij diagnosing crash problem


Sometimes Intellij IDEA crashes for no obvious reason.

First, it becomes quite slow, CTRL + N (class search) often takes a bit longer than usual time to respond when you type something into it, jumping between files takes more time. And then it crashes..

What is the usual route to diagnose Intellij crash? I've been monitoring memory on the status bar when it crashed and it had about 100MB (out of 512MB) left at that time. Are there any useful logs that would point in the direction of the problem?

[UPDATE] 3 crashes in total.

1 instance:

A fatal error has been detected by the Java Runtime Environment: EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d93acab, pid=3120, tid=5588 JRE version: 6.0_24-b07 Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode windows-x86 ) Problematic frame: V [jvm.dll+0x9acab]

2 instances:

A fatal error has been detected by the Java Runtime Environment: java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space? Internal Error (allocation.cpp:166), pid=2484, tid=5568 Error: ChunkPool::allocate

Memory configuration: -Xss2m
-Xms32m
-Xmx512m

Increased the memory to -Xmx768, hopefully that will delay the out of memory error by a bit. Increasing the memory to -Xmx1024 caused weird address mapping problems after running IDEA for a while (integer overflow?). The machine has 3GB of RAM.


Solution

  • Please define "crashes". If the window just disappears, it usually means the JVM bug and there will be hs_err_pidXXX.log files in the IDEA working directory (usually IDEA_HOME/bin). In some cases updating JDK to the new version or changing Garbage Collector strategy (via vmoptions file) can workaround such issues.

    If the IDE stops responding completely, you need to provide thread dumps.

    If it behaves weird, then you need to check idea.log for exceptions. In some cases it can be caused by OutOfMemory issues. Increasing heap size in idea.vmoptions should help. Check the FAQ for IDEA files locations.

    If IDEA is becoming very slow on certain operations, you need to provide CPU snapshot.