jshiell / checkstyle-idea

CheckStyle plug-in for IntelliJ IDEA
https://plugins.jetbrains.com/plugin/1065-checkstyle-idea
Other
889 stars 161 forks source link

IDE Internal Error Occurred: java.lang.Throwable: Non-cancellable section in FAST_TRACK #615

Closed oppahansi closed 1 year ago

oppahansi commented 1 year ago

This happens right after the IDE start up.
Screenshot

OS:
Win 11 Pro

Plugin Version:
5.79.0

IDE Version:

2023.1.2 (Community Edition), Build #IC-231.9011.34, built on May 16, 2023  
Runtime version: 17.0.6+10-b829.9 amd64  
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.  

New GUI is activated.

Stacktrace:

Show ``` java.lang.Throwable: Non-cancellable section in FAST_TRACK at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202) at com.intellij.util.SlowOperations.reportNonCancellableSectionInFastTrack(SlowOperations.java:131) at com.intellij.util.SlowOperations.assertSlowOperationsAreAllowed(SlowOperations.java:94) at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.update(FSRecords.java:382) at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findChildInfo(PersistentFSImpl.java:462) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findInPersistence(VirtualDirectoryImpl.java:140) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.doFindChild(VirtualDirectoryImpl.java:126) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:75) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:515) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:47) at com.intellij.openapi.vfs.newvfs.VfsImplUtil.findFileByPath(VfsImplUtil.java:54) at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.findFileByPath(LocalFileSystemBase.java:120) at com.intellij.openapi.vcs.LocalFilePath.findFile(LocalFilePath.java:125) at com.intellij.openapi.vcs.LocalFilePath.getVirtualFile(LocalFilePath.java:118) at com.intellij.openapi.vcs.LocalFilePath.equals(LocalFilePath.java:66) at com.intellij.openapi.util.Comparing.equal(Comparing.java:32) at com.intellij.openapi.vcs.changes.ChangeListsIndexes.changeAdded(ChangeListsIndexes.java:96) at com.intellij.openapi.vcs.changes.ChangeListWorker.setChangeLists(ChangeListWorker.java:764) at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.loadState(ChangeListManagerImpl.java:1300) at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.loadState(ChangeListManagerImpl.java:83) at com.intellij.configurationStore.ComponentStoreImpl.doInitComponent(ComponentStoreImpl.kt:435) at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:368) at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:119) at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:46) at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:622) at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:47) at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:39) at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154) at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133) at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99) at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132) at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:92) at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:714) at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:670) at com.intellij.openapi.vcs.changes.ChangeListManager.getInstance(ChangeListManager.java:27) at org.infernus.idea.checkstyle.actions.ScanModifiedFiles.lambda$update$1(ScanModifiedFiles.java:40) at java.base/java.util.Optional.ifPresentOrElse(Optional.java:196) at org.infernus.idea.checkstyle.actions.ScanModifiedFiles.update(ScanModifiedFiles.java:38) at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:158) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:181) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:726) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:140) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$7(ActionUpdater.java:235) at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$1(ProgressManager.java:70) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173) at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:70) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$8(ActionUpdater.java:226) at com.intellij.diagnostic.telemetry.TraceKt.computeWithSpan(trace.kt:123) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$computeOnEdt$9(ActionUpdater.java:224) at io.opentelemetry.context.Context.lambda$wrapSupplier$8(Context.java:309) at com.intellij.openapi.actionSystem.impl.ActionUpdateEdtExecutor.lambda$computeOnEdt$0(ActionUpdateEdtExecutor.java:47) at com.intellij.openapi.actionSystem.impl.Utils.lambda$expandActionGroupFastTrack$5(Utils.java:312) at com.intellij.openapi.actionSystem.impl.Utils.runLoopAndWaitForFuture(Utils.java:825) at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroupFastTrack(Utils.java:310) at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.updateActionsImplFastTrack(ActionToolbarImpl.java:1342) at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.updateActionsImpl(ActionToolbarImpl.java:1310) at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl$1.updateActionsImpl(ActionToolbarImpl.java:220) at com.intellij.openapi.actionSystem.impl.ToolbarUpdater$MyUpdateRunnable.run(ToolbarUpdater.java:152) at com.intellij.openapi.actionSystem.impl.ToolbarUpdater.updateActions(ToolbarUpdater.java:68) at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.updateActionsImmediately(ActionToolbarImpl.java:1289) at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.updateActionsImmediately(ActionToolbarImpl.java:1274) at com.intellij.openapi.actionSystem.impl.ActionToolbarImpl.addNotify(ActionToolbarImpl.java:320) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4840) at java.desktop/java.awt.Container.addNotify(Container.java:2804) at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4840) at java.desktop/java.awt.Container.addImpl(Container.java:1150) at java.desktop/java.awt.Container.add(Container.java:1001) at com.intellij.openapi.wm.impl.content.ToolWindowContentUi.ensureSelectedContentVisible(ToolWindowContentUi.java:323) at com.intellij.openapi.wm.impl.content.ToolWindowContentUi$1.selectionChanged(ToolWindowContentUi.java:200) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:120) at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:85) at jdk.proxy2/jdk.proxy2.$Proxy110.selectionChanged(Unknown Source) at com.intellij.ui.content.impl.ContentManagerImpl.fireSelectionChanged(ContentManagerImpl.java:621) at com.intellij.ui.content.impl.ContentManagerImpl.addSelectedContent(ContentManagerImpl.java:432) at com.intellij.ui.content.impl.ContentManagerImpl$2.run(ContentManagerImpl.java:520) at com.intellij.ui.content.impl.ContentManagerImpl.setSelectedContent(ContentManagerImpl.java:536) at com.intellij.ui.content.impl.ContentManagerImpl.setSelectedContentCB(ContentManagerImpl.java:485) at com.intellij.ui.content.impl.ContentManagerImpl.setSelectedContentCB(ContentManagerImpl.java:475) at com.intellij.ui.content.impl.ContentManagerImpl.setSelectedContentCB(ContentManagerImpl.java:559) at com.intellij.ui.content.impl.ContentManagerImpl.setSelectedContent(ContentManagerImpl.java:564) at com.intellij.ui.content.impl.ContentManagerImpl.doAddContent(ContentManagerImpl.java:201) at com.intellij.ui.content.impl.ContentManagerImpl.addContent(ContentManagerImpl.java:171) at org.infernus.idea.checkstyle.toolwindow.CheckStyleToolWindowFactory.createToolWindowContent(CheckStyleToolWindowFactory.java:20) at com.intellij.openapi.wm.impl.ToolWindowImpl.createContentIfNeeded(ToolWindowImpl.kt:548) at com.intellij.openapi.wm.impl.ToolWindowImpl.scheduleContentInitializationIfNeeded$intellij_platform_ide_impl(ToolWindowImpl.kt:527) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.doShowWindow(ToolWindowManagerImpl.kt:983) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl(ToolWindowManagerImpl.kt:920) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.showToolWindowImpl$default(ToolWindowManagerImpl.kt:906) at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.registerToolWindow$intellij_platform_ide_impl(ToolWindowManagerImpl.kt:1094) at com.intellij.toolWindow.ToolWindowSetInitializerKt.registerToolWindows(ToolWindowSetInitializer.kt:176) at com.intellij.toolWindow.ToolWindowSetInitializerKt.access$registerToolWindows(ToolWindowSetInitializer.kt:1) at com.intellij.toolWindow.ToolWindowSetInitializer$createAndLayoutToolWindows$entries$1.invokeSuspend(ToolWindowSetInitializer.kt:125) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:194) 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:667) at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:571) at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1446) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:571) 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:995) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:995) 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) ```
jshiell commented 1 year ago

Thanks very much for the report. At first glance it looks to be a side-effect of the perf work in IDEA - there's a slow file operation on the GUI thread. Shouldn't be harmful, but I'll try get it sorted when I have a free moment!

jshiell commented 1 year ago

Looks like the scan to check if we have files present in the current change list can exceed the time limit here, as it touches the FS; I'll drop it and rely on the check on click instead.

jshiell commented 1 year ago

Fixed in 5.80.1