-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
StackOverflow Exception when running tests with vstest.console.exe #1227
Comments
Hey, thanks for reporting. by any chance do you have any code (at best minimal and reproducible) that you could show? often times such issues arise when you call something like Click inside WaitForHelpers. |
Hmm glancing at the stack trace, the endless loop seems to happen while generating rendered markup. As far as I know it should not be possible to have a self referring render tree. I would really like to see the component-under-test and test case. |
Hey all Tanks for the immediate response and hints. I tried to isolate the problem but without success. It seems that there is something which influences other tests.... I will try it soon and let you know when i found something. |
Hello I am not able to extract the problem to a separate project. I have some findings:
I build an example, that you can see how the setup and the test case is. I am sorry, i am not allowed to share the code here.... |
Hi @BenSchoen, I just downloaded your sample and ran it in Visual Studio without issues. Also ran fine from |
No it is sadly not possible to let the test fail with the small project.... But the way i set up the test and the component is the same. |
Can you share the full project with us (privately, through email, if needed)? |
I think we have found the culprit. If things go as planned, we will have a preview release soon that you can test out. |
There should be a new 1.24.x-preview release out now. Please give it a go (remember to update both your projects that reference bunit). |
@egil Yes i can confirm that the problem is solved with the 1.24.x-preview |
I have some tests using buint. The tests running in Visualstudio 2022. When running these tests with donet test or vstest.console.exe i got the exception below. I removed some test to check if a dedicated test is responsible for the error, but i had no success.
If i go back to version of bunit 1.18.4 i do not have the issue.
The active test run was aborted. Reason: Test host process crashed : Stack overflow.
at System.Text.StringBuilder.Append(Char ByRef, Int32)
at System.Text.StringBuilder.Append(System.String)
at Bunit.Htmlizer.RenderAttributes(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32, System.String ByRef) at Bunit.Htmlizer.RenderElement(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32)at Bunit.Htmlizer.RenderChildren(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderElement(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32)at Bunit.Htmlizer.RenderChildren(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderElement(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32)at Bunit.Htmlizer.RenderChildComponent(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderChildComponent(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32)at Bunit.Htmlizer.RenderChildComponent(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderChildComponent(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32)at Bunit.Htmlizer.RenderChildComponent(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderChildren(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32)at Bunit.Htmlizer.RenderElement(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderChildComponent(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32)at Bunit.Htmlizer.RenderChildren(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderElement(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32)at Bunit.Htmlizer.RenderChildComponent(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32) at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderFrames(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32, Int32) at Bunit.Htmlizer.RenderChildComponent(HtmlRenderingContext, System.ReadOnlySpan
1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)at Bunit.Htmlizer.RenderCore(HtmlRenderingContext, System.ReadOnlySpan`1<Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame>, Int32)
at Bunit.Htmlizer.RenderFrames(HtmlRenderingCon
The text was updated successfully, but these errors were encountered: