TaskPoolScheduler抛出Win32Exception(0x80004005):访问被拒绝(XP,Rx2)

时间:2013-07-03 09:10:43

标签: c# system.reactive

我正在使用Reactive Framework 2,但它突然抛出在XP机器上从TaskPoolScheduler抛出Win32Exception,但它看起来不可重复。堆栈跟踪是非常有限的,任何想法?

2013-07-02 15:19:38,209 [31] ERROR MyUnhandledExceptionHandler : AppDomainUnhandledException
System.ComponentModel.Win32Exception (0x80004005): Access is denied
  at System.Reactive.Concurrency.TaskPoolScheduler.<>c_DisplayClass2`1.<>cDisplayClass4.<Schedule>b_1()
  at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
  at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
  at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
  at System.Threading.ThreadHelper.ThreadStart()

它应该来自Rx v1,因为callstack是如此&#34;空&#34;:

// decompiled by ILSpy
public IDisposable Schedule<TState>(TState state, Func<IScheduler, TState, IDisposable> action)
{
    if (action == null)
    {
        throw new ArgumentNullException("action");
    }
    SerialDisposable d = new SerialDisposable();
    CancellationDisposable cancellationDisposable = new CancellationDisposable();
    d.Disposable = cancellationDisposable;
    this.taskFactory.StartNew(delegate
    {
        try
        {
            d.Disposable = action(this, state);
        }
        catch (Exception ex)
        {
            Exception ex2;
            Exception ex = ex2;
            Thread thread = new Thread(delegate
            {
                throw ex; // Here
            });
            thread.Start();
            thread.Join();
        }
    }, cancellationDisposable.Token);
    return d;
}

由于

1 个答案:

答案 0 :(得分:0)

我已下载Rx 2.0.3,但找不到System.Reactive.Concurrency.TaskPoolScheduler.<>c_DisplayClass2'1.<>cDisplayClass4.<Schedule>b_1()。 TaskPoolScheduler位于System.Reactive.PlatformServices.dll(在所有平台上),但它不包含此类子类/方法。

您使用的是哪个Rx版本?你尝试过最新的吗?