IdentifierHighlighter freezes Selena

The IdentifierHighlighter reproducibly kills my Selena installation (at least it did until a few minutes ago when I uninstalled it).

I was marking a large and complex block of code (including an anonymous inner class) and doing a "Surround with ... try/catch/finally". That was the last thing I was able to do with my IDE, it completely froze on me.

The log file contained the following stack trace (six times in a row!):

2007-04-23 16:03:04,125 ERROR - mpl.search.PsiSearchHelperImpl - Assertion failed: You must not run search from within updating PSI activity. Please consider invokeLatering it instead.
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:89)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.a(PsiSearchHelperImpl.java:260)
at com.intellij.psi.impl.search.PsiSearchHelperImpl.processElementsWithWord(PsiSearchHelperImpl.java:81)
at com.intellij.psi.impl.search.CachesBasedRefSearcher.execute(CachesBasedRefSearcher.java:13)
at com.intellij.psi.impl.search.CachesBasedRefSearcher.execute(CachesBasedRefSearcher.java:3)
at com.intellij.util.ExecutorsQuery.forEach(ExecutorsQuery.java:59)
at com.intellij.util.UniqueResultsQuery.forEach(UniqueResultsQuery.java:49)
at com.intellij.util.UniqueResultsQuery.findAll(UniqueResultsQuery.java:62)
at com.intellij.util.UniqueResultsQuery.toArray(UniqueResultsQuery.java:73)
at com.lgc.identifierhighlighter.IdentifierHighlighterEditorComponent.caretPositionChanged(IdentifierHighlighterEditorComponent.java:150)
at com.lgc.identifierhighlighter.IdentifierHighlighterEditorComponent.documentChanged(IdentifierHighlighterEditorComponent.java:325)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:256)
at com.intellij.openapi.editor.impl.DocumentImpl.access$100(DocumentImpl.java:60)
at com.intellij.openapi.editor.impl.DocumentImpl$3.afterChangedUpdate(DocumentImpl.java:1)
at com.intellij.openapi.editor.impl.CharArray.replace(CharArray.java:61)
at com.intellij.openapi.editor.impl.DocumentImpl.a(DocumentImpl.java:182)
at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:197)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.a(PostprocessReformattingAspect.java:15)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.access$700(PostprocessReformattingAspect.java:63)
at com.intellij.psi.impl.source.PostprocessReformattingAspect$ReindentAction.processRange(PostprocessReformattingAspect.java:1)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.a(PostprocessReformattingAspect.java:23)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.access$100(PostprocessReformattingAspect.java:45)
at com.intellij.psi.impl.source.PostprocessReformattingAspect$5.run(PostprocessReformattingAspect.java:0)
at com.intellij.psi.impl.source.PostprocessReformattingAspect$1.compute(PostprocessReformattingAspect.java:0)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:74)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.disablePostprocessFormattingInside(PostprocessReformattingAspect.java:94)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.doPostponedFormatting(PostprocessReformattingAspect.java:38)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.doPostponedFormatting(PostprocessReformattingAspect.java:48)
at com.intellij.psi.impl.source.PostprocessReformattingAspect.postponeFormattingInside(PostprocessReformattingAspect.java:175)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:234)
at com.intellij.codeInsight.generation.surroundWith.PopupActionChooser$InvokeSurrounderAction$1.run(PopupActionChooser.java:2)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:116)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:139)
at com.intellij.codeInsight.generation.surroundWith.PopupActionChooser$InvokeSurrounderAction.actionPerformed(PopupActionChooser.java:1)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:2)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:144)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:51)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:89)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
2007-04-23 16:03:04,125 ERROR - mpl.search.PsiSearchHelperImpl - IntelliJ IDEA (Selena) #6913 Build #6913
2007-04-23 16:03:04,125 ERROR - mpl.search.PsiSearchHelperImpl - JDK: 1.6.0
2007-04-23 16:03:04,125 ERROR - mpl.search.PsiSearchHelperImpl - VM: Java HotSpot(TM) Client VM
2007-04-23 16:03:04,125 ERROR - mpl.search.PsiSearchHelperImpl - Vendor: Sun Microsystems Inc.
2007-04-23 16:03:04,125 ERROR - mpl.search.PsiSearchHelperImpl - OS: Windows XP
2007-04-23 16:03:04,125 ERROR - mpl.search.PsiSearchHelperImpl - Last Action: SurroundWith

1 comment

I updated the plugin at version 2.80 which might fix this deadlock. I added an invokeLater so that I am not searching the Psi model while it is being updated. I can run the Milestone 1 version of Selena and perform some refactorings with no hanging. Please try again with version 2.80. Thanks.

0

Please sign in to leave a comment.