0

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

ありがとう

4

1 に答える 1