-
Notifications
You must be signed in to change notification settings - Fork 18
[Bug]: NullPointerException in CascadebarService on window focus change — AbstractPopup.getContent() returns null [PyCharm 2026.1, v2.12.19] #310
Description
Description
The Windsurf plugin repeatedly crashes whenever a window or dialog appears or disappears in PyCharm 2026.1 — for example when deleting a file, using a refactoring tool, or switching focus between windows. Each time this happens, the IDE displays a disruptive pop-up error notification and floods the log with SEVERE errors, making the IDE very difficult to use while this plugin is active.
This floods the IDE log with SEVERE errors and appears to interfere with normal IDE operations. The issue is not isolated to one trigger — it has been reproduced in multiple scenarios (see below).
Steps to Reproduce
The error occurs in at least the following scenarios:
-
File deletion via Project View
- Right-click a file or directory in the Project View and delete it (or press the Delete key)
- A confirmation dialog appears — the act of this dialog taking/losing focus triggers the exception
-
JetBrains refactoring tools
- Trigger any refactoring action (e.g. rename, move) that opens a dialog
-
Collecting zipped logs (
Help → Collect Logs and Diagnostic Data)- Opening the native file save dialog triggers the exception
In general, any action that causes a modal dialog or secondary window to take focus appears to reproduce this issue.
Expected Behavior
No exceptions should be thrown during normal window activation/deactivation events. The Cascadebar UI component should handle the case where an AbstractPopup has not yet been initialized (i.e. its content is null) gracefully, without throwing.
Actual Behavior
Repeated SEVERE exceptions are logged, for example:
SEVERE - #c.i.i.p.PluginManager - @NotNull method com/intellij/ui/popup/AbstractPopup.getContent must not return null
java.lang.IllegalStateException: @NotNull method com/intellij/ui/popup/AbstractPopup.getContent must not return null
at com.intellij.ui.popup.AbstractPopup.$$$reportNull$$$0(AbstractPopup.java)
at com.intellij.ui.popup.AbstractPopup.getContent(AbstractPopup.java:2094)
at com.codeium.intellij.diff.ui.Cascadebar.hideWindows(Cascadebar.kt:128)
at com.codeium.intellij.diff.services.CascadebarService$setupWindowActivationListener$1$listener$1.windowDeactivated(CascadebarService.kt:107)
at java.desktop/java.awt.AWTEventMulticaster.windowDeactivated(AWTEventMulticaster.java:410)
at java.desktop/java.awt.Window.processWindowEvent(Window.java:2052)
at java.desktop/javax.swing.JFrame.processWindowEvent(JFrame.java:298)
at java.desktop/java.awt.Window.processEvent(Window.java:1996)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2318)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2713)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4836)
at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1831)
at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1064)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:754)
SEVERE - #c.i.i.p.PluginManager - PyCharm 2026.1 Build #PY-261.22158.340
SEVERE - #c.i.i.p.PluginManager - JDK: 25.0.2; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
SEVERE - #c.i.i.p.PluginManager - OS: Mac OS X
SEVERE - #c.i.i.p.PluginManager - Plugin to blame: Windsurf Plugin for Python, JS, Java, Go... version: 2.12.19
SEVERE - #c.i.i.p.PluginManager - Last Action: $Delete
EXAMPLE 2
java.lang.IllegalStateException: @NotNull method com/intellij/ui/popup/AbstractPopup.getContent must not return null
at com.intellij.ui.popup.AbstractPopup.$$$reportNull$$$0(AbstractPopup.java)
at com.intellij.ui.popup.AbstractPopup.getContent(AbstractPopup.java:2094)
at com.codeium.intellij.diff.ui.Cascadebar.showWindows(Cascadebar.kt:138)
at com.codeium.intellij.diff.services.CascadebarService$setupWindowActivationListener$1$listener$1.windowActivated(CascadebarService.kt:102)
at java.desktop/java.awt.AWTEventMulticaster.windowActivated(AWTEventMulticaster.java:400)
at java.desktop/java.awt.Window.processWindowEvent(Window.java:2049)
at java.desktop/javax.swing.JFrame.processWindowEvent(JFrame.java:298)
at java.desktop/java.awt.Window.processEvent(Window.java:1996)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2318)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2713)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4836)
at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1831)
at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1064)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:558)
at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent$lambda$0(IdeKeyboardFocusManager.kt:56)
at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent$lambda$1(IdeKeyboardFocusManager.kt:62)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$0(IdeEventQueue.kt:1110)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1110)
at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.kt:62)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4885)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2318)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2713)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4836)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:734)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:711)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:720)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:573)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$0$0$0$0(IdeEventQueue.kt:381)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:928)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$0$0$0(IdeEventQueue.kt:380)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$0(IdeEventQueue.kt:1110)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1110)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$0(IdeEventQueue.kt:375)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:415)
at java.desktop/java.awt.SentEvent.dispatch(SentEvent.java:75)
at java.desktop/java.awt.DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent.dispatch(DefaultKeyboardFocusManager.java:253)
at java.desktop/java.awt.DefaultKeyboardFocusManager.sendMessage(DefaultKeyboardFocusManager.java:280)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:430)
at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent$lambda$0(IdeKeyboardFocusManager.kt:56)
at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent$lambda$1(IdeKeyboardFocusManager.kt:62)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$0(IdeEventQueue.kt:1110)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1110)
at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.kt:62)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4885)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2318)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2713)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4836)
at java.desktop/sun.awt.SunToolkit$1.run(SunToolkit.java:528)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:323)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:732)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:711)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:720)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:573)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$0$0$0$0(IdeEventQueue.kt:381)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:928)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$0$0$0(IdeEventQueue.kt:380)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$0(IdeEventQueue.kt:1110)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1110)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$0(IdeEventQueue.kt:375)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:415)
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)
The plugin is identified as the cause in every instance:
Plugin to blame: Windsurf Plugin for Python, JS, Java, Go... version: 2.12.19
Root Cause (suspected)
The error occurs in Cascadebar.kt in both the hideWindows method (line 128) and showWindows method (line 138). It is triggered whenever a window or dialog appears or disappears — for example when opening a confirmation dialog, using a refactoring tool, or switching focus between windows.
Environment
| Field | Value |
|---|---|
| Plugin | Windsurf Plugin for Python, JS, Java, Go... |
| Plugin version | 2.12.19 |
| IDE | PyCharm 2026.1 |
| IDE Build | #PY-261.22158.340 |
| OS | Mac OS X |
| JDK | 25.0.2, OpenJDK 64-Bit Server VM (JetBrains) |
Workaround
- A temporary workaround is to restart PyCharm — the plugin works correctly after a restart, but the exceptions begin appearing again after approximately 30-60 minutes of use, suggesting the plugin enters a bad state over time
Additional Notes
- The exception is suppressed after occurring multiple times (logged as "Suppressed a frequent exception"), suggesting the IDE is catching it — but the underlying bug remains and continues to trigger
- The error occurs on both
windowActivatedandwindowDeactivatedevents, so bothshowWindowsandhideWindowsare affected - The IDE displays a disruptive pop-up notification each time the exception is thrown, interrupting the development workflow. This is particularly problematic given how frequently the exception triggers — any dialog or focus change causes the notification to appear, making the IDE very difficult to use while this plugin is active
- This compounds with the JetBrains refactoring tools issue mentioned above, where refactoring dialogs are especially prone to triggering the exception repeatedly in quick succession