bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
760 stars 303 forks source link

242: Empty action text for projectName='' displayName='' #6488

Closed tpasternak closed 2 months ago

tpasternak commented 3 months ago

Description of the bug:

java.lang.Throwable: Empty action text for projectName='' displayName='' path='/home/t/repos/bazel-intellij-2/.ijwb'
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
    at com.intellij.ide.ReopenProjectAction.<init>(ReopenProjectAction.java:50)
    at com.intellij.ide.RecentProjectListActionProvider.createOpenAction(RecentProjectListActionProvider.kt:131)
    at com.intellij.ide.RecentProjectListActionProvider.createRecentProject(RecentProjectListActionProvider.kt:135)
    at com.intellij.ide.RecentProjectListActionProvider.access$createRecentProject(RecentProjectListActionProvider.kt:16)
    at com.intellij.ide.RecentProjectListActionProvider$collectProjects$projectsWithoutGroups$1.invoke(RecentProjectListActionProvider.kt:48)
    at com.intellij.ide.RecentProjectListActionProvider$collectProjects$projectsWithoutGroups$1.invoke(RecentProjectListActionProvider.kt:47)
    at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
    at kotlin.sequences.FlatteningSequence$iterator$1.next(Sequences.kt:299)
    at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:816)
    at com.intellij.ide.RecentProjectListActionProvider.collectProjects(RecentProjectListActionProvider.kt:50)
    at com.intellij.ide.RecentProjectListActionProvider.collectProjects$intellij_platform_ide_impl(RecentProjectListActionProvider.kt:24)
    at com.intellij.openapi.wm.impl.welcomeScreen.recentProjects.ProjectCollectors$recentProjectsCollector$1.invoke(RecentProjectTreeItem.kt:150)
    at com.intellij.openapi.wm.impl.welcomeScreen.recentProjects.ProjectCollectors$recentProjectsCollector$1.invoke(RecentProjectTreeItem.kt:149)
    at com.intellij.openapi.wm.impl.welcomeScreen.recentProjects.RootItem.children(RecentProjectTreeItem.kt:144)
    at com.intellij.openapi.wm.impl.welcomeScreen.recentProjects.RecentProjectFilteringTree.getChildren(RecentProjectFilteringTree.kt:121)
    at com.intellij.openapi.wm.impl.welcomeScreen.recentProjects.RecentProjectFilteringTree.getChildren(RecentProjectFilteringTree.kt:58)
    at com.intellij.ui.FilteringTree$SearchTreeModel.getChildren(FilteringTree.java:368)
    at com.intellij.ui.FilteringTree$SearchTreeModel.filterDirectChildren(FilteringTree.java:398)
    at com.intellij.ui.FilteringTree$SearchTreeModel.filterChildren(FilteringTree.java:387)
    at com.intellij.ui.FilteringTree$SearchTreeModel.refilter(FilteringTree.java:334)
    at com.intellij.ui.FilteringTree$SearchTreeModel.updateStructure(FilteringTree.java:292)
    at com.intellij.openapi.wm.impl.welcomeScreen.recentProjects.RecentProjectFilteringTree.createFilePathChecker$lambda$4(RecentProjectFilteringTree.kt:161)
    at com.intellij.util.concurrency.ContextRunnable.run$$$capture(ContextRunnable.java:27)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
    at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
    at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$1(AnyThreadWriteThreadingSupport.kt:184)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:183)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:419)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1156)
    at com.intellij.openapi.application.impl.FlushQueue.doRun$$$capture(FlushQueue.java:78)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:119)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
    at java.desktop/java.awt.event.InvocationEvent.dispatch$$$capture(InvocationEvent.java:318)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:697)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$13(IdeEventQueue.kt:591)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithoutImplicitRead(AnyThreadWriteThreadingSupport.kt:117)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:591)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:355)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:353)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1036)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1036)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$8(IdeEventQueue.kt:353)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$1(AnyThreadWriteThreadingSupport.kt:184)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:183)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:830)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:396)
    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)

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which Intellij IDE are you using? Please provide the specific version.

No response

What programming languages and tools are you using? Please provide specific versions.

No response

What Bazel plugin version are you using?

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

tpasternak commented 3 months ago

This happens, because for some unknown reason the .ijwb path is recognized as non-directory and then its file extension is stripped

https://github.com/JetBrains/intellij-community/blob/3c5454ed1fc5946dc8a3b877c9d3c095686ec227/platform/platform-impl/src/com/intellij/ide/RecentProjectsManagerBase.kt#L854-L859

tpasternak commented 3 months ago

Ok, the problem occurs when an entry for a project exists in "recent projects" dialog, but its .ijwb directory has been removed

tpasternak commented 3 months ago

https://youtrack.jetbrains.com/issue/IDEA-355114/Empty-action-text-exception-when-recent-projects-list-contains-a-deleted-hidden-project

tpasternak commented 2 months ago

Fixed in IntelliJ