Skip to content

Unhandled exception in ToolWindowManagerImpl #8473

@n2vram

Description

@n2vram

What happened

After encountering a build error (Could not create provider for value source AndroidLocationsBuildService.AndroidDirectoryCreator), I did an "invalidate caches and restart".
After restarting, AndroidStudio presented the following error.

  • Note that this exception happens a lot (I have 8 or so "bug-report" files it generated).
Android Studio Narwhal Feature Drop | 2025.1.2
Build #AI-251.26094.121.2512.13840223, built on July 26, 2025
Runtime version: 21.0.6+-13391695-b895.109 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.15.8-200.fc42.x86_64
Fedora Linux 42 (Adams); glibc: 2.41
Kotlin plugin: K2 mode
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 3072M
Cores: 24
Registry:
  ide.experimental.ui=true
Non-Bundled Plugins:
  Dart (251.27623.5)
  io.flutter (87.0)
Current Desktop: XFCE

Version information

Android Studio Narwhal Feature Drop | 2025.1.2 • Flutter plugin io.flutter 87.0 • Dart plugin 251.27623.5

Flutter 3.32.8 • channel stable • https://github.com/flutter/flutter.git
Framework • revision edada7c56e (3 weeks ago) • 2025-07-25 14:08:03 +0000
Engine • revision ef0cd00091 (4 weeks ago) • 2025-07-24 12:23:50 -0700
Tools • Dart 3.8.1 • DevTools 2.45.1

Exception

Unhandled exception in [Kernel@ns8aln4cf4bshg4cik5h, Rete(failFast=false, commands=capacity=2147483647,data=[onReceive], reteState=kotlinx.coroutines.flow.StateFlowImpl@19d37183, dbSource=ReteDbSource(reteState=kotlinx.coroutines.flow.StateFlowImpl@19d37183)), DbSourceContextElement(kernel Kernel@ns8aln4cf4bshg4cik5h), ComponentManager(ProjectImpl@548933323), com.intellij.codeWithMe.ClientIdContextElementPrecursor@1b71cf0c, CoroutineName(com.intellij.openapi.wm.impl.ToolWindowManagerImpl), ModalityState.NON_MODAL, Dispatchers.EDT]

java.lang.ClassCastException: class io.flutter.toolwindow.ToolWindowBadgeUpdater$BadgeIcon cannot be cast to class com.intellij.openapi.util.ScalableIcon (io.flutter.toolwindow.ToolWindowBadgeUpdater$BadgeIcon is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @29a2dba2; com.intellij.openapi.util.ScalableIcon is in unnamed module of loader com.intellij.util.lang.PathClassLoader @6cd8737)
	at com.intellij.openapi.wm.impl.SquareStripeButton.updatePresentation(SquareStripeButton.kt:244)
	at com.intellij.toolWindow.ToolWindowPaneNewButtonManager$createStripeButton$1.updateIcon(ToolWindowPaneNewButtonManager.kt:203)
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.toolWindowPropertyChanged(ToolWindowManagerImpl.kt:2355)
	at com.intellij.openapi.wm.impl.ToolWindowImpl.setIcon(ToolWindowImpl.kt:583)
	at io.flutter.toolwindow.ToolWindowBadgeUpdater.lambda$updateBadgedIcon$0(ToolWindowBadgeUpdater.java:39)
	at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$invokeLater$1.invokeSuspend(ToolWindowManagerImpl.kt:1621)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at com.intellij.openapi.application.impl.EdtCoroutineDispatcher$wrapWithLocking$2$1.run(EdtCoroutineDispatcher.kt:71)
	at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction$lambda$6(AnyThreadWriteThreadingSupport.kt:274)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithTemporaryThreadLocal(AnyThreadWriteThreadingSupport.kt:204)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:274)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:222)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:1009)
	at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
	at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
	at com.intellij.openapi.application.impl.EdtCoroutineDispatcher$wrapWithLocking$$inlined$Runnable$2.run(Runnable.kt:15)
	at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:42)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:240)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:25)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:222)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:117)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:585)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:482)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10$lambda$9(IdeEventQueue.kt:307)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.j markdown was shown in the editor pane.ava:864)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12$lambda$11$lambda$10(IdeEventQueue.kt:com.intellij.openapi.wm.impl.306)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:958)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:958)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$12(IdeEventQueue.kt:301)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:341)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [Kernel@ns8aln4cf4bshg4cik5h, Rete(failFast=false, commands=capacity=2147483647,data=[onReceive], reteState=kotlinx.coroutines.flow.StateFlowImpl@19d37183, dbSource=ReteDbSource(reteState=kotlinx.coroutines.flow.StateFlowImpl@19d37183)), DbSourceContextElement(kernel Kernel@ns8aln4cf4bshg4cik5h), ComponentManager(ProjectImpl@548933323), com.intellij.codeWithMe.ClientIdContextElementPrecursor@1b71cf0c, CoroutineName(com.intellij.openapi.wm.impl.ToolWindowManagerImpl), ModalityState.NON_MODAL, StandaloneCoroutine{Cancelled}@76dbb174, Dispatchers.EDT]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions