Skip to content
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

BlazorWebView - grey screen on one machine #8461

Closed
1 task done
sgacond opened this issue Jul 1, 2022 · 19 comments
Closed
1 task done

BlazorWebView - grey screen on one machine #8461

sgacond opened this issue Jul 1, 2022 · 19 comments
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView external

Comments

@sgacond
Copy link

sgacond commented Jul 1, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hi! I hope i'm on the right repo here, because I'm not sure if the error is caused in WebView2 or in the BlazorWebView control. Feel free to close and point me to the right repo if needed. Thanks in advance!

We use BlazorWebView hosted using the Win Forms Control (Microsoft.AspNetCore.Components.WebView.WindowsForms) and have issues on one particular machine.
The app starts and doesn't load the WebView control (stays "system grey"). The application itself runs fine and (according to our logs) seems to work normally. Just the UI doesn't show up. DevTools aren't available either.

We already tried to reinstall the WebView2 runtime (Evergreen installer). Unfortunately no success.

Expected Behavior

BlazorWebView showing UI like on other machines.

Steps To Reproduce

Unfortunately it's not reproducable on other machines. Therefore I don't have a repro.

HostForm.cs constructor:

    public HostForm()
    {
        var serviceCollection = new ServiceCollection();

        serviceCollection.AddWindowsFormsBlazorWebView();

        // some other application related services...

        _serviceProvider = serviceCollection.BuildServiceProvider();

        var blazor = new BlazorWebView()
        {
            Dock = DockStyle.Fill,
            Padding = new Padding(0, 1, 0, 0),
            HostPage = "wwwroot/index.html",
            Services = _serviceProvider,
        };
        blazor.RootComponents.Add<Main>("#app");

        InitializeComponent();
        Controls.Add(blazor);
    }

Exceptions (if any)

Unfortunately no exception.

.NET Version

6.0.300 (self contained build fails on target machine - win-x64)

Anything else?

The issue persists on only this particular machine.

Machine information (sorry, german localization):

Gerätename	PC-Roman
Prozessor	Intel(R) Core(TM) i7-2760QM CPU @ 2.40GHz   2.40 GHz
Installierter RAM	8,00 GB (7,89 GB verwendbar)
Geräte-ID	CF0ECD01-B39E-4816-92D5-D8C3ADBEC732
Produkt-ID	00330-80000-00000-AA139
Systemtyp	64-Bit-Betriebssystem, x64-basierter Prozessor
Stift- und Toucheingabe	Für diese Anzeige ist keine Stift- oder Toucheingabe verfügbar.

Edition	Windows 10 Pro
Version	21H1
Installiert am	‎29.‎04.‎2021
Betriebssystembuild	19043.1766
Leistung	Windows Feature Experience Pack 120.2212.4180.0

Is it possible to gather more information about this behaviour? I'm struggling finding logs or more information.

@javiercn
Copy link
Member

javiercn commented Jul 1, 2022

@sgacond thanks for contacting us.

I'm not sure how we could troubleshoot this. But I would start by using windbg to break on all thrown exceptions and see if there is a concrete exception that might be causing this.

You might also want to report this to the webview2 repo to see if they can offer you other tips to troubleshoot this.

@javiercn javiercn transferred this issue from dotnet/aspnetcore Jul 1, 2022
@javiercn javiercn added the area-blazor Blazor Hybrid / Desktop, BlazorWebView label Jul 1, 2022
@sgacond
Copy link
Author

sgacond commented Jul 1, 2022

Hi @javiercn
Thanks for following up!

I ran the app using windbg and there are some exceptions in the command window. But windbg didn't break (tried "run until unhandled" and "run until handled"). Unfortunately, i'm not really used to this, sorry...
windbg-log.txt

One is in Line 316+ after loading the WebView2 Loader:

ModLoad: 0000025d`58500000 0000025d`58510000   C:\Users\UserName\AppData\Local\SPLSense\app-0.7.1\System.dll
ModLoad: 00007ff9`047c0000 00007ff9`047e8000   C:\Users\UserName\AppData\Local\SPLSense\app-0.7.1\WebView2Loader.dll
ModLoad: 0000025d`58560000 0000025d`58568000   C:\Users\UserName\AppData\Local\SPLSense\app-0.7.1\System.Text.Encoding.Extensions.dll
(a1c.1e1c): CLR exception - code e0434352 (first chance)
ModLoad: 00007ff9`03a40000 00007ff9`03a61000   C:\Users\UserName\AppData\Local\SPLSense\app-0.7.1\System.Diagnostics.TraceSource.dll
ModLoad: 00007ff8`e02a0000 00007ff8`e039e000   C:\Users\UserName\AppData\Local\SPLSense\app-0.7.1\System.Drawing.Common.dll

There are also unregistered COM classes (Line 411+):

ModLoad: 00007ff9`2dcc0000 00007ff9`2dec0000   C:\Windows\System32\twinapi.appcore.dll
onecore\com\combase\dcomrem\resolver.cxx(2299)\combase.dll!00007FF937BD99FD: (caller: 00007FF937BD5C7A) ReturnHr(1) tid(1e1c) 80040154 Klasse nicht registriert
onecore\com\combase\dcomrem\resolver.cxx(2507)\combase.dll!00007FF937BD5CA2: (caller: 00007FF937BD9265) ReturnHr(2) tid(1e1c) 80040154 Klasse nicht registriert

I also captured a memory dump of the process. Download Memory Dump
The state of the dump is after showing the grey-screen.

@javiercn
Copy link
Member

javiercn commented Jul 1, 2022

@sgacond could you inspect the exception when it happens? You should be able to get the exception name as well as the details.

@sgacond
Copy link
Author

sgacond commented Jul 1, 2022

@javiercn I'm very sorry... I just fought against the preview and the "classic" version of windbg and was only able to get this:
image
I also built a debug-build including all symbols. Can you point me to a doc or something about getting the type of the CLR exception?

@javiercn
Copy link
Member

javiercn commented Jul 1, 2022

@javiercn
Copy link
Member

javiercn commented Jul 1, 2022

0:000> kpL

ChildEBP RetAddr

002de930 79f071ac KERNEL32!RaiseException(unsigned long dwExceptionCode = 0xe0434f4d, unsigned long dwExceptionFlags = 1, unsigned long nNumberOfArguments = 1, unsigned long * lpArguments = 0x002de968)+0x58

002de990 79f9293a mscorwks!RaiseTheExceptionInternalOnly(class Object * throwable = 0x01940e4c, int rethrow = 0, int fForStackOverflow = 0)+0x2a8

If you dump the throwable object it should give you the managed exception

@sgacond
Copy link
Author

sgacond commented Jul 1, 2022

Thank you very much for your support!
I think we're getting there:

