I just got a frontend compiler bug in Intellj (whe...
# announcements
n
I just got a frontend compiler bug in Intellj (when trying to run my code). This used to work w/o problems until a few moments ago. "Invalidate cache and restart" did not help. IntellJ uses 720 of 1950MB right now.
Copy code
Error:Kotlin: [Internal Error] java.rmi.ServerError: Error occurred in server thread; nested exception is: 
	java.lang.OutOfMemoryError: Java heap space
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:386)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303)
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279)
...
Caused by: java.lang.OutOfMemoryError: Java heap space
	at org.jetbrains.kotlin.incremental.storage.ProtoMapValueExternalizer.read(externalizers.kt:63)
	at org.jetbrains.kotlin.incremental.storage.ProtoMapValueExternalizer.read(externalizers.kt:48)
	at com.intellij.util.io.PersistentHashMap.doGet(PersistentHashMap.java:616)
	at com.intellij.util.io.PersistentHashMap.get(PersistentHashMap.java:560)
	at org.jetbrains.kotlin.incremental.storage.CachingLazyStorage.get(CachingLazyStorage.kt:64)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCache$ProtoMap.get(IncrementalJvmCache.kt:307)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCache.getModuleMappingData(IncrementalJvmCache.kt:267)
n
I already have 2GB configured and IntellJ says that it currently only uses 750MB
j
Maybe fragmentation? If it can't find enough contiguous space for a large allocation, it could still happen.
i
If you build with IDEA, try changing "Build process heap size" setting in
Settings | Build, Execution, Deployment | Compiler
n
yes, building with IDEA. I just doubled the "build process heap size" to 1400 but that did not make a difference