zielu / GitToolBox

GitToolBox IntelliJ plugin
GNU General Public License v3.0
604 stars 71 forks source link

[BUG] Exception in plugin when using `git revert` from command line - java.lang.RuntimeException: Cannot invoke (class=ag, method=a, topic=Status cache change) #438

Closed jnareb closed 1 year ago

jnareb commented 1 year ago

Describe the bug CLion IDE Internal Error: Exception in plugin GitToolBox (213.10.3)

java.lang.RuntimeException: Cannot invoke (class=ag, method=a, topic=Status cache change) Caused by: java.util.NoSuchElementException

To Reproduce Possible steps to reproduce the behavior:

  1. Revert commit from the command line (outside the IDE), using git revert <commit>
  2. It might be important for revert to produce merge conflicts
  3. IDE shows that the plugin crashed

Expected behavior For a GitToolBox plugin to not crash.

Plugin version GitToolBox 213.10.3

IDE version CLion 2022.3 Build #CL-223.7571.171, built on November 28, 2022 Runtime version: 17.0.5+1-b653.14 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2000M Cores: 4 Registry: run.processes.with.pty=TRUE

Non-Bundled Plugins:

Stacktrace

Click to reveal the stacktrace ``` Not disposed java.lang.RuntimeException: Cannot invoke (class=ag, method=a, topic=Status cache change) at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:639) at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:395) at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:374) at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1) at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:433) at jdk.proxy4/jdk.proxy4.$Proxy164.a(Unknown Source) at zielu.gittoolbox.c.Q.a(SourceFile:125) at zielu.gittoolbox.c.Q.invoke(SourceFile:124) at zielu.gittoolbox.F.y.a(SourceFile:33) at zielu.gittoolbox.F.y.invoke(SourceFile:33) at zielu.a.b.l.run(SourceFile:49) at zielu.a.b.f.a(SourceFile:12) at zielu.a.b.m.a(SourceFile:21) at zielu.a.b.m.invoke(SourceFile:18) at zielu.a.m.d.a(SourceFile:23) at zielu.a.b.j.run(SourceFile:18) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) Caused by: java.util.NoSuchElementException at com.github.benmanes.caffeine.cache.BoundedLocalCache$EntryIterator.nextKey(BoundedLocalCache.java:3479) at com.github.benmanes.caffeine.cache.BoundedLocalCache$KeyIterator.next(BoundedLocalCache.java:3150) at kotlin.collections.CollectionsKt___CollectionsKt.toSet(_Collections.kt:1347) at zielu.gittoolbox.a.s.i(SourceFile:120) at zielu.gittoolbox.a.s.b(SourceFile:24) at zielu.gittoolbox.a.E.a(SourceFile:114) at zielu.gittoolbox.a.E.invoke(SourceFile:113) at zielu.a.m.d.a(SourceFile:23) at zielu.gittoolbox.a.s.b(SourceFile:113) at zielu.gittoolbox.a.ad.a(SourceFile:14) at zielu.gittoolbox.a.ag.a(SourceFile:25) at zielu.gittoolbox.c.au.a(SourceFile:7) at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:655) at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:621) ... 20 more ```
zielu commented 1 year ago

Duplicate of #435