TaskPoolScheduler引发Win32Exception(0x80004005):访问被拒绝(XP,Rx2)



我使用的是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,因为调用堆栈是如此"空":

// 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;
}

感谢

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

你使用哪种确切版本的Rx?你试过最新的吗?

相关内容

  • 没有找到相关文章

最新更新