IDEA fucked up indices
Since v7 (I think), IDEA has had some internal indexing strategy of the files in projects. These indices somehow got messed up in my current Diana install. I started getting exceptions like:
java.lang.NullPointerException
at com.intellij.psi.stubs.StubTree.(StubTree.java:9)
at com.intellij.lang.javascript.index.JSPackageIndex$2.map(JSPackageIndex.java:60)
at com.intellij.lang.javascript.index.JSPackageIndex$2.map(JSPackageIndex.java:91)
at com.intellij.util.indexing.MapReduceIndex.mapNew(MapReduceIndex.java:82)
...
and
java.lang.AssertionError
at com.intellij.util.io.storage.Storage.deleteRecord(Storage.java:315)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.b(FSRecords.java:213)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.a(FSRecords.java:296)
...
In addition, one file showed in IDEA to have strange content, looking like it came from another sourcefile. Though, when i looked into the file from the console, it wasn’t changed at all.
I ended up solving this by closing down IDEA and deleting its cache files (on my Mac stored in ~Library/Caches/IntelliJIDEA8x/caches).
Starting IDEA again and opening my project, it rebuilt indices and everything seems to work again
April 3, 2009
Tags: IDEA Posted in: Tools

5 Responses
IDEA’s indecies do get corrupted in weird and wonderful ways and need to be deleted rather too often for my liking. This has been a problem since I started using it with v4.0.
Even if you don’t delete the caches they often rebuild themselves (due to a corruption I assume). It even rebuild the cache for the JDK even though it doesn’t change.
To make matters worse it will do this at random grabbing the GUI thread so you can’t do anything else sometimes for minutes. Grrr.
I am a fan of IDEA, but this is its biggest head ache for me.
I assume you are using latest IDEA 8.1.1 eap #9794, first exception should have been fixed in it.
I was not – I was on 8.1.1 build #9779. Does the lovely new “download patch” strategy for upgrades not work for all builds? Cause IDEA says “no new updates” to me when I make it check.
I am downloading a complete .dmg upgrade while typing this comment, but the patch upgrade strategy is much nicer.
Yep, patching does not work with 9794 due to technical problems
I agree with Peter. The frequent rebuilding as I switch between projects or for who knows what reason is an enormous productivity problem. It seems to have become far worse in the last couple of major releases.
Leave a Reply