ForNeVeR / AvaloniaRider

JetBrains Rider plugin for Avalonia development
https://plugins.jetbrains.com/plugin/14839-avaloniarider/
MIT License
452 stars 19 forks source link

Publish Action Triggers Undo Command #421

Closed SeWZC closed 1 month ago

SeWZC commented 2 months ago

When performing the publish action in Rider, it triggers an undo command.

Rider Version: RD-242.20224.431 Plugin Version: 1.4.0

Steps to Reproduce:

  1. Create a new Avalonia project.
  2. Set up a configuration to "Publish to folder" and set Deployment mode to "Self-Contained".
  3. Open a .axaml file and enter a few characters.
  4. Run the "Publish to Folder" configuration.

Observed Behavior:

Expected Behavior:

Additional Information:

ForNeVeR commented 2 months ago

This has nothing to do with the plugin, please report to Rider issue tracker.

SeWZC commented 2 months ago

I'm not certain whether this issue is caused by Rider or the plugin itself. I've observed that the problem occurs during the execution of WriteCommandAction. Specifically, during one of the calls to WriteCommandAction.runWriteCommandAction, an exception is thrown inside com.intellij.openapi.command.impl.UndoManagerImpl.getClientState, namely:

com.intellij.openapi.progress.CeProcessCanceledException: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelling}@55f21370

This exception is caught in com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand, which then leads to an undo being triggered in com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand.

see https://github.com/ForNeVeR/AvaloniaRider/blob/a3ad0fcf93b59db52e3230370b5c094c88bab510/src/rider/main/kotlin/me/fornever/avaloniarider/previewer/AvaloniaPreviewerSessionController.kt#L130

ForNeVeR commented 2 months ago

That's interesting. Could you please show the stack trace?

We don't need write action in there too much, so it's possible to get rid of it.

SeWZC commented 2 months ago

RD-242.20224.284

Stack Trace Triggering the Undo:

undo:455, UndoManagerImpl (com.intellij.openapi.command.impl)
finishCommand:52, CommandProcessorImpl (com.intellij.openapi.command.impl)
lambda$executeCommand$0:234, CoreCommandProcessor (com.intellij.openapi.command.impl)
run:-1, CoreCommandProcessor$$Lambda/0x000000010259ea20 (com.intellij.openapi.command.impl)
lambda$executeNonCancelableSection$3:269, CoreProgressManager (com.intellij.openapi.progress.impl)
compute:-1, CoreProgressManager$$Lambda/0x0000000101358590 (com.intellij.openapi.progress.impl)
registerIndicatorAndRun:735, CoreProgressManager (com.intellij.openapi.progress.impl)
computeUnderProgress:691, CoreProgressManager (com.intellij.openapi.progress.impl)
lambda$computeInNonCancelableSection$4:277, CoreProgressManager (com.intellij.openapi.progress.impl)
compute:-1, CoreProgressManager$$Lambda/0x0000000101358c50 (com.intellij.openapi.progress.impl)
computeInNonCancelableSection:62, Cancellation (com.intellij.openapi.progress)
computeInNonCancelableSection:277, CoreProgressManager (com.intellij.openapi.progress.impl)
executeNonCancelableSection:268, CoreProgressManager (com.intellij.openapi.progress.impl)
executeCommand:233, CoreCommandProcessor (com.intellij.openapi.command.impl)
executeCommand:188, CoreCommandProcessor (com.intellij.openapi.command.impl)
doRunWriteCommandAction:154, WriteCommandAction$BuilderImpl (com.intellij.openapi.command)
lambda$run$0:125, WriteCommandAction$BuilderImpl (com.intellij.openapi.command)
run:-1, WriteCommandAction$BuilderImpl$$Lambda/0x00000001023b9b50 (com.intellij.openapi.command)
lambda 'withClientId' in 'captureClientIdInRunnable':43, ClientIdPropagation (com.intellij.concurrency.client)
withClientId:28, ClientIdPropagation (com.intellij.concurrency.client)
captureClientIdInRunnable$lambda$3:42, ClientIdPropagation (com.intellij.concurrency.client)
run:-1, ClientIdPropagation$$Lambda/0x00000001008c6890 (com.intellij.concurrency.client)
run$$$capture:27, ContextRunnable (com.intellij.util.concurrency)
run:-1, ContextRunnable (com.intellij.util.concurrency)
 - 异步堆栈跟踪
