Note that there are some explanatory texts on larger screens.

plurals
  1. POSubject<T> stops publishing items
    text
    copied!<p>I have a <code>Subject&lt;T&gt;</code> that I'm publishing items into via <code>OnNext</code> and after a while, under load, I get this exception:</p> <pre><code>System.NullReferenceException: Object reference not set to an instance of an object at System.Diagnostics.ExceptionExtensions.PrepareForRethrow (System.Exception exception) [0x00000] in &lt;filename unknown&gt;:0 at System.Concurrency.AsyncLock.Wait (System.Action action) [0x00000] in &lt;filename unknown&gt;:0 at System.Concurrency.Scheduler+&lt;&gt;c__DisplayClass4.&lt;Schedule&gt;b__0 () [0x00000] in &lt;filename unknown&gt;:0 at System.Concurrency.ImmediateScheduler.Schedule (System.Action action) [0x00000] in &lt;filename unknown&gt;:0 at System.Concurrency.Scheduler.Schedule (IScheduler scheduler, System.Action`1 action) [0x00000] in &lt;filename unknown&gt;:0 at System.ScheduledObserver`1[GetNotifyd.Superfeedr.FeedItem].EnsureActive () [0x00000] in &lt;filename unknown&gt;:0 at System.Collections.Generic.Subject`1[GetNotifyd.Superfeedr.FeedItem].OnNext (GetNotifyd.Superfeedr.FeedItem value) [0x00000] in &lt;filename unknown&gt;:0 </code></pre> <p>After this happens I can still publish items via <code>OnNext</code>, but my subscriber no longer receives anything. This is running under mono 2.10.1 using the .NET 3.5 Reactive Extensions DLLs from MS (i.e. i don't think it's mono code that's dying). I haven't seen this happen when I try it on windows, but i haven't run the same loads there. The item that is the argument to OnNext is definitely not null, so that's not the cause.</p> <p>Any idea what might be causing this or how i could recover the Subject, or do i just have to create a new Subject, notify all my subscribers to subscribe to that instead?</p> <p>Since it looks like an Rx issue, i've also reported it on <a href="http://social.msdn.microsoft.com/Forums/en/rx/thread/5d6de85a-5860-4407-adfd-a1ab4dcc8f0a" rel="nofollow">their forum</a></p> <p><strong>Update:</strong> The <a href="http://social.msdn.microsoft.com/Forums/en/rx/thread/5d6de85a-5860-4407-adfd-a1ab4dcc8f0a" rel="nofollow">issue was confirmed</a> as a Rx/mono issue for the combinations of versions i was using. Upgrading to latest Rx (1.0.10605) fixed the problem.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload