Closed JonathanKeav closed 4 years ago
Hi @JonathanKeav , I'm not seeing any exception when running this on the latest master with a dummy definition of SensorReading. What is the stack trace of the exception?
Hi Peter
I'll give you a brief overview of what i have done so far. I am using the trill samples solution which comes with version 2019.5.1.1 added as a nuget package. I added my own project to this trill samples solution with the code supplied in the original issue above and i see a stack overflow error. So today i updated the trill samples solution to use the latest nuget package, version 2019.9.25.1, but i still have the same error.
I then created a .net core 3.0 console app, downloaded the latest master from here, built and referenced that and i am still getting the same error when i run a linq query like this
var output = streamable1.TumblingWindowLifetime(3)
.Aggregate(
w => w.Count(),
w => w.Average(v => v.Value),
(count, avg) => new { Count = count, Avg = avg });
Below is a screenshot of the error which occurs in StreamMessagePool class in StreamMessagePoolColumnar.cs.
The error details that appear in the screenshot are all that there are. Selecting "View Details" does not provide any further information.
Thanks, Jonathan
StackOverflowException usually means there are too many nested function calls, so a screenshot of the exception text does not really help. Can you please provide the stack trace itself to see what all of thee nested function calls are?
Hey @peterfreiling2 , I was able to reproduce this with his code sample.
Data is here https://gist.github.com/AlgorithmsAreCool/68654a12ac7b9d2af49ac052985d556d
@peterfreiling2
🤔🤔🤔
Edit,
This call should be to DisposeStateLocal()
instead, right?
@AlgorithmsAreCool thanks! Yes, looks like a typo. The repro requirements missing from the original code sample was that we needed row-based execution, and an aggregate state that implements IDisposable.
@AlgorithmsAreCool or @JonathanKeav , would either of you be able to check in the fix? As @AlgorithmsAreCool mentioned, the recursive call to DisposeState should instead be a call to DisposeStateLocal
@peterfreiling2 Made a PR #123
Thanks @AlgorithmsAreCool and @JonathanKeav !
Hi
I've been experimenting with trill and have come across an issue that looks like a bug. If i run the following code I get a stack overflow error.
It might be that I'm using the linq incorrectly but I've tried various changes and it looks like if i want a tumbling window and also an aggregate with a lambda, like average, max or min, i get this error.
Thanks, Jonathan