Assertion Error and slow builds

Hi,

I've been using IntelliJ on our Android project for about a year now and I love it! However, I've been recently seeing slow build times with an occasional assert error that goes away when I rebuild:

Internal error: (java.io.IOException) java.lang.AssertionError: -2046
java.io.IOException: java.lang.AssertionError: -2046
 at com.intellij.util.io.PersistentEnumeratorBase.doEnumerate(PersistentEnumeratorBase.java:276)
 at com.intellij.util.io.PersistentEnumeratorBase.enumerate(PersistentEnumeratorBase.java:289)
 at com.intellij.util.io.PersistentBTreeEnumerator.enumerate(PersistentBTreeEnumerator.java:25)
 at com.intellij.util.io.PersistentEnumeratorDelegate.enumerate(PersistentEnumeratorDelegate.java:75)
 at com.intellij.util.io.PersistentHashMap.enumerate(PersistentHashMap.java:348)
 at com.intellij.util.io.PersistentHashMap$6.onDropFromCache(PersistentHashMap.java:205)
 at com.intellij.util.io.PersistentHashMap$6.onDropFromCache(PersistentHashMap.java:194)
 at com.intellij.util.containers.SLRUMap.clear(SLRUMap.java:145)
 at com.intellij.util.io.PersistentHashMap.doClose(PersistentHashMap.java:545)
 at com.intellij.util.io.PersistentHashMap.close(PersistentHashMap.java:536)
 at org.jetbrains.jps.incremental.storage.AbstractStateStorage.close(AbstractStateStorage.java:61)
 at org.jetbrains.jps.incremental.storage.SourceToOutputMappingImpl.close(SourceToOutputMappingImpl.java:86)
 at org.jetbrains.jps.incremental.storage.BuildDataManager.closeSourceToOutputStorages(BuildDataManager.java:228)
 at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:527)
 at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:314)
 at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:179)
 at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129)
 at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:220)
 at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:112)
 at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:132)
 at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
 at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.AssertionError: -2046
 at com.intellij.util.io.PagedFileStorage.getBuffer(PagedFileStorage.java:379)
 at com.intellij.util.io.PagedFileStorage.getByteBuffer(PagedFileStorage.java:163)
 at com.intellij.util.io.PersistentEnumeratorBase$3.<init>(PersistentEnumeratorBase.java:400)
 at com.intellij.util.io.PersistentEnumeratorBase.isKeyAtIndex(PersistentEnumeratorBase.java:396)
 at com.intellij.util.io.PersistentBTreeEnumerator.enumerateImpl(PersistentBTreeEnumerator.java:293)
 at com.intellij.util.io.PersistentEnumeratorBase.doEnumerate(PersistentEnumeratorBase.java:267)
 ... 26 more



Could this be somehow related to memory? I forget how to increase available memory on OSX, I believe there used to be a setting in a plist somewhere. Please advise as this issue has been plaguing me for months! It seems that every 2nd or 3rd compile results in either this above assert error or an exaggerated time upwards of 20-30 minutes. It eventually completes and deploys to my device with no problems and the next compile usually goes fast. I'd appreciate any help you could provide. Thanks again, and IntelliJ Idea is by far the best IDE on the planet! :)

Please sign in to leave a comment.