安装Windows更新后崩溃

时间:2013-11-12 21:33:50

标签: .net multithreading system.reactive

我为.Net3.5 SP1 V1.0.2856.0安装了Reactive Extensions。一切都很好我基于一行代码构建了一个Windows服务

 Scheduler.NewThread.Schedule(action, new DateTimeOffset(startDate)); 

线程按时启动但是片刻之后应用程序崩溃: -

System.ArgumentOutOfRangeException was unhandled
   Message="Number must be either non-negative and less than or equal to Int32.MaxValue or -1.\r\nParameter name: timeout"
   Source="mscorlib"
   ParamName="timeout"
   StackTrace:
        at System.Threading.Thread.Sleep(TimeSpan timeout)
        at System.Concurrency.NewThreadScheduler.<>c__DisplayClass1.<Schedule>b__0()
        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
        at System.Threading.ThreadHelper.ThreadStart()
   InnerException: 

我卸载了Windows更新并使用了Reactive Extensions安装程序的修复选项。仍然无济于事。我认为注册表中有一些值已经更改,需要存储回来。

1 个答案:

答案 0 :(得分:0)

由于异常堆栈跟踪建议您正在执行计划的操作,我猜测您传递的操作包含对Thread.Sleep的调用,其值不正确。这是消极的吗?