【发布时间】:2014-02-27 17:13:35
【问题描述】:
我们已经从 RX1.1.11111.1 迁移到 RX 2.0.20823.2。现在我们遇到了一个来自 EventLoopScheduler 的罕见异常:
an Unhandled Exception occured in non UI thread.
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Reactive.Concurrency.EventLoopScheduler.Run()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
有没有人猜出问题出在哪里?是不是因为我们没有使用 onError 委托,我们的方法之一失败了?
这是代码的要点:
EventLoopScheduler m_scheduler = new EventLoopScheduler();
。 . .
m_receivedMessageHandler.StatusReceived.ObserveOn(m_scheduler) .Subscribe(p_unit => sendAll(m_retransmitManager, m_endPoint));
sendAll 中的异常会导致这种行为吗?
【问题讨论】:
-
可能,但没有看到您的任何代码或扩展的堆栈跟踪信息,这是不可能的。
-
拼写更正可能是值得的,但一些导致错误的实际代码绝对值得。请添加一些代码。
标签: system.reactive reactive-programming