"Access is allowed from event dispatch thread only" with IntelliJ 2022.3 Release Candidate

Issue #145 resolved
Bernhard Danecker created an issue

Having Bitbucket Linky active and using “Find Everywhere” (Shift+Shift Hotkey) I always get IDE Internal Errors which are caused by Bitbucket Linky with following stacktrace:

Access is allowed from event dispatch thread only

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: EventQueue.isDispatchThread()=false
Current thread: Thread[SE-SearchTask-ActionSearchEverywhereContributor,4,main] 1236736972
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1892913200
    at com.intellij.openapi.application.impl.ApplicationImpl.throwThreadAccessException(ApplicationImpl.java:1042)
    at com.intellij.openapi.application.impl.ApplicationImpl.assertIsDispatchThread(ApplicationImpl.java:1025)
    at com.intellij.ui.SpeedSearchBase.isPopupActive(SpeedSearchBase.java:180)
    at com.intellij.ui.speedSearch.SpeedSearchSupply.getSupply(SpeedSearchSupply.java:63)
    at com.intellij.ui.speedSearch.SpeedSearchSupply.getSupply(SpeedSearchSupply.java:52)
    at com.intellij.ui.speedSearch.SpeedSearchUtil.applySpeedSearchHighlightingFiltered(SpeedSearchUtil.java:185)
    at com.intellij.ui.ColoredTreeCellRenderer.rendererComponentInner(ColoredTreeCellRenderer.java:124)
    at com.intellij.ui.ColoredTreeCellRenderer.getTreeCellRendererComponent(ColoredTreeCellRenderer.java:53)
    at com.intellij.ui.tree.ui.DefaultTreeUI.getRenderer(DefaultTreeUI.java:179)
    at com.intellij.ui.tree.ui.DefaultTreeUI$2.getNodeDimensions(DefaultTreeUI.java:553)
    at java.desktop/javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:497)
    at java.desktop/javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1344)
    at java.desktop/javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:723)
    at java.desktop/javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:111)
    at java.desktop/javax.swing.plaf.basic.BasicTreeUI.setModel(BasicTreeUI.java:506)
    at com.intellij.ui.tree.ui.DefaultTreeUI.setModel(DefaultTreeUI.java:524)
    at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.propertyChange(BasicTreeUI.java:3903)
    at com.intellij.ui.tree.ui.DefaultTreeUI$5.propertyChange(DefaultTreeUI.java:663)
    at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
    at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
    at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
    at java.desktop/java.awt.Component.firePropertyChange(Component.java:8750)
    at java.desktop/javax.swing.JTree.setModel(JTree.java:946)
    at com.intellij.ui.treeStructure.SimpleTree.<init>(SimpleTree.java:89)
    at com.atlassian.bitbucket.linky.configuration.MainConfigurationForm.createUIComponents(MainConfigurationForm.java:147)
    at com.atlassian.bitbucket.linky.configuration.MainConfigurationForm.$$$setupUI$$$(MainConfigurationForm.java)
    at com.atlassian.bitbucket.linky.configuration.MainConfigurationForm.<init>(MainConfigurationForm.java:47)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:976)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClass(ComponentManagerImpl.kt:1012)
    at com.intellij.openapi.options.ConfigurableEP$ClassProducer.createElement(ConfigurableEP.java:438)
    at com.intellij.openapi.options.ConfigurableEP.createConfigurable(ConfigurableEP.java:344)
    at com.intellij.openapi.options.ex.ConfigurableWrapper.createConfigurable(ConfigurableWrapper.java:42)
    at com.intellij.openapi.options.ex.ConfigurableWrapper.getConfigurable(ConfigurableWrapper.java:116)
    at com.intellij.openapi.options.ex.ConfigurableWrapper.cast(ConfigurableWrapper.java:91)
    at com.intellij.openapi.options.ex.ConfigurableWrapper.getDisplayName(ConfigurableWrapper.java:137)
    at com.intellij.ide.util.gotoByName.GotoActionModel.lambda$new$0(GotoActionModel.java:79)
    at com.intellij.openapi.util.NotNullLazyValue$4.compute(NotNullLazyValue.java:120)
    at com.intellij.openapi.util.NotNullLazyValue$4.getValue(NotNullLazyValue.java:105)
    at com.intellij.ide.util.gotoByName.GotoActionModel.getConfigurablesNames(GotoActionModel.java:366)
    at com.intellij.ide.util.gotoByName.GotoActionItemProvider.processOptions(GotoActionItemProvider.java:148)
    at com.intellij.ide.util.gotoByName.GotoActionItemProvider.filterElements(GotoActionItemProvider.java:94)
    at com.intellij.ide.actions.searcheverywhere.ActionSearchEverywhereContributor.lambda$fetchWeightedElements$1(ActionSearchEverywhereContributor.java:99)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:591)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:666)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:622)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:590)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.ide.actions.searcheverywhere.ActionSearchEverywhereContributor.fetchWeightedElements(ActionSearchEverywhereContributor.java:98)
    at com.intellij.ide.actions.searcheverywhere.MixedResultsSearcher$ContributorSearchTask.run(MixedResultsSearcher.java:182)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
    at com.intellij.util.ConcurrencyUtil.lambda$underThreadNameRunnable$3(ConcurrencyUtil.java:200)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:246)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:833)

This crashes the “Find Everything” thread and yields no result, seems stuck.

Comments (10)

  1. Daniil Penkin staff

    Hey @Bernhard Danecker ,

    Thanks for reporting this. I was able to reproduce, except for I don’t see it crashing Find Everything dialog, but just logging that error. Anyways, the scope is clear, and I’ll get the fix out soon.

    Cheers,
    Daniil

  2. Bernhard Danecker reporter

    Hi, maybe this was written a bit misleading. Not the dialog crashes, but it seams like the thread calculating the result crashes and the dialog is kept open but never shows a result. One have to switch the tabs so results get calculated again.

    But thanks for the fast feedback!

    br

  3. Daniil Penkin staff

    Ah right, now I see what you mean, thanks for clarifying 👍

    Interestingly, this seems to happen only in 2022.3 RC but works fine in the latest stable release (or at least I can’t reproduce it). So they must’ve added some sort of deeper search integration with pref screens.

  4. Bernhard Danecker reporter

    Yeah thats true. It was always fine with 2022.2 or earlier, but since 2022.3 this is crashing, also from the first EAP on.

  5. Daniil Penkin staff

    Right. Sadly there was no obvious quick fix for this due to the way configuration screens are implemented, so atm I’m migrating them to the current API and removing UI forms boilerplate. This is taking a bit longer than I anticipated – hopefully I’ll get something ready by end of this week 🤞

  6. Liam Jones

    Probably doesn’t change anything but FYI, this just started happening with the newly released WebStorm 2022.3 too.

  7. Daniil Penkin staff

    Yup thanks @Liam Jones !

    I’m sorry for the delayed fix. I ended up rewriting pref panels (which used a fairly old JB tech stack) and improving them a little bit, I’m very close to the finish line now.

  8. Daniil Penkin staff

    The latest release, 2022.1.220, should not have this bug anymore 🎆

    Thanks again for surfacing this issue @Bernhard Danecker and @Liam Jones !

  9. Log in to comment