<init>:17, ContextRunnable (com.intellij.util.concurrency)
capturePropagationContext:271, Propagation (com.intellij.util.concurrency)
captureContextCancellationForRunnableThatDoesNotOutliveContextScope:243, AppScheduledExecutorService (com.intellij.util.concurrency)
invokeAndWait:417, ApplicationImpl (com.intellij.openapi.application.impl)
invokeAndWait:437, ApplicationImpl (com.intellij.openapi.application.impl)
run:125, WriteCommandAction$BuilderImpl (com.intellij.openapi.command)
runWriteCommandAction:341, WriteCommandAction (com.intellij.openapi.command)
runWriteCommandAction:329, WriteCommandAction (com.intellij.openapi.command)
setSession:126, AvaloniaPreviewerSessionController (me.fornever.avaloniarider.previewer)
access$setSession:52, AvaloniaPreviewerSessionController (me.fornever.avaloniarider.previewer)
invokeSuspend:329, AvaloniaPreviewerSessionController$start$1 (me.fornever.avaloniarider.previewer)
resumeWith$$$capture:33, BaseContinuationImpl (kotlin.coroutines.jvm.internal)
resumeWith:-1, BaseContinuationImpl (kotlin.coroutines.jvm.internal)
 - 异步堆栈跟踪
<init>:531, DebugProbesImpl$CoroutineOwner (kotlinx.coroutines.debug.internal)
createOwner:510, DebugProbesImpl (kotlinx.coroutines.debug.internal)
probeCoroutineCreated$kotlinx_coroutines_core:497, DebugProbesImpl (kotlinx.coroutines.debug.internal)
probeCoroutineCreated:12, DebugProbesKt (kotlin.coroutines.jvm.internal)
createCoroutineUnintercepted:161, IntrinsicsKt__IntrinsicsJvmKt (kotlin.coroutines.intrinsics)
startCoroutineCancellable:26, CancellableKt (kotlinx.coroutines.intrinsics)
startCoroutineCancellable$default:21, CancellableKt (kotlinx.coroutines.intrinsics)
invoke:88, CoroutineStart (kotlinx.coroutines)
start:123, AbstractCoroutine (kotlinx.coroutines)
launch:52, BuildersKt__Builders_commonKt (kotlinx.coroutines)
launch:1, BuildersKt (kotlinx.coroutines)
launch:49, LifetimeCoroutineUtilKt (com.jetbrains.rd.util.threading.coroutines)
launchBackground:174, RdCoroutinesUtilKt (com.intellij.openapi.rd.util)
launchBackground$default:170, RdCoroutinesUtilKt (com.intellij.openapi.rd.util)
start:318, AvaloniaPreviewerSessionController (me.fornever.avaloniarider.previewer)
invoke:143, AvaloniaPreviewerSessionController$1 (me.fornever.avaloniarider.previewer)
invoke:136, AvaloniaPreviewerSessionController$1 (me.fornever.avaloniarider.previewer)
advise$handleIfChanged:26, CompositePropertyView$change$1 (com.jetbrains.rd.util.reactive)
access$advise$handleIfChanged:18, CompositePropertyView$change$1 (com.jetbrains.rd.util.reactive)
invoke:29, CompositePropertyView$change$1$advise$1 (com.jetbrains.rd.util.reactive)
invoke:29, CompositePropertyView$change$1$advise$1 (com.jetbrains.rd.util.reactive)
fire:32, Signal (com.jetbrains.rd.util.reactive)
setValue:21, Property (com.jetbrains.rd.util.reactive)
invoke:94, BuildHost$viewBuildSession$2 (com.jetbrains.rider.build)
invoke:92, BuildHost$viewBuildSession$2 (com.jetbrains.rider.build)
fire:32, Signal (com.jetbrains.rd.util.reactive)
invoke:33, RdSignal$onWireReceived$2 (com.jetbrains.rd.framework.impl)
invoke:31, RdSignal$onWireReceived$2 (com.jetbrains.rd.framework.impl)
invoke:122, MessageBroker$RdWireableDispatchHelper$doDispatch$2 (com.jetbrains.rd.framework)
invoke:115, MessageBroker$RdWireableDispatchHelper$doDispatch$2 (com.jetbrains.rd.framework)
flushAll:112, RdDispatcher (com.jetbrains.rdclient.protocol)
flushAllRunnable$lambda$0:33, RdDispatcher (com.jetbrains.rdclient.protocol)
captureClientIdInRunnable$lambda$3:43, ClientIdPropagation (com.intellij.concurrency.client)
run$$$capture:27, ContextRunnable (com.intellij.util.concurrency)
run:-1, ContextRunnable (com.intellij.util.concurrency)
 - 异步堆栈跟踪
