threading issues still

[  11004]   WARN - tellij.ide.HackyRepaintManager - Access to realized (ever shown) UI components should be done only from the AWT event dispatch thread, revalidate(), invalidate() & repaint() is ok from any thread
java.lang.Exception
at com.intellij.ide.IdeRepaintManager.checkThreadViolations(IdeRepaintManager.java:135)
at com.intellij.ide.IdeRepaintManager.addDirtyRegion(IdeRepaintManager.java:125)
at javax.swing.JComponent.repaint(JComponent.java:4742)
at java.awt.Component.repaint(Component.java:3207)
at javax.swing.JTree.treeDidChange(JTree.java:2834)
at javax.swing.plaf.basic.BasicTreeUI.updateSize(BasicTreeUI.java:1796)
at javax.swing.plaf.basic.BasicTreeUI$Handler.treeNodesRemoved(BasicTreeUI.java:3818)
at javax.swing.tree.DefaultTreeModel.fireTreeNodesRemoved(DefaultTreeModel.java:530)

...

and

[  11007]  ERROR - l.treeView.AbstractTreeBuilder - Must be in event-dispatch thread
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:113)
at com.intellij.ide.util.treeView.AbstractTreeUi.assertIsDispatchThread(AbstractTreeUi.java:957)
at com.intellij.ide.util.treeView.AbstractTreeUi.maybeReady(AbstractTreeUi.java:2106)
at com.intellij.ide.util.treeView.UpdaterTreeState.setProcessingNow(UpdaterTreeState.java:384)
at com.intellij.ide.util.treeView.UpdaterTreeState.process(UpdaterTreeState.java:125)
at com.intellij.ide.util.treeView.AbstractTreeUi.processInnerChange(AbstractTreeUi.java:3287)
at com.intellij.ide.util.treeView.AbstractTreeUi.removeNodeFromParent(AbstractTreeUi.java:3237)
...


What thread safety issues do I face? i just have a lexer/parser and structure view folks! grrrrrrr!
4 comments

Hi Jon! I'm not doing anything intentionally to modify the tree but my code might be doing at ;). The factory methods in my parser definition should be simply creating things. On the other hand, I see getChildren() in the structure view stuff making lists of children so I have no idea whether it is trying to build a new tree are not. It's possible given that there are 3 trees that shadow each other: AST, PSI, Structure view. I'm tracking down my presentation problem first and then will jump on this. Thanks!
Ter

0

Did you figure this out. Someone is modifying the PSI tree outside of a write action - that's my thought.


0

It's not happening anymore. Must have been some weirdness with my structure view.

0

Please sign in to leave a comment.