-
Notifications
You must be signed in to change notification settings - Fork 703
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
Tests are crashing again... #3930
Comments
This seems consistent... |
Reopening. Still crashing. This is on #3952 after @BDisp's #3948 was merged: https://github.com/gui-cs/Terminal.Gui/actions/runs/13617816995/job/38063151746?pr=3952
|
Now this on Mac?
|
I added a script to repeatedly run the tests under Ubuntu in WSL. I don't know how many iterations it took (dozens at least), but just got this: [xUnit.net 00:00:43.95] Terminal.Gui.ViewsTests.ContextMenuTests.Draw_A_ContextMenu_Over_A_Top_Dialog [SKIP]
[xUnit.net 00:00:43.99] Terminal.Gui.ViewsTests.ContextMenuTests.Draw_A_ContextMenu_Over_A_Borderless_Top [SKIP]
Skipped Terminal.Gui.ViewsTests.ContextMenuTests.Draw_A_ContextMenu_Over_A_Top_Dialog [1 ms]
Skipped Terminal.Gui.ViewsTests.ContextMenuTests.Draw_A_ContextMenu_Over_A_Borderless_Top [1 ms]
[xUnit.net 00:00:44.07] Terminal.Gui.ViewsTests.ContextMenuTests.Draw_A_ContextMenu_Over_A_Dialog [SKIP]
Skipped Terminal.Gui.ViewsTests.ContextMenuTests.Draw_A_ContextMenu_Over_A_Dialog [1 ms]
[xUnit.net 00:00:44.98] Terminal.Gui.DrawingTests.ColorTests.Constructor_WithColorName_AllChannelsCorrect [SKIP]
Skipped Terminal.Gui.DrawingTests.ColorTests.Constructor_WithColorName_AllChannelsCorrect [1 ms]
[xUnit.net 00:00:44.98] Terminal.Gui.DrawingTests.ColorTests.ToString_WithInvariantCultureAndNullString_IsSameAsParameterless [SKIP]
Skipped Terminal.Gui.DrawingTests.ColorTests.ToString_WithInvariantCultureAndNullString_IsSameAsParameterless [1 ms]
[xUnit.net 00:00:44.98] Terminal.Gui.DrawingTests.ColorTests.Color_ColorName_Get_ReturnsClosestColorName [SKIP]
[xUnit.net 00:00:44.99] Terminal.Gui.DrawingTests.ColorTests.ImplicitOperator_FromColorName_ReturnsCorrectColorValue [SKIP]
[xUnit.net 00:00:44.99] Terminal.Gui.DrawingTests.ColorTests.FindClosestColor_ReturnsClosestColor [SKIP]
Skipped Terminal.Gui.DrawingTests.ColorTests.Color_ColorName_Get_ReturnsClosestColorName [1 ms]
Skipped Terminal.Gui.DrawingTests.ColorTests.ImplicitOperator_FromColorName_ReturnsCorrectColorValue [1 ms]
Skipped Terminal.Gui.DrawingTests.ColorTests.FindClosestColor_ReturnsClosestColor [1 ms]
[xUnit.net 00:00:45.30] Terminal.Gui.ViewTests.ShadowStyleTests.Visual_Test [SKIP]
Skipped Terminal.Gui.ViewTests.ShadowStyleTests.Visual_Test [1 ms]
[xUnit.net 00:00:45.30] Terminal.Gui.ViewTests.ShadowStyleTests.Style_Changes_Magin_Thickness [SKIP]
[xUnit.net 00:00:45.30] Terminal.Gui.ViewTests.ShadowStyleTests.ShadowView_Colors [SKIP]
Skipped Terminal.Gui.ViewTests.ShadowStyleTests.Style_Changes_Magin_Thickness [1 ms]
Skipped Terminal.Gui.ViewTests.ShadowStyleTests.ShadowView_Colors [1 ms]
[xUnit.net 00:00:45.31] Terminal.Gui.ApplicationTests.ApplicationMouseTests.MouseCoordinatesTest_Border(offset: 0, clickX: 8, clickY: 8, expectedX: 7, expectedY: 7, expectedClicked: True) [FAIL]
Failed Terminal.Gui.ApplicationTests.ApplicationMouseTests.MouseCoordinatesTest_Border(offset: 0, clickX: 8, clickY: 8, expectedX: 7, expectedY: 7, expectedClicked: True) [< 1 ms]
Error Message:
Assert.Equal() Failure: Values differ
Expected: True
Actual: False
Stack Trace:
at Terminal.Gui.ApplicationTests.ApplicationMouseTests.MouseCoordinatesTest_Border(Int32 offset, Int32 clickX, Int32 clickY, Int32 expectedX, Int32 expectedY, Boolean expectedClicked) in /home/tig/s/Terminal.Gui/UnitTests/Application/Mouse/ApplicationMouseTests.cs:line 231
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithManyArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) |
Here's one from the new local script: Terminal.Gui.ViewsTests.MenuBarTests.UseSubMenusSingleFrame_True_By_Mouse [SKIP]
Skipped Terminal.Gui.ViewsTests.MenuBarTests.UseSubMenusSingleFrame_True_By_Mouse [1 ms]
[xUnit.net 00:00:09.37] Terminal.Gui.ViewsTests.MultiBarSeriesTests.MultiBarSeriesColors_WrongNumber [FAIL]
Failed Terminal.Gui.ViewsTests.MultiBarSeriesTests.MultiBarSeriesColors_WrongNumber [1 ms]
Error Message:
Microsoft.VisualStudio.TestPlatform.TestHost.DebugAssertException : Method Debug.Fail failed with '
', and was translated to Microsoft.VisualStudio.TestPlatform.TestHost.DebugAssertException to avoid terminating the process hosting the test.
Stack Trace:
at Microsoft.VisualStudio.TestPlatform.TestHost.TestHostTraceListener.GetException(String message) in /_/src/testhost.x86/TestHostTraceListener.cs:line 48
at Microsoft.VisualStudio.TestPlatform.TestHost.TestHostTraceListener.Fail(String message, String detailMessage) in /_/src/testhost.x86/TestHostTraceListener.cs:line 43
at System.Diagnostics.TraceInternal.Fail(String message, String detailMessage)
at System.Diagnostics.Debug.Fail(String message, String detailMessage)
at Terminal.Gui.Application.ResetState(Boolean ignoreDisposed) in /home/tig/s/Terminal.Gui/Terminal.Gui/Application/Application.cs:line 157
at Terminal.Gui.ApplicationImpl.Shutdown() in /home/tig/s/Terminal.Gui/Terminal.Gui/Application/ApplicationImpl.cs:line 217
at Terminal.Gui.Application.Shutdown() in /home/tig/s/Terminal.Gui/Terminal.Gui/Application/Application.Initialization.cs:line 241
at Terminal.Gui.ViewsTests.MultiBarSeriesTests.MultiBarSeriesColors_WrongNumber() in /home/tig/s/Terminal.Gui/UnitTests/Views/GraphViewTests.cs:line 634
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Microsoft.VisualStudio.TestPlatform.Common.ExtensionDecorators.SerialTestRunDecorator.RunTests(IEnumerable`1 sources, IRunContext runContext, IFrameworkHandle frameworkHandle) in /_/src/Microsoft.TestPlatform.Common/ExtensionDecorators/SerialTestRunDecorator.cs:line 57
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.RunTestsWithSources.InvokeExecutor(LazyExtension`2 executor, Tuple`2 executorUriExtensionTuple, RunContext runContext, IFrameworkHandle frameworkHandle) in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/RunTestsWithSources.cs:line 115
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.RunTestInternalWithExecutors(IEnumerable`1 executorUriExtensionMap, Int64 totalTests) in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/BaseRunTests.cs:line 466
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.RunTestsInternal() in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/BaseRunTests.cs:line 346
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.RunTests() in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/BaseRunTests.cs:line 211
at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.ExecutionManager.StartTestRun(Dictionary`2 adapterSourceMap, String package, String runSettings, TestExecutionContext testExecutionContext, ITestCaseEventsHandler testCaseEventsHandler, IInternalTestRunEventsHandler runEventsHandler) in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Execution/ExecutionManager.cs:line 111
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestHandler.<>c__DisplayClass45_4.<OnMessageReceived>b__3() in /_/src/Microsoft.TestPlatform.CrossPlatEngine/EventHandlers/TestRequestHandler.cs:line 480
at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestHandler.<>c.<.ctor>b__31_2(Action action) in /_/src/Microsoft.TestPlatform.CrossPlatEngine/EventHandlers/TestRequestHandler.cs:line 96
at Microsoft.VisualStudio.TestPlatform.Utilities.JobQueue`1.SafeProcessJob(T job) in /_/src/Microsoft.TestPlatform.CoreUtilities/Utilities/JobQueue.cs:line 359
at Microsoft.VisualStudio.TestPlatform.Utilities.JobQueue`1.BackgroundJobProcessor(String threadName) in /_/src/Microsoft.TestPlatform.CoreUtilities/Utilities/JobQueue.cs:line 344
at Microsoft.VisualStudio.TestPlatform.Utilities.JobQueue`1.<.ctor>b__16_0() in /_/src/Microsoft.TestPlatform.CoreUtilities/Utilities/JobQueue.cs:line 135
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
[xUnit.net 00:00:24.59] Terminal.Gui.ApplicationTests.ApplicationMouseTests.MouseGrabView_WithNullMouseEventView [SKIP]
Skipped Terminal.Gui.ApplicationTests.ApplicationMouseTests.MouseGrabView_WithNullMouseEventView [1 ms]
Failed! - Failed: 1, Passed: 12257, Skipped: 14, Total: 12272, Duration: 45 s - UnitTests.dll (net8.0)
Test run failed on iteration 16. Exiting. |
This is not a complete solution, but I was able to reproduce the issue with It looks to me like these tests are not well isolated from each other, so depending on the order they mess with each other's state (just a guess at this point). Another clue that this may be the case is that if I turn back the CursesDriver test then all them fail. So that test does something to affect the other ones. |
Can you please be more clear on "reproduce the issue"? Do you mean the "test host has crashed" issue? |
I pulled your branch and ran the
Which matches the error from here: https://github.com/gui-cs/Terminal.Gui/actions/runs/13619688679/job/38067343228#step:6:5421 Looks like this However, if I add |
I think you're focusing on something different. The stress tests are a WIP in #3954. |
I see what you mean now and I've fixed it. Thanks! |
This is intermittent and non-deterministic.
I "fixed" this previously, but was not sure what I actually did to fix it.
Some test is failing in such a way that it's causing the test process to crash. Pretty sure (based on prior experience) it's NOT the test identified above as it changes from run to run.
If anyone has more experience with these things than I, I'd love help.
The text was updated successfully, but these errors were encountered: