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 t开发者_JAVA技巧o 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 -Xmx512mIncreased 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.
Intellij wouldnt start up i.e. flashes IntelliJ and crashes.
Fix: Set -Xmx to default 512MB in idea.exe.vmoptions
file located in folder C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 14.1.4\bin
How I landed on this issue: I was having Xmx set to 2048MB earlier and it crashed hitting GC limit. Then on IntelliJ wouldn't start.
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.
In addition to the above answer, I added:
-Dswing.noxp=true
to .vmoptions file located at IDE_HOME\bin\[bits][.exe].vmoptions
This fixed the problem for me.
精彩评论