jonathanlermitage / intellij-extra-icons-plugin

🧩 Issues and feature requests for Extra Icons plugin for IntelliJ-based IDEs. Also provides Theme Packs for Extra Icons.
https://plugins.jetbrains.com/plugin/11058-extra-icons
Other
172 stars 52 forks source link

Slow operations are prohibited on EDT #121

Closed AlexPl292 closed 1 year ago

AlexPl292 commented 1 year ago

Issues

Exception: Slow operations are prohibited on EDT

Plugin version: 2023.1.2

IJ: IntelliJ IDEA 2023.1 RC (Ultimate Edition) Build #IU-231.8109.90, built on March 16, 2023 Licensed to JetBrains Team / Alex Plate You have a perpetual fallback license for this version. Subscription is active until December 28, 2026. Runtime version: 17.0.6+10-b829.5 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.0.1 GC: G1 Young Generation, G1 Old Generation Memory: 6000M Cores: 16 Metal Rendering is ON Registry: analyze.exceptions.on.the.fly=true ide.smart.update=true debugger.new.tool.window.layout=true ide.plugins.snapshot.on.unload.fail=true ide.slow.operations.assertion=true compiler.process.use.portable.caches=true ide.experimental.ui=true jetbrains.tbe.show.error.popup=true

Non-Bundled Plugins: org.jetbrains.releaseplan (0.0.111) dev.hashnode.bas.insomniac (2.0) lermitage.intellij.extra.icons (2023.1.2) AceJump (3.8.11) IdeaVIM (2.2.0-dev.41) com.intellij.grazie.pro (0.3.209) me.artspb.idea.build.number.plugin (1.9.2) jetbrains.team.auth (231.8109.127) org.jetbrains.toolbox-enterprise-client (1.0.3095-ij231) com.intellij.sisyphus (231.8109.127) com.jetbrains.intellij.code.search.polaris (0.3.266) com.jetbrains.idea.safepush (231.8109.127) com.intellij.git.instant (1.3.3) com.jetbrains.intellij.api.watcher (231.8109.127) org.jetbrains.research.refactorinsight (2023.1-3.0) Jetbrains TeamCity Plugin (2022.12.123443)

Kotlin: 231-1.8.0-release-345-IJ8109.90

java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
    at com.intellij.util.SlowOperations.assertSlowOperationsAreAllowed(SlowOperations.java:127)
    at com.intellij.util.indexing.FileBasedIndexScanUtil.ensureUpToDate(FileBasedIndexScanUtil.java:47)
    at com.intellij.util.indexing.FileBasedIndexScanUtil.processFilesContainingAnyKey(FileBasedIndexScanUtil.java:237)
    at com.intellij.util.indexing.FileBasedIndexImpl.processFilesContainingAnyKey(FileBasedIndexImpl.java:1217)
    at com.intellij.psi.search.FilenameIndex.getVirtualFilesByNames(FilenameIndex.java:225)
    at com.intellij.psi.search.FilenameIndex.getVirtualFilesByName(FilenameIndex.java:62)
    at com.intellij.psi.search.FilenameIndex.getVirtualFilesByName(FilenameIndex.java:78)
    at lermitage.intellij.extra.icons.enablers.AbstractInFolderEnabler.initWithIdeFileIndex(AbstractInFolderEnabler.java:79)
    at lermitage.intellij.extra.icons.enablers.AbstractInFolderEnabler.lambda$init$0(AbstractInFolderEnabler.java:50)
    at com.intellij.openapi.project.DumbServiceImpl.doRun(DumbServiceImpl.java:434)
    at com.intellij.openapi.project.DumbServiceImpl.updateFinished(DumbServiceImpl.java:426)
    at com.intellij.openapi.project.TrackedEdtActivityService$TrackedEdtActivity.run(TrackedEdtActivityService.java:66)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
    at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:456)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:758)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:666)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:570)
    at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1446)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:570)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:994)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:994)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
jonathanlermitage commented 1 year ago

@AlexPl292 I see ide.slow.operations.assertion=true. It can be safely set to false (Help | Find Action | Registry | then toggle ide.slow.operations.assertion).
I will try to rework the way I query the IDE filename index, which should fix this issue even if ide.slow.operations.assertion is enabled.

jonathanlermitage commented 1 year ago

Found a solution, but it requires IDE 2023.1.

So, for now, the workaround is to disable ide.slow.operations.assertion, which should actually already be set to false. I think this is set to true in EAP and RC builds only?

Also added some documentation: https://plugins.jetbrains.com/plugin/11058-extra-icons/errors-workarounds

AlexPl292 commented 1 year ago

Hi, thank you for the fix! As I know, yes, it's for EAP releases only, but it is supposed to be enabled for all releases at some moment.