-
Notifications
You must be signed in to change notification settings - Fork 115
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
Having a long timeout results in StackOverflowException #388
Comments
I must have not written it in a way to where the tail call optimization kicks in. What timeout setting causes the StackOverflow? If I can repro I can fix it. |
Ok, that was a bit harder to properly reproduce but here is an example where the tail call optimization doesn't work and the stack trace gets longer and longer.
The problem only occurs when the element is not visible. If it's not there at all then the stack trace is small. I'm not sure though if this really solves my problem as there is no stack trace is available when a StackOverflow exception happens. But this might cause it. |
I will try to re-order the recursive calls so that the tail call optimization works and it never causes a stack overflow. Thanks for the repro! |
I moved to a loop instead of recursion which should fix the StackOverflowException. It also cleans up the exception to not have the same message repeated over and over. |
@lefthandedgoat can you try to apply same thing to canopy.mobile? I see SOs from time to time |
Thanks for the update! |
Latest Canopy.Mobile is also fixed. Awesome |
Our application has a pretty long startup time. Therefore I have to set the timeouts to a value bigger than 1 minute. If I now run multiple tests in parallel (with different AppDomains in the same dll) sometimes a StackOverflowException is thrown.
Would it be possible to do the waiting in wait.fs without the recursion?
The text was updated successfully, but these errors were encountered: