"JetDispatcher does not support asynchronous execution" exception in R# tests
When I execute tests with the current Test SDK (v9.1.20150418.124209) I get the exception posted below during TestEnvironmentAssembly`1.SetUp().
I reproduced this by updating the SDK package of https://github.com/controlflow/resharper-heapview from 9.1.20150408.155143 (where the tests ran successfully) to the current 9.1.20150418.124209.
Note the call to UITimebombExplosionReporter.ReportTimebombed() in the stack trace. Does the test environment try to check for a license?
SetUp : JetBrains.TestFramework.Utils.TestLoggerListener+TestWrapperException : 2 exceptions were thrown.
#1: The target dispatcher “JetDispatcher(Runner thread:5)” does not support asynchronous execution or cross-thread marshalling.
--- EXCEPTION #1/2 [InvalidOperationException]
Message = “The target dispatcher “JetDispatcher(Runner thread:5)” does not support asynchronous execution or cross-thread marshalling.”
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
HResult = COR_E_INVALIDOPERATION=80131509
Source = JetBrains.Platform.Util
StackTraceString = “
at JetBrains.Threading.JetDispatcher.AssertAsyncBehaviorSupported()
at JetBrains.Threading.JetDispatcher.BeginInvokeCore(Closure closure)
at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “The target dispatcher “JetDispatcher(Runner thread:5)” does not support asynchronous execution or cross-thread marshalling.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
at JetBrains.DataFlow.CollectionEvents`1.FireAddRemove(AddRemove action, TValue value, Object cookie)
at JetBrains.DataFlow.CollectionEvents`1.InternalAdd(TValue value, Object cookie)
at JetBrains.DataFlow.ICollectionEventsEx.Add[TValue](ICollectionEvents`1 thіs, Lifetime lifetime, TValue value, Object cookie)
at JetBrains.Threading.TimedActionsHost.TimedAction.MarshallingComplete(ICollectionEvents`1 queue)
at JetBrains.Threading.TimedActionsHost.Queue(Lifetime lifetime, String name, Action action, TimeSpan interval, Recurrence recurrence, Rgc guarding)
at JetBrains.Threading.IThreadingEx.QueueAt(IThreading thіs, Lifetime lifetime, String name, TimeSpan interval, Action action)
at JetBrains.UI.Updates.UpdatesManager.Init_Download(IContextBoundSettingsStore store, WebProxySettingsReader webProxySettingsReader)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
at JetBrains.Application.Components.SingletonDescriptor.GetValue()
at JetBrains.Application.Components.SignatureResolution.BindArguments(List`1 argumentDescriptors, String origin)
at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
at JetBrains.Application.Components.SingletonDescriptor.GetValue()
at JetBrains.Application.Components.SignatureResolution.BindArguments(List`1 argumentDescriptors, String origin)
at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
at JetBrains.Application.Components.SingletonDescriptor.GetValue()
at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, IComponentDescriptor dsc)
at JetBrains.Application.Components.ComponentStorage.InstantiateDescriptors(IEnumerable`1 descriptors)
at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
at JetBrains.Application.Environment.RunsProducts.RunProduct(Lifetime lifetimeProduct, IApplicationHost product, JetEnvironment environment, RunningProducts runningProducts, ILogger logger)
at JetBrains.Application.Environment.RunsProducts.<>c__DisplayClass2.<.ctor>b__0(Lifetime lifetimeShouldStart)
at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
at JetBrains.DataFlow.Property`1.PropertyChangeSignal.Acknowledge(Action`1 handler, AddRemove addremove)
at JetBrains.DataFlow.Signal`1.<>c__DisplayClass2.<AdviseCore>b__0()
at JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
at JetBrains.Application.Environment.RunsProducts..ctor(Lifetime lifetime, EnvironmentZones zones, ReportsProductsAllowedToRun reportsProductsAllowedToRun, JetEnvironment environment, RunningProducts runningProducts, IApplicationHost product, ILogger logger, ZoneLicenseChecker zoneLicenseChecker, ZoneUserPreferenceChecker zoneUserPreferenceChecker, TimebombZoneFilter timebombZoneFilter, IInitializationStrategyProvider initializationStrategyProvider)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
at JetBrains.Application.Components.SingletonDescriptor.GetValue()
at JetBrains.Application.Components.SignatureResolution.BindArguments(List`1 argumentDescriptors, String origin)
at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
at JetBrains.Application.Components.SingletonDescriptor.GetValue()
at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, IComponentDescriptor dsc)
at JetBrains.Application.Components.ComponentStorage.InstantiateDescriptors(IEnumerable`1 descriptors)
at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
at JetBrains.Application.Environment.JetEnvironment..ctor(Lifetime lifetime, JetHostParametersCaller host)
at JetBrains.Application.Environment.JetEnvironment.<>c__DisplayClasse.<InternalCreate>b__b()
at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
at JetBrains.Application.Environment.JetEnvironment.InternalCreate(LifetimeDefinition lifetimeDefinition, JetHostParametersCaller host, JetEnvironment& environment)
at JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
at JetBrains.Application.Environment.JetEnvironment.CreateDontRun(Lifetime lifetime, Full hostparams)
at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
at JetBrains.TestFramework.TestEnvironmentAssembly`1.RunEnvironment()
at JetBrains.Util.Logging.Logger.Catch(Action action)
at JetBrains.TestFramework.TestEnvironmentAssembly`1.SetUp()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at NUnit.Core.Reflect.InvokeMethod(MethodInfo method, Object fixture, Object[] args)
at NUnit.Core.TestSuite.DoOneTimeSetUp(TestResult suiteResult)
at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
at NUnit.Core.SetUpFixture.Run(EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.RunAllTests(TestResult suiteResult, EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.Run(EventListener listener, ITestFilter filter)
at NUnit.Core.SimpleTestRunner.Run(EventListener listener, ITestFilter filter, Boolean tracing, LoggingThreshold logLevel)
at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestRunner.Run(EventListener listener, ITestFilter filter)
at JetBrains.ReSharper.UnitTestRunner.nUnit.BuiltInNUnitRunner.RunTests(IRemoteTaskServer server, Dictionary`2 tests, Dictionary`2 fixtures, List`1 explicitly, Boolean useAddins, List`1 assemblies)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(IMessage msg)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
”
#2: The calling thread must be STA, because many UI components require this.
--- EXCEPTION #1/2 [InvalidOperationException]
Message = “The calling thread must be STA, because many UI components require this.”
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
HResult = COR_E_INVALIDOPERATION=80131509
Source = PresentationCore
StackTraceString = “
at System.Windows.Input.InputManager..ctor()
at System.Windows.Input.InputManager.GetCurrentInputManagerImpl()
at System.Windows.Input.KeyboardNavigation..ctor()
at System.Windows.FrameworkElement.EnsureFrameworkServices()
at System.Windows.FrameworkElement..ctor()
at System.Windows.Controls.Control..ctor()
at Avalon.Windows.Controls.TaskDialog..ctor() in c:\work\ReSharper\MainBranch\Platform\tools\WpfContrib\AvalonLibrary\Controls\[TaskDialog]\TaskDialog.cs:line 66
at JetBrains.UI.Application.Env.UITimebombExplosionReporter.ReportTimebombed(ICollection`1 zoneParts, ICollection`1 timebombedProducts)
at JetBrains.Util.ILoggerEx.Catch(ILogger thіs, Action F, ExceptionOrigin origin)
”
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = “The calling thread must be STA, because many UI components require this.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
at JetBrains.Application.Environment.TimebombExplosionReporter.<>c__DisplayClass4.<.ctor>b__0(PropertyChangedEventArgs`1 args)
at JetBrains.DataFlow.Property`1.PropertyChangeSignal.Acknowledge(Action`1 handler, AddRemove addremove)
at JetBrains.DataFlow.Signal`1.<>c__DisplayClass2.<AdviseCore>b__0()
at JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at JetBrains.Application.Extensibility.PartComponentDescriptor.CreateInstanceOf(Type type, IValueResolveContext context)
at JetBrains.Application.Components.SingletonDescriptor.CreateInstanceChecked(OnError onError, IComponentContainer container)
at JetBrains.Application.Components.SingletonDescriptor.GetValue()
at JetBrains.Application.Components.InitializationStrategyDefault.Schedule(Lifetime lifetime, IComponentDescriptor dsc)
at JetBrains.Application.Components.ComponentStorage.InstantiateDescriptors(IEnumerable`1 descriptors)
at JetBrains.Application.Components.ComponentStorage.ComposeDescriptors(ICollection`1 descriptors)
at JetBrains.Application.Environment.JetEnvironment..ctor(Lifetime lifetime, JetHostParametersCaller host)
at JetBrains.Application.Environment.JetEnvironment.<>c__DisplayClasse.<InternalCreate>b__b()
at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
at JetBrains.Application.Environment.JetEnvironment.InternalCreate(LifetimeDefinition lifetimeDefinition, JetHostParametersCaller host, JetEnvironment& environment)
at JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
at JetBrains.Application.Environment.JetEnvironment.CreateDontRun(Lifetime lifetime, Full hostparams)
at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
at JetBrains.TestFramework.TestEnvironmentAssembly`1.RunEnvironment()
at JetBrains.Util.Logging.Logger.Catch(Action action)
at JetBrains.TestFramework.TestEnvironmentAssembly`1.SetUp()
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at NUnit.Core.Reflect.InvokeMethod(MethodInfo method, Object fixture, Object[] args)
at NUnit.Core.TestSuite.DoOneTimeSetUp(TestResult suiteResult)
at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
at NUnit.Core.SetUpFixture.Run(EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.RunAllTests(TestResult suiteResult, EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.RunSuite(EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.RunSuiteInContext(EventListener listener, ITestFilter filter)
at NUnit.Core.TestSuite.Run(EventListener listener, ITestFilter filter)
at NUnit.Core.SimpleTestRunner.Run(EventListener listener, ITestFilter filter, Boolean tracing, LoggingThreshold logLevel)
at JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestRunner.Run(EventListener listener, ITestFilter filter)
at JetBrains.ReSharper.UnitTestRunner.nUnit.BuiltInNUnitRunner.RunTests(IRemoteTaskServer server, Dictionary`2 tests, Dictionary`2 fixtures, List`1 explicitly, Boolean useAddins, List`1 assemblies)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
at System.Threading.Thread.InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args)
at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(IMessage msg)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)
”
at JetBrains.Util.Tests.ThrowsAccumulatedLoggerExceptions.ThrowLoggedExceptions()
at JetBrains.TestFramework.TestEnvironmentAssembly`1.SetUp()
HeapViewHighlightingTest failed
TestBoxing01 failed
TestBoxing02 failed
TestBoxing03 failed
TestClosure01 failed
TestClosure02 failed
TestHeap01 failed
TestHeap02 failed
TestHeap03 failed
TestSlowDelegates01 failed
Please sign in to leave a comment.
In a chat with Slava, he confirmed that there is a time bomb in the current SDK package. He said that for R# 9.1.1 a new package will be published.
Hello,
By mistake we released a EAP flavor of the SDK package to accompany the Wave02
release.
With Wave02 Update 1, we tried to make sure the packages are indeed RTM…
—
Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”
Updated package is on the gallery.
:*