Steps to reproduce:
1. Open a project and any Java file, write: String s = "";
2. Now open somewhere a large text file. I'm using a 100KB html file.
3. Copy file contents into clipboard and paste into "" to get a 100KB string literal.
Observed: StackOverflowException (see below)
4. Try to edit the file further, for example use Undo to remove the large string.
Observed: IDEA is slow, a lot of CPU is used. Changes are not saved to disk
.
5. Close IDEA, edit file manually to remove the large text, open IDEA and this file again.
Observed: The large string is still there! After I manually pressed sync, it offered to load the updated file from disk, but slowness and CPU consumption remained after that.
Speculation: it has something to do with the local history. I'm going to clear local caches to get IDEA into usable state again.
No message
java.lang.StackOverflowError
at com.intellij.psi.impl.source.tree.CompositeElement.getTextLength(CompositeElement.java:7)
at com.intellij.psi.impl.source.tree.CompositeElement.a(CompositeElement.java:166)
at com.intellij.psi.impl.source.tree.CompositeElement.getTextLength(CompositeElement.java:7)
at com.intellij.psi.impl.source.tree.CompositeElement.a(CompositeElement.java:166)
at com.intellij.psi.impl.source.tree.CompositeElement.getTextLength(CompositeElement.java:7)
at com.intellij.psi.impl.source.tree.CompositeElement.a(CompositeElement.java:166)
at com.intellij.psi.impl.source.tree.CompositeElement.getTextLength(CompositeElement.java:7)
... and so on