<init>:17, ContextRunnable (com.intellij.util.concurrency)
capturePropagationContext:285, Propagation (com.intellij.util.concurrency)
invokeLater:281, ApplicationImpl (com.intellij.openapi.application.impl)
repost:217, RdDispatcher (com.jetbrains.rdclient.protocol)
repostConditionally:207, RdDispatcher (com.jetbrains.rdclient.protocol)
queue:181, RdDispatcher (com.jetbrains.rdclient.protocol)
doDispatch:115, MessageBroker$RdWireableDispatchHelper (com.jetbrains.rd.framework)
dispatch:106, MessageBroker$RdWireableDispatchHelper (com.jetbrains.rd.framework)
dispatch$default:38, IRdWireableDispatchHelper$DefaultImpls (com.jetbrains.rd.framework.base)
onWireReceived:115, RdPropertyBase (com.jetbrains.rd.framework.impl)
onWireReceived:63, RdReactiveBase (com.jetbrains.rd.framework.base)
dispatchImpl-311-pGg:94, MessageBroker (com.jetbrains.rd.framework)
dispatch-311-pGg:74, MessageBroker (com.jetbrains.rd.framework)
readMsg:220, SocketWire$Base (com.jetbrains.rd.framework)
receiverProc:186, SocketWire$Base (com.jetbrains.rd.framework)
access$receiverProc:75, SocketWire$Base (com.jetbrains.rd.framework)
invoke:130, SocketWire$Base$2 (com.jetbrains.rd.framework)
invoke:114, SocketWire$Base$2 (com.jetbrains.rd.framework)
fire:32, Signal (com.jetbrains.rd.util.reactive)
set:41, OptProperty (com.jetbrains.rd.util.reactive)
invoke:510, SocketWire$Server$thread$1 (com.jetbrains.rd.framework)
invoke:492, SocketWire$Server$thread$1 (com.jetbrains.rd.framework)
run:30, ThreadsKt$thread$thread$1 (kotlin.concurrent)

Exception Information with Stack Trace:

com.intellij.openapi.progress.CeProcessCanceledException: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelling}@312fab96
    at com.intellij.openapi.progress.Cancellation.checkCancelled(Cancellation.java:39)
    at com.intellij.openapi.progress.impl.CoreProgressManager.doCheckCanceled(CoreProgressManager.java:158)
    at com.intellij.openapi.progress.ProgressManager.checkCanceled(ProgressManager.java:329)
    at com.intellij.serviceContainer.ContainerUtilKt.checkCanceledIfNotInClassInit(containerUtil.kt:16)
    at com.intellij.serviceContainer.ComponentManagerImpl.getComponent(ComponentManagerImpl.kt:668)
    at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:762)
    at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:690)
    at com.intellij.openapi.command.impl.UndoManagerImpl.getClientState(UndoManagerImpl.java:189)
    at com.intellij.openapi.command.impl.UndoManagerImpl.onCommandStarted(UndoManagerImpl.java:247)
    at com.intellij.openapi.command.impl.UndoManagerImpl$MyCommandListener.commandStarted(UndoManagerImpl.java:997)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:722)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:682)
    at com.intellij.util.messages.impl.MessageBusImplKt.executeOrAddToQueue(MessageBusImpl.kt:514)
    at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher.publish$intellij_platform_core(CompositeMessageBus.kt:279)
    at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:471)
    at jdk.proxy2/jdk.proxy2.$Proxy52.commandStarted(Unknown Source)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.fireCommandStarted(CoreCommandProcessor.java:471)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:225)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:188)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:154)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$run$0(WriteCommandAction.java:125)
    at com.intellij.concurrency.client.ClientIdPropagation.captureClientIdInRunnable$lambda$3(ClientIdPropagation.kt:43)
    at com.intellij.util.concurrency.ContextRunnable.run$$$capture(ContextRunnable.java:27)
    at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java)
    at com.intellij.util.concurrency.CancellationRunnable$run$1.invoke(CancellationRunnable.kt:21)
    at com.intellij.util.concurrency.CancellationRunnable$run$1.invoke(CancellationRunnable.kt:21)
    at com.intellij.util.concurrency.Propagation$runAsCoroutine$deferred$1.invokeSuspend(propagation.kt:229)
    at com.intellij.util.concurrency.Propagation$runAsCoroutine$deferred$1.invoke(propagation.kt)
    at com.intellij.util.concurrency.Propagation$runAsCoroutine$deferred$1.invoke(propagation.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:27)
    at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:90)
    at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:123)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.async(Builders.common.kt:87)
    at kotlinx.coroutines.BuildersKt.async(Unknown Source)
    at com.intellij.util.concurrency.Propagation.runAsCoroutine(propagation.kt:224)
    at com.intellij.util.concurrency.CancellationRunnable.run(CancellationRunnable.kt:21)
    at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:229)
    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:836)
    at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:425)
    at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:101)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithImplicitRead(AnyThreadWriteThreadingSupport.kt:122)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWithImplicitRead(ApplicationImpl.java:1162)
    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:696)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$16(IdeEventQueue.kt:590)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithoutImplicitRead(AnyThreadWriteThreadingSupport.kt:117)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:590)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    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$10(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:397)
    at com.intellij.ide.IdeEventQueue.attachClientIdIfNeeded$lambda$27(IdeEventQueue.kt:864)
    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:696)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$16(IdeEventQueue.kt:590)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWithoutImplicitRead(AnyThreadWriteThreadingSupport.kt:117)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:590)
    at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:73)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:357)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1$1.compute(IdeEventQueue.kt:356)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:843)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:356)
    at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.invoke(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke$lambda$0(IdeEventQueue.kt:1035)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:84)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:910)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    at com.intellij.ide.IdeEventQueueKt$performActivity$runnableWithWIL$1.invoke(IdeEventQueue.kt:1035)
    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$10(IdeEventQueue.kt:351)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:397)
    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)
    Suppressed: com.intellij.openapi.progress.CeProcessCanceledException: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelling}@312fab96
        at com.intellij.openapi.progress.Cancellation.checkCancelled(Cancellation.java:39)
        at com.intellij.openapi.progress.impl.CoreProgressManager.doCheckCanceled(CoreProgressManager.java:158)
        at com.intellij.openapi.progress.ProgressManager.checkCanceled(ProgressManager.java:329)
        at com.intellij.serviceContainer.ContainerUtilKt.checkCanceledIfNotInClassInit(containerUtil.kt:16)
        at com.intellij.serviceContainer.ComponentManagerImpl.getComponent(ComponentManagerImpl.kt:668)
        at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:762)
        at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:749)
        at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:690)
        at com.intellij.openapi.command.impl.UndoManagerImpl.getClientState(UndoManagerImpl.java:189)
        at com.intellij.openapi.command.impl.UndoManagerImpl.onCommandStarted(UndoManagerImpl.java:247)
        at com.intellij.openapi.command.impl.UndoManagerImpl$MyCommandListener.commandStarted(UndoManagerImpl.java:997)
        at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:722)
        at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:682)
        at com.intellij.util.messages.impl.MessageBusImplKt.executeOrAddToQueue(MessageBusImpl.kt:514)
        at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher.publish$intellij_platform_core(CompositeMessageBus.kt:310)
        ... 106 more
    Caused by: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelled}@312fab96
        at kotlinx.coroutines.JobSupport.cancel(JobSupport.kt:1551)
        at kotlinx.coroutines.CoroutineScopeKt.cancel(CoroutineScope.kt:284)
        at kotlinx.coroutines.CoroutineScopeKt.cancel$default(CoroutineScope.kt:282)
        at com.jetbrains.rd.util.lifetime.LifetimeDefinition$AdditionalFields.cancel(RLifetime.kt:610)
        at com.jetbrains.rd.util.lifetime.LifetimeDefinition.markCancelingRecursively(RLifetime.kt:438)
    Caused by: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelled}@312fab96

        at com.jetbrains.rd.util.lifetime.LifetimeDefinition.terminate(RLifetime.kt:458)
        at com.jetbrains.rd.util.lifetime.LifetimeDefinition.terminate$default(RLifetime.kt:447)
        at me.fornever.avaloniarider.previewer.AvaloniaPreviewerSessionController.suspend(AvaloniaPreviewerSessionController.kt:345)
        at me.fornever.avaloniarider.previewer.AvaloniaPreviewerSessionController.access$suspend(AvaloniaPreviewerSessionController.kt:52)
        at me.fornever.avaloniarider.previewer.AvaloniaPreviewerSessionController$1.invoke(AvaloniaPreviewerSessionController.kt:140)
        at me.fornever.avaloniarider.previewer.AvaloniaPreviewerSessionController$1.invoke(AvaloniaPreviewerSessionController.kt:136)
        at com.jetbrains.rd.util.reactive.CompositePropertyView$change$1.advise$handleIfChanged(PropertyCombinators.kt:26)
        at com.jetbrains.rd.util.reactive.CompositePropertyView$change$1.access$advise$handleIfChanged(PropertyCombinators.kt:18)
        at com.jetbrains.rd.util.reactive.CompositePropertyView$change$1$advise$1.invoke(PropertyCombinators.kt:29)
        at com.jetbrains.rd.util.reactive.CompositePropertyView$change$1$advise$1.invoke(PropertyCombinators.kt:29)
        at com.jetbrains.rd.util.reactive.Signal.fire(Signal.kt:32)
        at com.jetbrains.rd.util.reactive.Property.setValue(Property.kt:21)
        at com.jetbrains.rd.util.reactive.Property.set(Property.kt:13)
        at com.jetbrains.rider.build.BuildHost.requestBuild(BuildHost.kt:256)
        at com.jetbrains.rider.build.tasks.BuildTaskThrottler$buildSequentially$2$1.invokeSuspend(BuildTaskThrottler.kt:55)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith$$$capture(ContinuationImpl.kt:33)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
        at com.intellij.openapi.application.impl.DispatchedRunnable.run(DispatchedRunnable.kt:44)
        at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:229)
        at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:22)
        at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:211)
        ... 75 more
Caused by: [CIRCULAR REFERENCE: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelled}@312fab96]
Caused by: [CIRCULAR REFERENCE: kotlinx.coroutines.JobCancellationException: Job was cancelled; job=SupervisorJobImpl{Cancelled}@312fab96]
ForNeVeR commented 2 months ago

Thanks! This is something I can work with. Indeed it looks like something's been triggered by the Avalonia plugin.

ruben69695 commented 1 month ago

Having the same issue, at least for now I have the plugin disabled waiting for a possible fix.

d-siebert commented 1 month ago

This same thing is happening when running an Avalonia Cross Platform application (but not an Avalonia MVVM application). I can disable the plugin, and the undo actions stop when I build the application.