dotnet / dotnet/winforms

Random Fatal error causing test failure

Open
#9,702 5 comments 0 reactions 0 assignees View on GitHub
area-COM test-bug
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

Random exception in test run:
https://github.com/dotnet/winforms/pull/9681#issuecomment-1671816173

```
System.Windows.Forms.Tests.AxHostVisualBasic6Tests.AxHost_SimpleControl_Create [SKIP]
Causes test run to abort, must be run manually.
Fatal error. 0xC0000005
at System.StubHelpers.InterfaceMarshaler.ConvertToManaged(IntPtr ByRef, IntPtr, IntPtr, Int32)
at Interop+Mshtml+IHTMLDocument2.GetLocation()
at System.Windows.Forms.WebBrowser.get_Document()
at System.Windows.Forms.Tests.HtmlElementTests+d__129.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Windows.Forms.Tests.HtmlElementTests+d__129, System.Windows.Forms.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ExecutionContextCallback(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Windows.Forms.Tests.HtmlElementTests+d__129, System.Windows.Forms.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext(System.Threading.Thread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1+AsyncStateMachineBox1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Windows.Forms.Tests.HtmlElementTests+d__129, System.Windows.Forms.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].MoveNext()
at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation+<>c.<.cctor>b__8_0(System.Object)
at DynamicClass.InvokeStub_SendOrPostCallback.Invoke(System.Object, System.Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.Callback(Windows.Win32.Foundation.HWND, Windows.Win32.MessageId, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
at Windows.Win32.PInvoke.DispatchMessage(Windows.Win32.UI.WindowsAndMessaging.MSG*)
at System.Windows.Forms.Application+ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr, Microsoft.Office.msoloop, Void*)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Microsoft.Office.msoloop, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Microsoft.Office.msoloop, System.Windows.Forms.ApplicationContext)
at Xunit.Sdk.ThreadRental+<>c__DisplayClass11_0.b__0()
at System.Threading.Thread.StartCallback()
=== COMMAND LINE ===
"D:\a_work\1\s.dotnet\x86\dotnet.exe" exec --depsfile "D:\a_work\1\s\artifacts\bin\System.Windows.Forms.Tests\Release\net8.0-windows7.0\System.Windows.Forms.Tests.deps.json" --runtimeconfig "D:\a_work\1\s\artifacts\bin\System.Windows.Forms.Tests\Release\net8.0-windows7.0\System.Windows.Forms.Tests.runtimeconfig.json" "D:\a_work\1\s.packages\xunit.runner.console/2.4.2/tools/netcoreapp2.0/xunit.console.dll" "D:\a_work\1\s\artifacts\bin\System.Windows.Forms.Tests\Release\net8.0-windows7.0\System.Windows.Forms.Tests.dll" -noautoreporters -xml "D:\a_work\1\s\artifacts\TestResults\Release\System.Windows.Forms.Tests_net8.0-windows7.0_x86.xml" -html "D:\a_work\1\s\artifacts\TestResults\Release\System.Windows.Forms.Tests_net8.0-windows7.0_x86.html" -notrait Category=IgnoreForCI -notrait Category=failing > "D:\a_work\1\s\artifacts\log\Release\System.Windows.Forms.Tests_net8.0-windows7.0_x86.log" 2>&1
```
Related: #9374

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.