トップ回答者

Returning 'null' for SelectMany selector results in a very confusing call stack

質問

While developing an application using ReactiveUI 3.1, I'm running into a crash in Rx that I'm really struggling to debug. Check out https://github.com/play/play-windows on the "enable-pusher" branch (I've mirrored the code at http://cl.ly/3V0q3a3N0y3p1D3Q3A0J
if Git's not your thing). Run the

NavigatingToPlayWithCredsShouldStayOnPlay XUnit test, and you'll get the following crash:

回答

It's almost guaranteed that once I make a post to the Rx forums, I immediately discover the bug and it's in my own code :)

This happens when you return null in a SelectMany selector (i.e. someObservable.SelectMany(x => null), though in my app's case it wasn't nearly as obvious). Perhaps Rx should add some null guards that would aide in debugging, as this call stack is pretty
difficult to figure out what's going on.

すべての返信

It's almost guaranteed that once I make a post to the Rx forums, I immediately discover the bug and it's in my own code :)

This happens when you return null in a SelectMany selector (i.e. someObservable.SelectMany(x => null), though in my app's case it wasn't nearly as obvious). Perhaps Rx should add some null guards that would aide in debugging, as this call stack is pretty
difficult to figure out what's going on.