ModLoad: 0000017f`d5b90000 0000017f`d5b98000   C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\System.Text.Encoding.Extensions.dll
(2198.7dc): CLR exception - code e0434352 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
KERNELBASE!RaiseException+0x69:
00007ff9`35e54fd9 0f1f440000      nop     dword ptr [rax+rax]

0:000> kpL
 # Child-SP          RetAddr               Call Site
00 0000005e`19f7d950 00007ff8`e0b901be     KERNELBASE!RaiseException+0x69
01 0000005e`19f7da30 00007ff8`e0b8f67f     coreclr!RaiseTheExceptionInternalOnly(class Object * throwable = 0x00000000`00000097, int rethrow = 0n-545869315)+0x28a
02 0000005e`19f7db40 00007ff8`df5606e5     coreclr!IL_Throw(class Object * obj = 0x00000000`00000000)+0xdf
03 0000005e`19f7dca0 00007ff8`df56054a     System_Private_CoreLib!Microsoft.Win32.SafeHandles.SafeFileHandle Microsoft.Win32.SafeHandles.SafeFileHandle::CreateFile+0x105
04 0000005e`19f7dd40 00007ff8`df776ae7     System_Private_CoreLib!Microsoft.Win32.SafeHandles.SafeFileHandle Microsoft.Win32.SafeHandles.SafeFileHandle::Open+0x4a
05 0000005e`19f7ddc0 00007ff8`df771b0b     System_Private_CoreLib!System.IO.Strategies.OSFileStreamStrategy::.ctor+0x77
06 0000005e`19f7de30 00007ff8`df77152b     System_Private_CoreLib!System.IO.Strategies.FileStreamStrategy System.IO.Strategies.FileStreamHelpers::ChooseStrategyCore+0x5b
07 0000005e`19f7deb0 00007ff8`df740123     System_Private_CoreLib!System.IO.Strategies.FileStreamStrategy System.IO.Strategies.FileStreamHelpers::ChooseStrategy+0x5b
08 0000005e`19f7df40 00007ff8`81323bb0     System_Private_CoreLib!System.IO.FileStream System.IO.File::Open+0x73
09 0000005e`19f7dfc0 00007ff8`8131f1dc     0x00007ff8`81323bb0
0a 0000005e`19f7e0c0 00007ff8`8131e11e     0x00007ff8`8131f1dc
0b 0000005e`19f7e1a0 00007ff8`8131da09     0x00007ff8`8131e11e
0c 0000005e`19f7e1f0 00007ff8`8131d8e9     0x00007ff8`8131da09
0d 0000005e`19f7e250 00007ff8`8131d7e2     0x00007ff8`8131d8e9
0e 0000005e`19f7e2b0 00007ff8`8131b878     0x00007ff8`8131d7e2
0f 0000005e`19f7e300 00007ff8`8131b2d6     0x00007ff8`8131b878
10 0000005e`19f7e3b0 00007ff8`8131b20d     0x00007ff8`8131b2d6
11 0000005e`19f7e3f0 00007ff8`8131b178     0x00007ff8`8131b20d
12 0000005e`19f7e430 00007ff8`8131b104     0x00007ff8`8131b178
13 0000005e`19f7e460 00007ff8`8131b048     0x00007ff8`8131b104
14 0000005e`19f7e4b0 00007ff8`8107a99f     0x00007ff8`8131b048
15 0000005e`19f7e4f0 00007ff8`e0bfa853     0x00007ff8`8107a99f
16 0000005e`19f7e6d0 00007ff8`e0afff96     coreclr!CallDescrWorkerInternal+0x83
17 0000005e`19f7e710 00007ff8`e0b71107     coreclr!MethodDescCallSite::CallTargetWorker(unsigned int64 * pArguments = 0x0000005e`19f7e978, unsigned int64 * pReturnValue = 0x00000000`00000000, int cbReturnValue = 0n0)+0x176
18 (Inline Function) --------`--------     coreclr!MethodDescCallSite::Call(void)+0xb
19 0000005e`19f7e840 00007ff8`e0b70f86     coreclr!RunMainInternal(struct Param * pParam = 0x0000005e`19f7e998)+0x11f
1a 0000005e`19f7e970 00007ff8`e0b70e35     coreclr!RunMain(class MethodDesc * pFD = 0x00007ff8`811378b8, int * piRetVal = 0x0000005e`19f7ea60, class PtrArray ** stringArgs = 0x0000005e`19f7edd8)+0xd2
1b 0000005e`19f7ea20 00007ff8`e0b70bf6     coreclr!Assembly::ExecuteMainMethod(class PtrArray ** stringArgs = 0x0000005e`19f7edd8)+0x1c9
1c 0000005e`19f7edb0 00007ff8`e0ba5352     coreclr!CorHost2::ExecuteAssembly(unsigned long dwAppDomainId = <Value unavailable error>, wchar_t * pwzAssemblyPath = 0x00000000`00000001 "--- memory read error at address 0x00000000`00000001 ---", int argc = 0n0, wchar_t ** argv = 0x00000000`00000000, unsigned long * pReturnValue = 0x0000005e`19f7f000)+0x1c6
1d 0000005e`19f7ef20 00007ff9`098296db     coreclr!coreclr_execute_assembly(void * hostHandle = 0x0000017f`b1d9c460, unsigned int domainId = 1, int argc = 0n0, char ** argv = <Value unavailable error>, char * managedAssemblyPath = 0x0000017f`b1cdbd80 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\SPL Sense.dll", unsigned int * exitCode = 0x0000005e`19f7f000)+0xe2
1e (Inline Function) --------`--------     hostpolicy!coreclr_t::execute_assembly(void)+0x2a
1f 0000005e`19f7efc0 00007ff9`09829a0c     hostpolicy!run_app_for_context(struct hostpolicy_context_t * context = 0x0000017f`b1cdc1e0, int argc = 0n0, wchar_t ** argv = <Value unavailable error>)+0x56b
20 0000005e`19f7f160 00007ff9`0982a3a7     hostpolicy!run_app(int argc = 0n0, wchar_t ** argv = 0x0000017f`b1cc7188)+0x3c
21 0000005e`19f7f1a0 00007ff9`1bc5b539     hostpolicy!corehost_main(int argc = 0n1, wchar_t ** argv = 0x0000017f`b1cc7180)+0x107
22 0000005e`19f7f350 00007ff9`1bc5e506     hostfxr!execute_app(class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * impl_dll_dir = <Value unavailable error>, class corehost_init_t * init = 0x0000017f`b1cda4f0, int argc = 0n1, wchar_t ** argv = 0x0000017f`b1cc7180)+0x2e9
23 0000005e`19f7f450 00007ff9`1bc60821     hostfxr!`anonymous namespace'::read_config_and_execute(class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * host_command = 0x0000005e`19f7f780 "", struct host_startup_info_t * host_info = <Value unavailable error>, class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * app_candidate = <Value unavailable error>, class std::unordered_map<enum known_options,std::vector<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,known_options_hash,std::equal_to<enum known_options>,std::allocator<std::pair<enum known_options const ,std::vector<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > > > > * opts = <Value unavailable error>, int new_argc = 0n1, wchar_t ** new_argv = 0x0000017f`b1cc7180, host_mode_t mode = apphost (0n2), bool is_sdk_command = false, wchar_t * out_buffer = 0x00000000`00000000 "", int buffer_size = 0n0, int * required_buffer_size = 0x00000000`00000000)+0xa6
24 0000005e`19f7f550 00007ff9`1bc5eb62     hostfxr!fx_muxer_t::handle_exec_host_command(class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * host_command = 0x0000005e`19f7f780 "", struct host_startup_info_t * host_info = 0x0000005e`19f7f7a0, class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * app_candidate = 0x0000005e`19f7f6c0 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\SPL Sense.dll", class std::unordered_map<enum known_options,std::vector<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,known_options_hash,std::equal_to<enum known_options>,std::allocator<std::pair<enum known_options const ,std::vector<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > > > > * opts = 0x0000005e`19f7f670 { size=0x0 }, int argc = 0n1, wchar_t ** argv = 0x0000017f`b1cc7180, int argoff = 0n1, host_mode_t mode = apphost (0n2), bool is_sdk_command = false, wchar_t * result_buffer = 0x00000000`00000000 "", int buffer_size = 0n0, int * required_buffer_size = 0x00000000`00000000)+0x161
25 0000005e`19f7f600 00007ff9`1bc582ab     hostfxr!fx_muxer_t::execute(class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * host_command = 0x0000005e`19f7f780 "", int argc = 0n1, wchar_t ** argv = 0x0000017f`b1cc7180, struct host_startup_info_t * host_info = 0x0000005e`19f7f7a0, wchar_t * result_buffer = 0x00000000`00000000 "", int buffer_size = 0n0, int * required_buffer_size = 0x00000000`00000000)+0x482
*** WARNING: Unable to verify checksum for apphost.exe
26 0000005e`19f7f740 00007ff7`31ec24b8     hostfxr!hostfxr_main_startupinfo(int argc = 0n1, wchar_t ** argv = 0x0000017f`b1cc7180, wchar_t * host_path = 0x0000017f`b1cd7be0 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\SPL Sense.exe", wchar_t * dotnet_root = 0x0000017f`b1cd79f0 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\", wchar_t * app_path = 0x0000017f`b1cd7cd0 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\SPL Sense.dll")+0xab
27 0000005e`19f7f840 00007ff7`31ec282b     apphost!exe_start(int argc = 0n1, wchar_t ** argv = 0x0000017f`b1cc7180)+0x8d8
28 0000005e`19f7fa10 00007ff7`31ec3cd8     apphost!wmain(int argc = 0n1, wchar_t ** argv = 0x0000017f`b1cc7180)+0xab
29 (Inline Function) --------`--------     apphost!invoke_main(void)+0x22
2a 0000005e`19f7fa40 00007ff9`36d87034     apphost!__scrt_common_main_seh(void)+0x10c
2b 0000005e`19f7fa80 00007ff9`38562651     KERNEL32!BaseThreadInitThunk+0x14
2c 0000005e`19f7fab0 00000000`00000000     ntdll!RtlUserThreadStart+0x21
0:000> dx -r1 ((coreclr!Object *)0x97)
((coreclr!Object *)0x97)                 : 0x97 [Type: Object *]
    [<Raw View>]     [Type: Object]
    [Type]           : Unable to read memory at Address 0x97
    [Header]         [Type: ObjHeader]

I tried to unveil this "Unable to read memory at Address 0x97" by trying to read it after one more step over, but it seems to be out of scope then the debugger stopped (after configuration using the instructions in the link above).

Also with "dump object":
image
(same result on exception break and after one more step)

@javiercn
Copy link
Member

javiercn commented Jul 1, 2022

@sgacond that's weird, what happens if you try to do !DumpObject

@javiercn
Copy link
Member

javiercn commented Jul 1, 2022

The other thing that you can try is, once you are in that state, search for all the exceptions in the heap

@sgacond
Copy link
Author

sgacond commented Jul 1, 2022

Unfortunately same result (just edited it in the answer above)

image
(same result on exception break and after one more step)

@sgacond
Copy link
Author

sgacond commented Jul 1, 2022

--- deleted

Ok... it was the wrong one. Sorry! Please disregard.
This was the first break because of the log file. The second is the one causing the window to stop loading.

@sgacond
Copy link
Author

sgacond commented Jul 1, 2022

This should be right break point now:

0:000> kpL
 # Child-SP          RetAddr               Call Site
00 00000039`b4f7ab10 00007ff8`e19c01be     KERNELBASE!RaiseException+0x69
01 00000039`b4f7abf0 00007ff8`e19bf67f     coreclr!RaiseTheExceptionInternalOnly(class Object * throwable = 0x00007ff8`820cbb70, int rethrow = 0n-2113094664)+0x28a
02 00000039`b4f7ad00 00007ff8`825a232c     coreclr!IL_Throw(class Object * obj = 0x00000000`00000000)+0xdf
03 00000039`b4f7ae60 00007ff8`825a216c     0x00007ff8`825a232c
04 00000039`b4f7aed0 00007ff8`825a20fd     0x00007ff8`825a216c
05 00000039`b4f7af20 00007ff8`825a1834     0x00007ff8`825a20fd
06 00000039`b4f7af60 00007ff8`825a118e     0x00007ff8`825a1834
07 00000039`b4f7afd0 00007ff8`e0a7ba7b     0x00007ff8`825a118e
08 00000039`b4f7b150 00007ff8`e0a7bb52     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncIteratorMethodBuilder::MoveNext+0x7b
09 00000039`b4f7b1b0 00007ff8`825a106a     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncIteratorMethodBuilder::MoveNext+0x152
0a 00000039`b4f7b1f0 00007ff9`284d23a7     0x00007ff8`825a106a
0b 00000039`b4f7b260 00007ff8`8238d84d     Microsoft_Extensions_Hosting_Abstractions!System.Threading.Tasks.Task Microsoft.Extensions.Hosting.BackgroundService::StartAsync+0x77
0c 00000039`b4f7b2b0 00007ff8`e09dc4b5     0x00007ff8`8238d84d
0d 00000039`b4f7b3e0 00007ff8`e083d679     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0x65
0e 00000039`b4f7b410 00007ff8`e09dc5f3     System_Private_CoreLib!System.Threading.ExecutionContext::RunInternal+0x69
0f 00000039`b4f7b480 00007ff8`e09dc54c     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0x1a3
10 00000039`b4f7b4f0 00007ff8`e0859354     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0xfc
11 00000039`b4f7b520 00007ff8`e0858ec7     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation+<>c::<.cctor>b__17_0+0x14
12 00000039`b4f7b550 00007ff8`e0858556     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation::RunCallback+0x47
13 00000039`b4f7b5a0 00007ff8`e08542d8     System_Private_CoreLib!System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation::Run+0x56
14 00000039`b4f7b5f0 00007ff8`e0853f16     System_Private_CoreLib!System.Threading.Tasks.Task::RunContinuations+0x3b8
15 00000039`b4f7b6d0 00007ff8`e09d8347     System_Private_CoreLib!System.Threading.Tasks.Task::FinishContinuations+0x36
16 00000039`b4f7b710 00007ff8`e09db335     System_Private_CoreLib!System.Threading.ThreadLocal`1+FinalizationHelper[System.Threading.Tasks.ConcurrentExclusiveSchedulerPair+ProcessingMode]::Finalize+0x3267
17 00000039`b4f7b760 00007ff8`e089f6df     System_Private_CoreLib!System.Threading.Tasks.UnwrapPromise`1+<>c[System.Threading.Tasks.VoidTaskResult]::<InvokeCoreAsync>b__8_0+0x6d5
18 00000039`b4f7b7a0 00007ff8`82390cf9     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult+0x3f
19 00000039`b4f7b7e0 00007ff8`e09dc4b5     0x00007ff8`82390cf9
1a 00000039`b4f7ba60 00007ff8`e083d679     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0x65
1b 00000039`b4f7ba90 00007ff8`e09dc5f3     System_Private_CoreLib!System.Threading.ExecutionContext::RunInternal+0x69
1c 00000039`b4f7bb00 00007ff8`e09dc54c     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0x1a3
1d 00000039`b4f7bb70 00007ff8`e0859354     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0xfc
1e 00000039`b4f7bba0 00007ff8`e0858ec7     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation+<>c::<.cctor>b__17_0+0x14
1f 00000039`b4f7bbd0 00007ff8`e0858556     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation::RunCallback+0x47
20 00000039`b4f7bc20 00007ff8`e08542d8     System_Private_CoreLib!System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation::Run+0x56
21 00000039`b4f7bc70 00007ff8`e0853f16     System_Private_CoreLib!System.Threading.Tasks.Task::RunContinuations+0x3b8
22 00000039`b4f7bd50 00007ff8`e09d8347     System_Private_CoreLib!System.Threading.Tasks.Task::FinishContinuations+0x36
23 00000039`b4f7bd90 00007ff8`e09db335     System_Private_CoreLib!System.Threading.ThreadLocal`1+FinalizationHelper[System.Threading.Tasks.ConcurrentExclusiveSchedulerPair+ProcessingMode]::Finalize+0x3267
24 00000039`b4f7bde0 00007ff8`e089f6df     System_Private_CoreLib!System.Threading.Tasks.UnwrapPromise`1+<>c[System.Threading.Tasks.VoidTaskResult]::<InvokeCoreAsync>b__8_0+0x6d5
25 00000039`b4f7be20 00007ff8`823c56bb     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult+0x3f
26 00000039`b4f7be60 00007ff8`e09dc4b5     0x00007ff8`823c56bb
27 00000039`b4f7bef0 00007ff8`e083d679     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0x65
28 00000039`b4f7bf20 00007ff8`e09dc5f3     System_Private_CoreLib!System.Threading.ExecutionContext::RunInternal+0x69
29 00000039`b4f7bf90 00007ff8`e09dc54c     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0x1a3
2a 00000039`b4f7c000 00007ff8`e0859354     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0xfc
2b 00000039`b4f7c030 00007ff8`e0858ec7     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation+<>c::<.cctor>b__17_0+0x14
2c 00000039`b4f7c060 00007ff8`e0858556     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation::RunCallback+0x47
2d 00000039`b4f7c0b0 00007ff8`e08542d8     System_Private_CoreLib!System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation::Run+0x56
2e 00000039`b4f7c100 00007ff8`e0853f16     System_Private_CoreLib!System.Threading.Tasks.Task::RunContinuations+0x3b8
2f 00000039`b4f7c1e0 00007ff8`e09d8347     System_Private_CoreLib!System.Threading.Tasks.Task::FinishContinuations+0x36
30 00000039`b4f7c220 00007ff8`e09db335     System_Private_CoreLib!System.Threading.ThreadLocal`1+FinalizationHelper[System.Threading.Tasks.ConcurrentExclusiveSchedulerPair+ProcessingMode]::Finalize+0x3267
31 00000039`b4f7c270 00007ff8`e089f6df     System_Private_CoreLib!System.Threading.Tasks.UnwrapPromise`1+<>c[System.Threading.Tasks.VoidTaskResult]::<InvokeCoreAsync>b__8_0+0x6d5
32 00000039`b4f7c2b0 00007ff8`823bc84a     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult+0x3f
33 00000039`b4f7c2f0 00007ff8`e09dc4b5     0x00007ff8`823bc84a
34 00000039`b4f7c550 00007ff8`e083d679     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0x65
35 00000039`b4f7c580 00007ff8`e09dc5f3     System_Private_CoreLib!System.Threading.ExecutionContext::RunInternal+0x69
36 00000039`b4f7c5f0 00007ff8`e09dc54c     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0x1a3
37 00000039`b4f7c660 00007ff8`e0859354     System_Private_CoreLib!System.Threading.Tasks.TaskFactory`1+<>c__DisplayClass38_0`1[System.Threading.Tasks.VoidTaskResult, System.__Canon]::<FromAsyncImpl>b__0+0xfc
38 00000039`b4f7c690 00007ff8`e0858ec7     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation+<>c::<.cctor>b__17_0+0x14
39 00000039`b4f7c6c0 00007ff8`e0858556     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation::RunCallback+0x47
3a 00000039`b4f7c710 00007ff8`e08542d8     System_Private_CoreLib!System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation::Run+0x56
3b 00000039`b4f7c760 00007ff8`e0853f16     System_Private_CoreLib!System.Threading.Tasks.Task::RunContinuations+0x3b8
3c 00000039`b4f7c840 00007ff8`e0a006f0     System_Private_CoreLib!System.Threading.Tasks.Task::FinishContinuations+0x36
3d 00000039`b4f7c880 00007ff8`e0a06921     System_Private_CoreLib!System.Threading.QueueUserWorkItemCallbackDefaultContext`1[System.__Canon]::Execute+0x660
3e 00000039`b4f7c8d0 00007ff8`e0a068e5     System_Private_CoreLib!System.Collections.IEnumerator System.Runtime.InteropServices.MemoryMarshal+<ToEnumerable>d__18`1[System.__Canon]::System.Collections.IEnumerable.GetEnumerator+0x201
3f 00000039`b4f7c910 00007ff8`82394de7     System_Private_CoreLib!System.Collections.IEnumerator System.Runtime.InteropServices.MemoryMarshal+<ToEnumerable>d__18`1[System.__Canon]::System.Collections.IEnumerable.GetEnumerator+0x1c5
40 00000039`b4f7c950 00007ff8`e0a2e7b5     0x00007ff8`82394de7
41 00000039`b4f7cb90 00007ff8`e083d679     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+DebugFinalizableAsyncStateMachineBox`1[System.__Canon, System.__Canon]::.ctor+0x25
42 00000039`b4f7cbc0 00007ff8`e0a2e8f3     System_Private_CoreLib!System.Threading.ExecutionContext::RunInternal+0x69
43 00000039`b4f7cc30 00007ff8`e0a2e84c     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+DebugFinalizableAsyncStateMachineBox`1[System.__Canon, System.__Canon]::.ctor+0x163
44 00000039`b4f7cca0 00007ff8`e0859354     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+DebugFinalizableAsyncStateMachineBox`1[System.__Canon, System.__Canon]::.ctor+0xbc
45 00000039`b4f7ccd0 00007ff8`e0858ec7     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation+<>c::<.cctor>b__17_0+0x14
46 00000039`b4f7cd00 00007ff8`e0858556     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation::RunCallback+0x47
47 00000039`b4f7cd50 00007ff8`e08542d8     System_Private_CoreLib!System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation::Run+0x56
48 00000039`b4f7cda0 00007ff8`e0853f16     System_Private_CoreLib!System.Threading.Tasks.Task::RunContinuations+0x3b8
49 00000039`b4f7ce80 00007ff8`e0a006f0     System_Private_CoreLib!System.Threading.Tasks.Task::FinishContinuations+0x36
4a 00000039`b4f7cec0 00007ff8`e0a06921     System_Private_CoreLib!System.Threading.QueueUserWorkItemCallbackDefaultContext`1[System.__Canon]::Execute+0x660
4b 00000039`b4f7cf10 00007ff8`e0a068e5     System_Private_CoreLib!System.Collections.IEnumerator System.Runtime.InteropServices.MemoryMarshal+<ToEnumerable>d__18`1[System.__Canon]::System.Collections.IEnumerable.GetEnumerator+0x201
4c 00000039`b4f7cf50 00007ff8`82396f6a     System_Private_CoreLib!System.Collections.IEnumerator System.Runtime.InteropServices.MemoryMarshal+<ToEnumerable>d__18`1[System.__Canon]::System.Collections.IEnumerable.GetEnumerator+0x1c5
4d 00000039`b4f7cf90 00007ff8`e0a2e7b5     0x00007ff8`82396f6a
4e 00000039`b4f7d100 00007ff8`e083d679     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+DebugFinalizableAsyncStateMachineBox`1[System.__Canon, System.__Canon]::.ctor+0x25
4f 00000039`b4f7d130 00007ff8`e0a2e8f3     System_Private_CoreLib!System.Threading.ExecutionContext::RunInternal+0x69
50 00000039`b4f7d1a0 00007ff8`e0a2e84c     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+DebugFinalizableAsyncStateMachineBox`1[System.__Canon, System.__Canon]::.ctor+0x163
51 00000039`b4f7d210 00007ff8`e0859354     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+DebugFinalizableAsyncStateMachineBox`1[System.__Canon, System.__Canon]::.ctor+0xbc
52 00000039`b4f7d240 00007ff8`e0858ec7     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation+<>c::<.cctor>b__17_0+0x14
53 00000039`b4f7d270 00007ff8`e0858556     System_Private_CoreLib!System.Threading.Tasks.AwaitTaskContinuation::RunCallback+0x47
54 00000039`b4f7d2c0 00007ff8`e08542d8     System_Private_CoreLib!System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation::Run+0x56
55 00000039`b4f7d310 00007ff8`e0853f16     System_Private_CoreLib!System.Threading.Tasks.Task::RunContinuations+0x3b8
56 00000039`b4f7d3f0 00007ff8`e0a006f0     System_Private_CoreLib!System.Threading.Tasks.Task::FinishContinuations+0x36
57 00000039`b4f7d430 00007ff8`e0a06921     System_Private_CoreLib!System.Threading.QueueUserWorkItemCallbackDefaultContext`1[System.__Canon]::Execute+0x660
58 00000039`b4f7d480 00007ff8`e0a068e5     System_Private_CoreLib!System.Collections.IEnumerator System.Runtime.InteropServices.MemoryMarshal+<ToEnumerable>d__18`1[System.__Canon]::System.Collections.IEnumerable.GetEnumerator+0x201
59 00000039`b4f7d4c0 00007ff8`82397956     System_Private_CoreLib!System.Collections.IEnumerator System.Runtime.InteropServices.MemoryMarshal+<ToEnumerable>d__18`1[System.__Canon]::System.Collections.IEnumerable.GetEnumerator+0x1c5
5a 00000039`b4f7d500 00007ff8`e0a2e7b5     0x00007ff8`82397956
5b 00000039`b4f7d5e0 00007ff8`e083d679     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+DebugFinalizableAsyncStateMachineBox`1[System.__Canon, System.__Canon]::.ctor+0x25
5c 00000039`b4f7d610 00007ff8`e0a2e8f3     System_Private_CoreLib!System.Threading.ExecutionContext::RunInternal+0x69
5d 00000039`b4f7d680 00007ff8`e0a2e84c     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+DebugFinalizableAsyncStateMachineBox`1[System.__Canon, System.__Canon]::.ctor+0x163
5e 00000039`b4f7d6f0 00007ff8`e08588b4     System_Private_CoreLib!System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+DebugFinalizableAsyncStateMachineBox`1[System.__Canon, System.__Canon]::.ctor+0xbc
5f 00000039`b4f7d720 00007ff8`e1a2a853     System_Private_CoreLib!System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation+<>c::<.cctor>b__8_0+0x14
60 00000039`b4f7d750 00007ff8`e1950350     coreclr!CallDescrWorkerInternal+0x83
61 (Inline Function) --------`--------     coreclr!CallDescrWorkerWithHandler(void)+0x30
62 00000039`b4f7d790 00007ff8`e19520ac     coreclr!CallDescrWorkerReflectionWrapper(struct CallDescrData * pCallDescrData = 0x00000039`b4f7dce0, class Frame * pFrame = 0x00000000`00000000)+0x48
63 00000039`b4f7d7e0 00007ff8`e08be297     coreclr!RuntimeMethodHandle::InvokeMethod(class Object * target = 0x00000000`00000000, class Span<Object *> * objs = 0x00000039`b4f7deb8, class SignatureNative * pSigUNSAFE = 0x00000000`00000000, bool fConstructor = false, bool fWrapExceptions = true)+0x91c
64 00000039`b4f7de60 00007ff8`e072f297     System_Private_CoreLib!System.Object System.Reflection.RuntimeMethodInfo::Invoke+0xe7
65 00000039`b4f7df30 00007ff8`e0730219     System_Private_CoreLib!System.Object System.Delegate::DynamicInvokeImpl+0x57
66 00000039`b4f7df80 00007ff8`df5b475c     System_Private_CoreLib!System.Object System.Delegate::DynamicInvoke+0x29
67 00000039`b4f7dfb0 00007ff8`df5b45ec     System_Windows_Forms!System.Windows.Forms.Control::InvokeMarshaledCallbackDo+0x12c
68 00000039`b4f7dff0 00007ff8`e083d679     System_Windows_Forms!System.Windows.Forms.Control::InvokeMarshaledCallbackHelper+0x3c
69 00000039`b4f7e040 00007ff8`e083d5ff     System_Private_CoreLib!System.Threading.ExecutionContext::RunInternal+0x69
6a 00000039`b4f7e0b0 00007ff8`df5b4590     System_Private_CoreLib!System.Threading.ExecutionContext::Run+0xf
6b 00000039`b4f7e0e0 00007ff8`df5b485f     System_Windows_Forms!System.Windows.Forms.Control::InvokeMarshaledCallback+0x80
6c 00000039`b4f7e120 00007ff8`df5c3bac     System_Windows_Forms!System.Windows.Forms.Control::InvokeMarshaledCallbacks+0xdf
6d 00000039`b4f7e190 00007ff8`df89986e     System_Windows_Forms!System.Windows.Forms.Control::WndProc+0xa1c
6e 00000039`b4f7e220 00007ff8`df8999a4     System_Windows_Forms!System.Windows.Forms.Control+ControlNativeWindow::OnMessage+0x1e
6f 00000039`b4f7e250 00007ff8`df7220d3     System_Windows_Forms!System.Windows.Forms.Control+ControlNativeWindow::WndProc+0xf4
70 00000039`b4f7e2a0 00007ff8`8214f610     System_Windows_Forms!System.IntPtr System.Windows.Forms.NativeWindow::Callback+0x93
71 00000039`b4f7e310 00007ff9`3788e858     0x00007ff8`8214f610
72 00000039`b4f7e390 00007ff9`3788e299     USER32!UserCallWinProcCheckWow+0x2f8
73 00000039`b4f7e520 00007ff8`823a0fdb     USER32!DispatchMessageWorker+0x249
74 00000039`b4f7e5a0 00007ff8`df87d9ec     0x00007ff8`823a0fdb
75 00000039`b4f7e660 00007ff8`df88004d     System_Windows_Forms!Interop+BOOL System.Windows.Forms.Application+ComponentManager::Interop.Mso.IMsoComponentManager.FPushMessageLoop+0x26c
76 00000039`b4f7e750 00007ff8`df87fd38     System_Windows_Forms!System.Windows.Forms.Application+ThreadContext::RunMessageLoopInner+0x2cd
77 00000039`b4f7e7f0 00007ff8`df574dd6     System_Windows_Forms!System.Windows.Forms.Application+ThreadContext::RunMessageLoop+0x48
78 00000039`b4f7e850 00007ff8`81e9abce     System_Windows_Forms!System.Windows.Forms.Application::Run+0x56
79 00000039`b4f7e890 00007ff8`e1a2a853     0x00007ff8`81e9abce
7a 00000039`b4f7ea70 00007ff8`e192ff96     coreclr!CallDescrWorkerInternal+0x83
7b 00000039`b4f7eab0 00007ff8`e19a1107     coreclr!MethodDescCallSite::CallTargetWorker(unsigned int64 * pArguments = 0x00000039`b4f7ed18, unsigned int64 * pReturnValue = 0x00000000`00000000, int cbReturnValue = 0n0)+0x176
7c (Inline Function) --------`--------     coreclr!MethodDescCallSite::Call(void)+0xb
7d 00000039`b4f7ebe0 00007ff8`e19a0f86     coreclr!RunMainInternal(struct Param * pParam = 0x00000039`b4f7ed38)+0x11f
7e 00000039`b4f7ed10 00007ff8`e19a0e35     coreclr!RunMain(class MethodDesc * pFD = 0x00007ff8`81f578b8, int * piRetVal = 0x00000039`b4f7ee00, class PtrArray ** stringArgs = 0x00000039`b4f7f178)+0xd2
7f 00000039`b4f7edc0 00007ff8`e19a0bf6     coreclr!Assembly::ExecuteMainMethod(class PtrArray ** stringArgs = 0x00000039`b4f7f178)+0x1c9
80 00000039`b4f7f150 00007ff8`e19d5352     coreclr!CorHost2::ExecuteAssembly(unsigned long dwAppDomainId = <Value unavailable error>, wchar_t * pwzAssemblyPath = 0x00000000`00000001 "--- memory read error at address 0x00000000`00000001 ---", int argc = 0n0, wchar_t ** argv = 0x00000000`00000000, unsigned long * pReturnValue = 0x00000039`b4f7f3a0)+0x1c6
81 00000039`b4f7f2c0 00007ff9`191196db     coreclr!coreclr_execute_assembly(void * hostHandle = 0x000001f6`8926c460, unsigned int domainId = 1, int argc = 0n0, char ** argv = <Value unavailable error>, char * managedAssemblyPath = 0x000001f6`891abd80 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\SPL Sense.dll", unsigned int * exitCode = 0x00000039`b4f7f3a0)+0xe2
82 (Inline Function) --------`--------     hostpolicy!coreclr_t::execute_assembly(void)+0x2a
83 00000039`b4f7f360 00007ff9`19119a0c     hostpolicy!run_app_for_context(struct hostpolicy_context_t * context = 0x000001f6`891ac1e0, int argc = 0n0, wchar_t ** argv = <Value unavailable error>)+0x56b
84 00000039`b4f7f500 00007ff9`1911a3a7     hostpolicy!run_app(int argc = 0n0, wchar_t ** argv = 0x000001f6`89197188)+0x3c
85 00000039`b4f7f540 00007ff9`1bc5b539     hostpolicy!corehost_main(int argc = 0n1, wchar_t ** argv = 0x000001f6`89197180)+0x107
86 00000039`b4f7f6f0 00007ff9`1bc5e506     hostfxr!execute_app(class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * impl_dll_dir = <Value unavailable error>, class corehost_init_t * init = 0x000001f6`891aa4f0, int argc = 0n1, wchar_t ** argv = 0x000001f6`89197180)+0x2e9
87 00000039`b4f7f7f0 00007ff9`1bc60821     hostfxr!`anonymous namespace'::read_config_and_execute(class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * host_command = 0x00000039`b4f7fb20 "", struct host_startup_info_t * host_info = <Value unavailable error>, class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * app_candidate = <Value unavailable error>, class std::unordered_map<enum known_options,std::vector<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,known_options_hash,std::equal_to<enum known_options>,std::allocator<std::pair<enum known_options const ,std::vector<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > > > > * opts = <Value unavailable error>, int new_argc = 0n1, wchar_t ** new_argv = 0x000001f6`89197180, host_mode_t mode = apphost (0n2), bool is_sdk_command = false, wchar_t * out_buffer = 0x00000000`00000000 "", int buffer_size = 0n0, int * required_buffer_size = 0x00000000`00000000)+0xa6
88 00000039`b4f7f8f0 00007ff9`1bc5eb62     hostfxr!fx_muxer_t::handle_exec_host_command(class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * host_command = 0x00000039`b4f7fb20 "", struct host_startup_info_t * host_info = 0x00000039`b4f7fb40, class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * app_candidate = 0x00000039`b4f7fa60 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\SPL Sense.dll", class std::unordered_map<enum known_options,std::vector<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > >,known_options_hash,std::equal_to<enum known_options>,std::allocator<std::pair<enum known_options const ,std::vector<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >,std::allocator<std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > > > > > > * opts = 0x00000039`b4f7fa10 { size=0x0 }, int argc = 0n1, wchar_t ** argv = 0x000001f6`89197180, int argoff = 0n1, host_mode_t mode = apphost (0n2), bool is_sdk_command = false, wchar_t * result_buffer = 0x00000000`00000000 "", int buffer_size = 0n0, int * required_buffer_size = 0x00000000`00000000)+0x161
89 00000039`b4f7f9a0 00007ff9`1bc582ab     hostfxr!fx_muxer_t::execute(class std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > * host_command = 0x00000039`b4f7fb20 "", int argc = 0n1, wchar_t ** argv = 0x000001f6`89197180, struct host_startup_info_t * host_info = 0x00000039`b4f7fb40, wchar_t * result_buffer = 0x00000000`00000000 "", int buffer_size = 0n0, int * required_buffer_size = 0x00000000`00000000)+0x482
8a 00000039`b4f7fae0 00007ff7`31ec24b8     hostfxr!hostfxr_main_startupinfo(int argc = 0n1, wchar_t ** argv = 0x000001f6`89197180, wchar_t * host_path = 0x000001f6`891a7be0 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\SPL Sense.exe", wchar_t * dotnet_root = 0x000001f6`891a79f0 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\", wchar_t * app_path = 0x000001f6`891a7cd0 "C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\SPL Sense.dll")+0xab
8b 00000039`b4f7fbe0 00007ff7`31ec282b     apphost!exe_start(int argc = 0n1, wchar_t ** argv = 0x000001f6`89197180)+0x8d8
8c 00000039`b4f7fdb0 00007ff7`31ec3cd8     apphost!wmain(int argc = 0n1, wchar_t ** argv = 0x000001f6`89197180)+0xab
8d (Inline Function) --------`--------     apphost!invoke_main(void)+0x22
8e 00000039`b4f7fde0 00007ff9`36d87034     apphost!__scrt_common_main_seh(void)+0x10c
8f 00000039`b4f7fe20 00007ff9`38562651     KERNEL32!BaseThreadInitThunk+0x14
90 00000039`b4f7fe50 00000000`00000000     ntdll!RtlUserThreadStart+0x21

Exception Object dump:

0:000> !do 0x7ff8820cbb70
Name:        System.InvalidOperationException
MethodTable: 00007ff8820cbbf8
EEClass:     00007ff8820d19a8
Tracked Type: false
Size:        128(0x80) bytes
File:        C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\System.Private.CoreLib.dll
Fields:
              MT    Field   Offset                 Type VT     Attr            Value Name
00007ff8820e75f0  4000236        8 ...ection.MethodBase  0 instance 0000000000000000 _exceptionMethod
00007ff881f2d698  4000237       10        System.String  0 instance 000000000000030a _message
00007ff881f314e0  4000238       18 ...tions.IDictionary  0 instance 0020000d2300139e _data
00007ff881f2f048  4000239       20     System.Exception  0 instance 0000000000000000 _innerException
00007ff881f2d698  400023a       28        System.String  0 instance 0028000e2302139f _helpURL
00007ff8820f8628  400023b       30        System.Byte[]  0 instance 00007ff881ea65d0 _stackTrace
00007ff8820f8628  400023c       38        System.Byte[]  0 instance 00007ff8e07949d0 _watsonBuckets
00007ff881f2d698  400023d       40        System.String  0 instance 0028000f230513a0 _stackTraceString
00007ff881f2d698  400023e       48        System.String  0 instance 00007ff881ea65d8 _remoteStackTraceString
00007ff881e7b578  400023f       50      System.Object[]  0 instance 0000000000000000 _dynamicMethods
00007ff881f2d698  4000240       58        System.String  0 instance 00280010230813a1 _source
00007ff881f25148  4000241       60       System.UIntPtr  1 instance 00007FF881EA65E0 _ipForWatsonBuckets
00007ff881f24228  4000242       68        System.IntPtr  1 instance 0000000000000000 _xptrs
00007ff881f19480  4000243       70         System.Int32  1 instance              -40 _xcode
00007ff881f19480  4000244       74         System.Int32  1 instance               -1 _HResult

Print Exception

0:000> !pe 0x7ff8820cbb70
Exception object: 00007ff8820cbb70
Exception type:   System.InvalidOperationException
Message:          <Invalid Object>
InnerException:   <none>
StackTrace (generated):
    SP               IP               Function
    00055F5E86F723E9 01005E5FB83E8BE9 System_Private_CoreLib!!0,!!1,!!2,ResultCode>, !!0, !!1, !!2, System.String ByRef)+0xb83e8bea
    00545E5FB838A3E8 01505E5FB838ABE9 System_Private_CoreLib!0, !1, !2, !3)+0xb838abea
    00005E5FB835E3E8 0000000000000003 System_Private_CoreLib!System.IComparable`1[[System.ValueTuple`4[[System.__Canon, System.Private.CoreLib],[System.__Canon, System.Private.CoreLib],[System.Int32, System.Private.CoreLib],[System.Int32, System.Private.CoreLib]], System.Private.CoreLib]].CompareTo(System.ValueTuple`4<System.__Canon,System.__Canon,Int32,Int32>)+0x4
    00005E5FB835A3E8 00007FF8820CE719 System_Private_CoreLib!System.String.Create[[System.ValueTuple`4[[System.String, System.Private.CoreLib],[System.Globalization.CultureInfo, System.Private.CoreLib],[System.Int32, System.Private.CoreLib],[System.Int32, System.Private.CoreLib]], System.Private.CoreLib]](Int32, System.ValueTuple`4<System.String,System.Globalization.CultureInfo,Int32,Int32>, System.Buffers.SpanAction`2<Char,System.ValueTuple`4<System.String,System.Globalization.CultureInfo,Int32,Int32>>)+0x820ce71a
    00005F5E8A35E3E9 00007FF8820CE969 System_Private_CoreLib!System.String.Equals(System.Object)+0xa1984449
    00095E5FB831C3E8 01065E5FB831CBE9 System_Text_RegularExpressions!System.Text.RegularExpressions.RegexCharClass+SingleRange[].Get(Int32)+0xb831cbea
    002E5E5FB83003E8 012C5E5FB8300BE9 System_Private_CoreLib!System.ReadOnlyMemory`1[[System.Char, System.Private.CoreLib]]..ctor(Char[])+0xb8300bea
    00085E5FB82FA3E8 01055E5FB82FABE9 System_Private_CoreLib!System.Comparison`1[[System.Text.RegularExpressions.RegexCharClass+SingleRange, System.Text.RegularExpressions]]..ctor(System.Object, IntPtr)+0xb82fabea
    000E5E5FB82E03E8 010C5E5FB82E0BE9 System_Private_CoreLib!System.Collections.Generic.IDictionary`2[[System.__Canon, System.Private.CoreLib],[System.Int32, System.Private.CoreLib]].get_Item(System.__Canon)+0xb82e0bea
    00085E5FB827A3E8 01065E5FB827ABE9 System_Private_CoreLib!System.Collections.Generic.IReadOnlyDictionary`2[[System.__Canon, System.Private.CoreLib],[System.Int32, System.Private.CoreLib]].ContainsKey(System.__Canon)+0xb827abea
    000A5E5FB825E3E8 01085E5FB825EBE9 System_Private_CoreLib!0, !1)+0xb825ebea
    00325E5FB824C3E8 012E5E5FB824CBE9 System_Private_CoreLib!System.Collections.Generic.Dictionary`2+Enumerator[[System.__Canon, System.Private.CoreLib],[System.Int32, System.Private.CoreLib]]..ctor(System.Collections.Generic.Dictionary`2<System.__Canon,Int32>, Int32)+0xb824cbea
    000F5E5FB82283E8 010C5E5FB8228BE9 System_Text_RegularExpressions!System.Text.RegularExpressions.RegexReplacement..ctor(System.String, System.Text.RegularExpressions.RegexNode, System.Collections.Hashtable)+0xb8228bea
    00085FFFFFF75FE9 01055E5FB8220BE9 System_Text_RegularExpressions!System.Text.RegularExpressions.RegexLWCGCompiler..ctor()+0xb8220bea
    00695E5FB820A3E8 01665E5FB820ABE9 System_Private_CoreLib!System.Reflection.MethodBase.GetMethodFromHandle(System.RuntimeMethodHandle)+0xb820abea
    001A5E5FB816C3E8 01165E5FB816CBE9 System_Private_CoreLib!System.Runtime.CompilerServices.ConditionalWeakTable`2..ctor()+0xb816cbea
    001E5E5FB81563E8 011C5E5FB8156BE9 System_Private_CoreLib!0,!1>)+0xb8156bea
    00195F5E97AF53E9 01175E5FB80F0BE9 System_Private_CoreLib!System.Buffers.ArrayPoolEventSource..ctor(Int32)+0xb80f0bea
    00035F5E90FDE3E9 01005E5FB80C0BE9 System_Private_CoreLib!System.SR.get_NullabilityInfoContext_NotSupported()+0xb80c0bea
    00085E5FB80B83E8 01055E5FB80B8BE9 System_Private_CoreLib!System.Func`2[[System.__Canon, System.Private.CoreLib],[System.Boolean, System.Private.CoreLib]]..ctor(System.Object, IntPtr)+0xb80b8bea
    00045E5FB80B63E8 01025E5FB80B6BE9 System_Private_CoreLib!System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1+<>c..cctor()+0xb80b6bea
    00FC5E5FB803E3E8 01F95E5FB803EBE9 System_Private_CoreLib!System.SR.get_LockRecursionException_RecursiveWriteNotAllowed()+0xb803ebea
    00FC5E5FB7F903E8 01F95E5FB7F90BE9 System_Private_CoreLib!System.SR.get_IndexOutOfRange_ArrayRankIndex()+0xb7f90bea
    00FC5E5FB7EE23E8 01F95E5FB7EE2BE9 System_Private_CoreLib!System.SR.get_Argument_InvalidEnumValue()+0xb7ee2bea
    00FC5E5FB7E343E8 01F95E5FB7E34BE9 System_Private_CoreLib!System.SR.InternalGetResourceString(System.String)+0xd7684829
    00045E5FB7DE63E8 01025E5FB7DE6BE9 System_Private_CoreLib!System.Buffers.TlsOverPerCoreLockedStacksArrayPool`1+<>c[[System.Char, System.Private.CoreLib]]..cctor()+0xd745f4c9
    00715E5FB7D923E8 016F5E5FB7D92BE9 System_Private_CoreLib!System.Reflection.RuntimeModule..ctor()+0xb7d92bea
    00FB5E5FB7D1A3E8 01F25E5FB7D1ABE9 System_Private_CoreLib!System.Reflection.RuntimeAssembly..ctor()+0xb7d1abea
    00005F5EA066D3E9 00007FF8820F6CC9 System_Private_CoreLib!System.Reflection.RuntimeAssembly.GetPublicKey()+0xa18432f9
    00005E5FB7D163E8 00007FF8820F6D61 System_Private_CoreLib!System.Reflection.RuntimeAssembly.GetModulesInternal(Boolean, Boolean)+0x820f6d62
    008E5E5FB7CC03E8 018B5F5EA3734BEA System_Private_CoreLib!System.Reflection.Emit.SignatureHelper.GetMethodSigHelper(System.Reflection.Module, System.Type, System.Type[])+0xa3734beb
    004E5E5FB7CAA3E8 014B5E5FB7CAABE9 System_Private_CoreLib!System.Reflection.Emit.ModuleBuilder.DefineGlobalMethod(System.String, System.Reflection.MethodAttributes, System.Type, System.Type[])+0xb7caabea
    001E5E5FB7C663E8 011B5E5FB7C66BE9 System_Private_CoreLib!System.Reflection.Emit.TypeBuilder.DefineEventNoLock(System.String, System.Reflection.EventAttributes, System.Type)+0xb7c66bea
    00095E5FB7C423E8 01065E5FB7C42BE9 System_Private_CoreLib!System.Reflection.Emit.Label[].Get(Int32)+0xb7c42bea
    00005F00000EC3E9 00007FF8820FCD01 System_Private_CoreLib!System.SpanHelpers.Fill[[System.Int32, System.Private.CoreLib]](Int32 ByRef, UIntPtr, Int32)+0x24ddc1
    00005E5FB7C3E3E8 00007FF8820FD661 System_Private_CoreLib!System.Runtime.CompilerServices.RuntimeHelpers.IsReferenceOrContainsReferences[T]()+0x820fd662
    00005E5FB7C3C3E8 00007FF8820FD711 System_Private_CoreLib!!0 ByRef, IntPtr)+0x820fd712
    00005E5FB7C3A3E8 00007FF8820FD7C1 System_Private_CoreLib!Internal.Runtime.CompilerServices.Unsafe.SizeOf[T]()+0x820fd7c2
    00005E5FB7B943E8 0000000000000003 System_Private_CoreLib!!0 ByRef)+0x4
    00005E5FB7B923E8 00007FF8820FD931 System_Private_CoreLib!Internal.Runtime.CompilerServices.Unsafe.As[[System.Int32, System.Private.CoreLib],[System.Byte, System.Private.CoreLib]](Int32 ByRef)+0x820fd932
    00005E5FB7B903E8 00007FF8820FD9F1 System_Private_CoreLib!Internal.Runtime.CompilerServices.Unsafe.WriteUnaligned[[System.Numerics.Vector`1[[System.Byte, System.Private.CoreLib]], System.Private.CoreLib]](Byte ByRef, System.Numerics.Vector`1<Byte>)+0x820fd9f2
    00005E5FB7B8E3E8 00007FF8820FDAA9 System_Private_CoreLib!!0 ByRef)+0x820fdaaa
    00005E5FB7B8C3E8 00007FF8820FDB69 System_Private_CoreLib!!0 ByRef)+0x820fdb6a
    00065E5FB7B5C3E8 01045E5FB7B5CBE9 System_Private_CoreLib!0)+0xb7b5cbea
    00585E5FB7B1C3E8 01555E5FB7B1CBE9 System_Private_CoreLib!System.RuntimeType+RuntimeTypeCache..ctor(System.RuntimeType)+0xd73d4d19
    00035E5FB7B003E8 01005E5FB7B00BE9 System_Private_CoreLib!System.Runtime.CompilerServices.QCallTypeHandle..ctor(System.RuntimeType ByRef)+0xb7b00bea
    00575F5E9CE193E9 01555E5FB7ACABE9 System_Private_CoreLib!System.Text.UTF8Encoding.get_PreambleSpan()+0xb7acabea
    00185F00005003E9 01155E5FB7AB6BE9 System_Private_CoreLib!System.Text.Unicode.Utf16Utility.AllCharsInUInt32AreAscii(UInt32)+0xb7ab6bea
    00245E5FB7A783E8 01215E5FB7A78BE9 System_Private_CoreLib!System.Text.UnicodeUtility.GetPlane(UInt32)+0xb7a78bea
    00ED5E5FB7A483E8 01EA5E5FB7A48BE9 System_Private_CoreLib!System.Runtime.Intrinsics.Arm.AdvSimd+Arm64.TransposeOdd(System.Runtime.Intrinsics.Vector128`1<Int16>, System.Runtime.Intrinsics.Vector128`1<Int16>)+0xb7a48bea
    00FC5E5FB79E83E8 01F95E5FB79E8BE9 System_Private_CoreLib!System.Runtime.Intrinsics.Arm.AdvSimd+Arm64.MultiplyRoundedDoublingSaturateHighScalar(System.Runtime.Intrinsics.Vector64`1<Int32>, System.Runtime.Intrinsics.Vector64`1<Int32>)+0xb79e8bea
    00FC5E5FB793A3E8 01F95E5FB793ABE9 System_Private_CoreLib!System.Runtime.Intrinsics.Arm.AdvSimd+Arm64.get_IsSupported()+0xb793abea
    00005E5FB78FA3E8 5FB78EE8E9F90001 System_Private_CoreLib!System.MdUtf8String.ToString()+0xe9f90002
    00FC5E5FB78CE3E8 01F95E5FB78CEBE9 System_Private_CoreLib!System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedAdd(System.Runtime.Intrinsics.Vector128`1<UInt32>, System.Runtime.Intrinsics.Vector128`1<UInt32>, Byte)+0xb78cebea
    00FC5E5FB78203E8 01F95E5FB7820BE9 System_Private_CoreLib!System.Runtime.Intrinsics.Arm.AdvSimd.ReverseElement8(System.Runtime.Intrinsics.Vector128`1<Int32>)+0xb7820bea
    00FC5E5FB77723E8 01F95E5FB7772BE9 System_Private_CoreLib!System.Runtime.Intrinsics.Arm.AdvSimd.MultiplyBySelectedScalar(System.Runtime.Intrinsics.Vector64`1<Int32>, System.Runtime.Intrinsics.Vector128`1<Int32>, Byte)+0xb7772bea
    00FC5E5FB76FE3E8 01F95E5FB76FEBE9 System_Private_CoreLib!System.Runtime.Intrinsics.Arm.AdvSimd.FusedMultiplyAdd(System.Runtime.Intrinsics.Vector64`1<Single>, System.Runtime.Intrinsics.Vector64`1<Single>, System.Runtime.Intrinsics.Vector64`1<Single>)+0xb76febea
    00FC5E5FB76503E8 01F95E5FB7650BE9 System_Private_CoreLib!System.Runtime.Intrinsics.Arm.AdvSimd.AddWideningLower(System.Runtime.Intrinsics.Vector64`1<UInt16>, System.Runtime.Intrinsics.Vector64`1<UInt16>)+0xb7650bea
    00005E5FB75E63E8 00007FF88210FB59 System_Private_CoreLib!System.MdUtf8String..ctor(Byte*, Int32)+0x8210fb5a
    00005E5FB75E43E8 00007FF88210FB89 System_Private_CoreLib!System.MdUtf8String.EqualsCaseInsensitive(System.MdUtf8String)+0x8210fb8a
    00005E5FB75E23E8 00007FF88210FBB9 System_Private_CoreLib!System.MdUtf8String.ToString()+0x8210fbba
    001A5E5FB75C43E8 01185E5FB75C4BE9 System_Private_CoreLib!System.Runtime.Intrinsics.Vector128`1[[System.UInt32, System.Private.CoreLib]].get_Count()+0xb75c4bea
    001B5E5FB75BC3E8 01185E5FB75BCBE9 System_Private_CoreLib!System.Runtime.Intrinsics.X86.Sse2+X64.get_IsSupported()+0xb75bcbea
    00005E5FB75BA3E8 00007FF8821108E9 System_Private_CoreLib!System.Runtime.Intrinsics.Vector128.AsUInt32[[System.Byte, System.Private.CoreLib]](System.Runtime.Intrinsics.Vector128`1<Byte>)+0x821108ea
    000A5F5EB3FDF3E9 01085E5FB7582BE9 System_Private_CoreLib!System.RuntimeType+ListBuilder`1[[System.__Canon, System.Private.CoreLib]]..ctor(Int32)+0xb7582bea
    004B5E5FB75743E8 01495E5FB7574BE9 System_Private_CoreLib!System.RuntimeFieldHandle..ctor(System.IRuntimeFieldInfo)+0xb7574bea
    008D5F5EA09A83E9 018A5F5EA0990BEA System_Private_CoreLib!System.Reflection.RuntimeMethodInfo.get_InvocationFlags()+0xa0990beb
    00005F5E9C6D43E9 0000000000000003 System_Private_CoreLib!System.Text.UTF8Encoding.GetBytes(Char*, Int32, Byte*, Int32)+0x1f7838a3
    00005E5FB74A43E8 00007FF882113361 System_Private_CoreLib!System.Buffer.Memmove[[System.Reflection.RuntimeFieldInfo, System.Private.CoreLib]](System.Reflection.RuntimeFieldInfo ByRef, System.Reflection.RuntimeFieldInfo ByRef, UIntPtr)+0x82113362
    00005E5FB74A23E8 00007FF882113459 System_Private_CoreLib!System.RuntimeType+RuntimeTypeCache.GetMemberCache[[System.Reflection.RuntimeMethodInfo, System.Private.CoreLib]](MemberInfoCache`1<System.Reflection.RuntimeMethodInfo> ByRef)+0x8211345a
    00095E5FB749C3E8 01065E5FB749CBE9 System_Private_CoreLib!System.RuntimeTypeHandle+IntroducedMethodEnumerator..ctor(System.RuntimeType)+0xb749cbea
    00205E5FB74283E8 011E5E5FB7428BE9 System_Private_CoreLib!System.BadImageFormatException..ctor(System.String, Int32)+0xb7428bea
    000C5E5FB74243E8 010A5E5FB7424BE9 System_Private_CoreLib!System.Reflection.Binder..ctor()+0xb7424bea
    00075E5FB74123E8 01045E5FB7412BE9 System_Private_CoreLib!System.Type+<>c..cctor()+0xd6cbc3b9
    00005F5EA0B1D3E9 00007FF8821164A9 System_Private_CoreLib!System.Reflection.RuntimeParameterInfo.get_ParameterType()+0xa1854f19
    00000000683D65EE 0000000000000001 System_Private_CoreLib!Internal.Runtime.CompilerServices.Unsafe.As[[System.Runtime.CompilerServices.CastHelpers+ArrayElement[], System.Private.CoreLib]](System.Object)+0x2
    00007FF881F09578 0000000000000001 System_Private_CoreLib!System.Runtime.CompilerServices.CastHelpers.LdelemaRef(System.Array, Int32, Void*)+0x7e177e01
    0000000006000557 0000000000000002 System_Private_CoreLib!System.Runtime.ConstrainedExecution.CriticalFinalizerObject.Finalize()+0x3
    00000000683D65AB 0000000000000001 System_Private_CoreLib!Internal.Runtime.CompilerServices.Unsafe.Add[[System.Char, System.Private.CoreLib]](Char ByRef, IntPtr)+0x2
    000000006DEA0EA5 0000000000000001 System_Private_CoreLib!Internal.Runtime.CompilerServices.Unsafe.ReadUnaligned[[System.Runtime.Intrinsics.Vector128`1[[System.UInt16, System.Private.CoreLib]], System.Private.CoreLib]](Byte ByRef)+0x2
    0000000000000000 0000000000000001 System_Private_CoreLib!System.Runtime.InteropServices.MemoryMarshal.GetReference[[System.Byte, System.Private.CoreLib]](System.ReadOnlySpan`1<Byte>)+0x1f5a49f1
    0000000000000000 0000000000000001 SPL_Sense!ApplicationConfiguration.Initialize()+0x7deb7ea1
   ...

... omitted rest - the stack trace is huuuuuge... see attached text file.
huge-stack-trace-from-pe.txt

@javiercn
Copy link
Member

javiercn commented Jul 1, 2022

@sgacond do you see anything if you inspect _message or _innerException?

00205E5FB74283E8 011E5E5FB7428BE9 System_Private_CoreLib!System.BadImageFormatException..ctor(System.String, Int32)+0xb7428bea

Check that the bitness of the executable and the OS matches, or that the .NET installation in the machine is solid. You can try publish the app as self-contained too

@sgacond
Copy link
Author

sgacond commented Jul 1, 2022

@javiercn First of all, thanks again for your patience. I think I'm fishing in the dark and I was really unsure if I was inspecting the right exceptions.

So I tried to remove unnecessary things (squirrel update worker, logger, ...) that could lead to other exceptions.

After this, I did another clean self contained build (was self contained already) in debug mode.
The bitness should be correct (--runtime win-x64), just checked system info again.

Now, windbg doesn't break anymore. Even with sxe clr and sxe 0xe0434f4d set.
Therefore I suppose, there were no managed exceptions anymore.

But, the behavior stayed. So I breaked and looked at all the exceptions on the heap:

0:017> !dumpheap -type Exception
         Address               MT     Size
0000019c0cfb1118 00007ff87a6ef2b8      128     
0000019c0cfb1198 00007ff87a6ef3b8      128     
0000019c0cfb1218 00007ff87a6ef4b8      128     
0000019c0cfed6b8 00007ff87aec1900       40     
0000019c0cfed6e0 00007ff87aec1900       40     
0000019c0cfed708 00007ff87aec1798       96     
0000019c0cfedaf8 00007ff87aec1900       32     
0000019c0cff5768 00007ff87ac15260       24     
0000019c0cff5780 00007ff87ac15388       24     
0000019c0d040278 00007ff87ad09ab0       64     
0000019c0d05d3f8 00007ff87aec1900       40     
0000019c0d05d420 00007ff87aec1900       40     
0000019c0d05d448 00007ff87aec1798       96     
0000019c0d05fe90 00007ff87aec1900       32     
0000019c0d083fe8 00007ff87af2e918       64     
0000019c0d0841f8 00007ff87af2f228       64     
0000019c0d084420 00007ff87af2f478       64     

Statistics:
              MT    Count    TotalSize Class Name
00007ff87ac15388        1           24 System.Text.DecoderExceptionFallback
00007ff87ac15260        1           24 System.Text.EncoderExceptionFallback
00007ff87af2f478        1           64 System.Action`5[[Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.Abstractions],[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.Exception, System.Private.CoreLib]]
00007ff87af2f228        1           64 System.Action`5[[Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.Abstractions],[System.Type, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.Exception, System.Private.CoreLib]]
00007ff87af2e918        1           64 System.Action`4[[Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.Abstractions],[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.Exception, System.Private.CoreLib]]
00007ff87ad09ab0        1           64 System.Func`3[[Microsoft.Extensions.Logging.FormattedLogValues, Microsoft.Extensions.Logging.Abstractions],[System.Exception, System.Private.CoreLib],[System.String, System.Private.CoreLib]]
00007ff87a6ef4b8        1          128 System.ExecutionEngineException
00007ff87a6ef3b8        1          128 System.StackOverflowException
00007ff87a6ef2b8        1          128 System.OutOfMemoryException
00007ff87aec1798        2          192 System.Reflection.Emit.__ExceptionInfo
00007ff87aec1900        6          224 System.Reflection.Emit.__ExceptionInfo[]
Total 17 objects

I think this is a textual search, therefore only the "real" exception are: ExecutionEngineException, StackOverflowException and OutOfMemoryException.

I tried to dump all three, but all with null pointers for _message or _stackTraceString:

ExecutionEngineException:

0:017> !DumpObj /d 0000019c0cfb1218
Name:        System.ExecutionEngineException
MethodTable: 00007ff87a6ef4b8
EEClass:     00007ff87a6ca560
Tracked Type: false
Size:        128(0x80) bytes
File:        C:\Users\User Name\Desktop\splsense-debugging\debug-version\net6.0-windows\System.Private.CoreLib.dll
Fields:
              MT    Field   Offset                 Type VT     Attr            Value Name
00007ff87a7ef260  4000236        8 ...ection.MethodBase  0 instance 0000000000000000 _exceptionMethod
00007ff87a6ed698  4000237       10        System.String  0 instance 0000000000000000 _message
00007ff87a6f14e0  4000238       18 ...tions.IDictionary  0 instance 0000000000000000 _data
00007ff87a6ef048  4000239       20     System.Exception  0 instance 0000000000000000 _innerException
00007ff87a6ed698  400023a       28        System.String  0 instance 0000000000000000 _helpURL
00007ff87a9e5280  400023b       30        System.Byte[]  0 instance 0000000000000000 _stackTrace
00007ff87a9e5280  400023c       38        System.Byte[]  0 instance 0000000000000000 _watsonBuckets
00007ff87a6ed698  400023d       40        System.String  0 instance 0000000000000000 _stackTraceString
00007ff87a6ed698  400023e       48        System.String  0 instance 0000000000000000 _remoteStackTraceString
00007ff87a63b578  400023f       50      System.Object[]  0 instance 0000000000000000 _dynamicMethods
00007ff87a6ed698  4000240       58        System.String  0 instance 0000000000000000 _source
00007ff87a6e5148  4000241       60       System.UIntPtr  1 instance 0000000000000000 _ipForWatsonBuckets
00007ff87a6e4228  4000242       68        System.IntPtr  1 instance 0000000000000000 _xptrs
00007ff87a6d9480  4000243       70         System.Int32  1 instance       -532462766 _xcode
00007ff87a6d9480  4000244       74         System.Int32  1 instance      -2146233082 _HResult

StackOverflowException:

0:017> !DumpObj /d 0000019c0cfb1198
Name:        System.StackOverflowException
MethodTable: 00007ff87a6ef3b8
EEClass:     00007ff87a6ca4e8
Tracked Type: false
Size:        128(0x80) bytes
File:        C:\Users\Roman Surber\Desktop\splsense-debugging\debug-version\net6.0-windows\System.Private.CoreLib.dll
Fields:
              MT    Field   Offset                 Type VT     Attr            Value Name
00007ff87a7ef260  4000236        8 ...ection.MethodBase  0 instance 0000000000000000 _exceptionMethod
00007ff87a6ed698  4000237       10        System.String  0 instance 0000000000000000 _message
00007ff87a6f14e0  4000238       18 ...tions.IDictionary  0 instance 0000000000000000 _data
00007ff87a6ef048  4000239       20     System.Exception  0 instance 0000000000000000 _innerException
00007ff87a6ed698  400023a       28        System.String  0 instance 0000000000000000 _helpURL
00007ff87a9e5280  400023b       30        System.Byte[]  0 instance 0000000000000000 _stackTrace
00007ff87a9e5280  400023c       38        System.Byte[]  0 instance 0000000000000000 _watsonBuckets
00007ff87a6ed698  400023d       40        System.String  0 instance 0000000000000000 _stackTraceString
00007ff87a6ed698  400023e       48        System.String  0 instance 0000000000000000 _remoteStackTraceString
00007ff87a63b578  400023f       50      System.Object[]  0 instance 0000000000000000 _dynamicMethods
00007ff87a6ed698  4000240       58        System.String  0 instance 0000000000000000 _source
00007ff87a6e5148  4000241       60       System.UIntPtr  1 instance 0000000000000000 _ipForWatsonBuckets
00007ff87a6e4228  4000242       68        System.IntPtr  1 instance 0000000000000000 _xptrs
00007ff87a6d9480  4000243       70         System.Int32  1 instance       -532462766 _xcode
00007ff87a6d9480  4000244       74         System.Int32  1 instance      -2147023895 _HResult

OutOfMemoryException

0:017> !DumpObj /d 0000019c0cfb1118
Name:        System.OutOfMemoryException
MethodTable: 00007ff87a6ef2b8
EEClass:     00007ff87a6ca470
Tracked Type: false
Size:        128(0x80) bytes
File:        C:\Users\Roman Surber\Desktop\splsense-debugging\debug-version\net6.0-windows\System.Private.CoreLib.dll
Fields:
              MT    Field   Offset                 Type VT     Attr            Value Name
00007ff87a7ef260  4000236        8 ...ection.MethodBase  0 instance 0000000000000000 _exceptionMethod
00007ff87a6ed698  4000237       10        System.String  0 instance 0000000000000000 _message
00007ff87a6f14e0  4000238       18 ...tions.IDictionary  0 instance 0000000000000000 _data
00007ff87a6ef048  4000239       20     System.Exception  0 instance 0000000000000000 _innerException
00007ff87a6ed698  400023a       28        System.String  0 instance 0000000000000000 _helpURL
00007ff87a9e5280  400023b       30        System.Byte[]  0 instance 0000000000000000 _stackTrace
00007ff87a9e5280  400023c       38        System.Byte[]  0 instance 0000000000000000 _watsonBuckets
00007ff87a6ed698  400023d       40        System.String  0 instance 0000000000000000 _stackTraceString
00007ff87a6ed698  400023e       48        System.String  0 instance 0000000000000000 _remoteStackTraceString
00007ff87a63b578  400023f       50      System.Object[]  0 instance 0000000000000000 _dynamicMethods
00007ff87a6ed698  4000240       58        System.String  0 instance 0000000000000000 _source
00007ff87a6e5148  4000241       60       System.UIntPtr  1 instance 0000000000000000 _ipForWatsonBuckets
00007ff87a6e4228  4000242       68        System.IntPtr  1 instance 0000000000000000 _xptrs
00007ff87a6d9480  4000243       70         System.Int32  1 instance       -532462766 _xcode
00007ff87a6d9480  4000244       74         System.Int32  1 instance      -2147024882 _HResult

I repeated the same step on my machine, where the exact same self-contained build runs just fine.

0:025> !dumpheap -type Exception
         Address               MT     Size
00000188223d1208 00007ffdab2df2b8      128     
00000188223d1288 00007ffdab2df3b8      128     
00000188223d1308 00007ffdab2df4b8      128     
0000018822427790 00007ffdab8004a0       24     
00000188224277a8 00007ffdab8005c8       24     
0000018822465bb0 00007ffdabaa3b50       40     
0000018822465bd8 00007ffdabaa3b50       40     
0000018822465c00 00007ffdabaa38e0       96     
0000018822465ff0 00007ffdabaa3b50       32     
00000188224bfe88 00007ffdab8ebc60       64     
00000188224d2710 00007ffdaba33868       56     
00000188225ed1f8 00007ffdabaa3b50       40     
00000188225ed220 00007ffdabaa3b50       40     
00000188225ed248 00007ffdabaa38e0       96     
00000188225f0ef8 00007ffdabaa3b50       32     
0000018822639138 00007ffdabb0fa08       64     
0000018822639348 00007ffdabb10378       64     
0000018822639570 00007ffdabb105c8       64     

Statistics:
              MT    Count    TotalSize Class Name
00007ffdab8005c8        1           24 System.Text.DecoderExceptionFallback
00007ffdab8004a0        1           24 System.Text.EncoderExceptionFallback
00007ffdaba33868        1           56 System.Text.DecoderExceptionFallbackBuffer
00007ffdabb105c8        1           64 System.Action`5[[Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.Abstractions],[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.Exception, System.Private.CoreLib]]
00007ffdabb10378        1           64 System.Action`5[[Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.Abstractions],[System.Type, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.Exception, System.Private.CoreLib]]
00007ffdabb0fa08        1           64 System.Action`4[[Microsoft.Extensions.Logging.ILogger, Microsoft.Extensions.Logging.Abstractions],[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib],[System.Exception, System.Private.CoreLib]]
00007ffdab8ebc60        1           64 System.Func`3[[Microsoft.Extensions.Logging.FormattedLogValues, Microsoft.Extensions.Logging.Abstractions],[System.Exception, System.Private.CoreLib],[System.String, System.Private.CoreLib]]
00007ffdab2df4b8        1          128 System.ExecutionEngineException
00007ffdab2df3b8        1          128 System.StackOverflowException
00007ffdab2df2b8        1          128 System.OutOfMemoryException
00007ffdabaa38e0        2          192 System.Reflection.Emit.__ExceptionInfo
00007ffdabaa3b50        6          224 System.Reflection.Emit.__ExceptionInfo[]
Total 18 objects

The Exceptions are here too. Therefore I think, the faulty behavior isn't visible in this Exception objects.

@sgacond
Copy link
Author

sgacond commented Jul 1, 2022

One more thing: I just recreated the most simple HelloWorld sample (according to this doc) and the issue persists.

Also the windbg behavior is the same. No break. Same three Exceptions on the heap:

00007ff87aeef4b8        1          128 System.ExecutionEngineException
00007ff87aeef3b8        1          128 System.StackOverflowException
00007ff87aeef2b8        1          128 System.OutOfMemoryException

@javiercn
Copy link
Member

javiercn commented Jul 1, 2022

@sgacond thanks for the additional details.

You can discard stackoverflow and outofmemory exceptions. The runtime always allocates those two ahead of time, since it can’t allocate if it has no memory. I’m not sure about ExecutionEngineException, but it’s likely to be the case.

Could you create an app with just the webview (No blazor) and check if the issue still happens?

@budcribar
Copy link

It may help to catch the unhandled exceptions and perhaps you will get a hint from the error parameter

Add this to your main

AppDomain.CurrentDomain.UnhandledException += (sender, error) =>
{
Console.WriteLine(error.ExceptionObject.ToString());
Console.ReadLine();
};

@sgacond
Copy link
Author

sgacond commented Jul 2, 2022

Thanks for your hints!
I just tried with two new samples:

The basic blazor one from above, but extended with a global unhandled exception handler (message box).
==> Same Result, no unhandled exception.

A basic WebView2 Hello World:

        public Form1()
        {
            var webView = new WebView2()
            {
                Dock = DockStyle.Fill,
                Padding = new Padding(0, 1, 0, 0),
                Source = new("https://mod-dotnet-bot.net/")
            };

            InitializeComponent();
            Controls.Add(webView);
        }

==> Same here - works on my machine just fine, but on the target machine only system-grey. No exceptions.
I think I have to move to the WebView repo.... Thanks for your support!

@javiercn
Copy link
Member

javiercn commented Jul 4, 2022

@sgacond thanks for the additional details.

It seems that this is something at the webview2 level, I would suggest you file an issue in the webview2 repo here as they will be in a better position to help you.

@javiercn javiercn closed this as completed Jul 4, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Blazor Hybrid / Desktop, BlazorWebView external
Projects
None yet
Development

No branches or pull requests

3 participants