New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IAsyncEnumerable<T> converted to IObservable<T> throws StackOverflowException #1144
Comments
I can't reproduce it in an unit test but with the settings above, it does indeed fail due to some odd recursion:
The source has shifted since the release so this is the failure line actually. |
The example works with another async_enumerable_dotnet.AsyncEnumerable.ToObservable(
Enumerable.Range(0, 20_000)
.ToAsyncEnumerable()
)
.Subscribe(v =>
{
if (v == 500)
{
Console.WriteLine(Environment.StackTrace);
}
Console.WriteLine(v);
}, e => Console.WriteLine(e));
Console.ReadLine(); |
Okay, looks like 4.0.0 uses an outdated implementation for |
There's other benefits in the newer implementation of ToObservable as well that unfortunately didn't see a preview release yet. @onovotny Could you please trigger a preview build for Ix.Async ? |
I plan on getting a new stable build out of both Ix/Rx out very soon. Is this fix in master? |
Perfect, thanks for confirming. I'll get a release out today. |
This was released as far as I can tell, so closing the issue. |
Hi,
An
IObservable
created fromIAsyncEnumberable
throwsSystem.StackOverflowException
when there's a subscriber and enough items in the sequence.
What are the platform(s), environment(s) and related component version(s)?
Which library version?
System.Reactive version 4.3.2
System.Linq.Async version 4.0.0
What is the expected outcome?
I'd expect that a sequence of an unlimited length would be supported.
What is the actual outcome?
After ~2780 items processed
System.StackOverflowException
is thrownWhat is the stacktrace of the exception(s) if any?
I didn't manage to capture a stack trace before the exception gets thrown.
Do you have a code snippet or project that reproduces the problem?
Here's the simplest example I managed to come up with
Program.cs:
csproj:
The text was updated successfully, but these errors were encountered: