devhome: Application crashes at startup

Dev Home version

v0.137.141.0

Windows build number

10.0.22621.1702

Other software

No response

Steps to reproduce the bug

Start the application.

Expected result

The application starts.

Actual result

The application crashes without even opening a window. In the Windows event viewer, it logs an Error with the following information:

Faulting application name: DevHome.exe, version: 1.0.0.0, time stamp: 0x641cef7e
Faulting module name: Microsoft.UI.Xaml.dll, version: 3.1.3.0, time stamp: 0x87c36a2b
Exception code: 0xc000027b
Fault offset: 0x000000000035fb2c
Faulting process id: 0x0x4E58
Faulting application start time: 0x0x1D98E5BFAF89FDB
Faulting application path: C:\Program Files\WindowsApps\Microsoft.Windows.DevHome_0.137.141.0_x64__8wekyb3d8bbwe\DevHome.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.3_3000.851.1712.0_x64__8wekyb3d8bbwe\Microsoft.UI.Xaml.dll
Report Id: 34175ff5-2b0f-409d-acdf-847c1dee65b8
Faulting package full name: Microsoft.Windows.DevHome_0.137.141.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App

Included System Information

No response

Included Extensions Information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 8
  • Comments: 24 (1 by maintainers)

Most upvoted comments

I have the same issue so I tried running in with WinDbg attached and this is the errors that I get:

(639c.95a0): CLR exception - code e0434352 (first chance)
(639c.95a0): CLR exception - code e0434352 (first chance)
(639c.95a0): CLR exception - code e0434352 (first chance)
(639c.95a0): CLR exception - code e0434352 (first chance)
(639c.95a0): CLR exception - code e0434352 (first chance)
(639c.95a0): CLR exception - code e0434352 (first chance)
(639c.95a0): CLR exception - code e0434352 (first chance)
(639c.95a0): Windows Runtime Originate Error - code 40080201 (first chance)
onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FF8622FC07A: (caller: 00007FF8623015EF) ReturnHr(11) tid(95a0) 8007007E The specified module could not be found.
Microsoft.UI.Xaml.dll!00007FFF4782ABDE: 80131500 - onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FF8622FC07A: (caller: 00007FF86249CC72) ReturnHr(12) tid(95a0) 8007007E The specified module could not be found.
onecore\com\combase\winrt\error\restrictederror.cpp(1017)\combase.dll!00007FF8622FC07A: (caller: 00007FF86249C64E) ReturnHr(13) tid(95a0) 8007007E The specified module could not be found.
ModLoad: 00007fff`d57e0000 00007fff`d5f17000   C:\WINDOWS\System32\DriverStore\FileRepository\nvmdig.inf_amd64_29b69e720c94d54e\Display.NvContainer\MessageBus.dll
ModLoad: 00007ff8`61160000 00007ff8`611d1000   C:\WINDOWS\System32\WS2_32.dll
ModLoad: 00007ff8`5e630000 00007ff8`5e65d000   C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
(639c.9570): C++ EH exception - code e06d7363 (first chance)
(639c.9570): C++ EH exception - code e06d7363 (first chance)
(639c.95a0): Unknown exception - code c000027b (!!! second chance !!!)
KERNELBASE!RaiseFailFastException+0x152:
00007ff8`602db2e2 0f1f440000      nop     dword ptr [rax+rax]

Callstack from WinDbg:

[0x0]   KERNELBASE!RaiseFailFastException + 0x152   
[0x1]   combase!RoFailFastWithErrorContextInternal2 + 0x4d9   
[0x2]   Microsoft_UI_Xaml!DirectUI::FrameworkApplication::StartDesktop + 0x1c39a8   
[0x3]   Microsoft_UI_Xaml!DirectUI::FrameworkApplicationFactory::Start + 0x6e   
[0x4]   0x7ffef61dea6d   
[0x5]   Microsoft_WinUI!ABI.Microsoft.UI.Xaml.IApplicationStaticsMethods.Start + 0x102   
[0x6]   DevHome_r2r + 0x25d178e   
[0x7]   coreclr!CallDescrWorkerInternal + 0x83   
[0x8]   coreclr!MethodDescCallSite::CallTargetWorker + 0x176   
[0x9]   coreclr!MethodDescCallSite::Call + 0xb   
[0xa]   coreclr!RunMainInternal + 0x11f   
[0xb]   coreclr!RunMain + 0xd2   
[0xc]   coreclr!Assembly::ExecuteMainMethod + 0x1c9   
[0xd]   coreclr!CorHost2::ExecuteAssembly + 0x1c6   
[0xe]   coreclr!coreclr_execute_assembly + 0xe2   
[0xf]   hostpolicy!coreclr_t::execute_assembly + 0x2a   
[0x10]   hostpolicy!run_app_for_context + 0x56b   
[0x11]   hostpolicy!run_app + 0x3c   
[0x12]   hostpolicy!corehost_main + 0x107   
[0x13]   hostfxr!execute_app + 0x2e9   
[0x14]   hostfxr!`anonymous namespace'::read_config_and_execute + 0xa6   
[0x15]   hostfxr!fx_muxer_t::handle_exec_host_command + 0x161   
[0x16]   hostfxr!fx_muxer_t::execute + 0x482   
[0x17]   hostfxr!hostfxr_main_startupinfo + 0xab   
[0x18]   apphost!exe_start + 0x8d8   
[0x19]   apphost!wmain + 0xab   
[0x1a]   apphost!invoke_main + 0x22   
[0x1b]   apphost!__scrt_common_main_seh + 0x10c   
[0x1c]   KERNEL32!BaseThreadInitThunk + 0x1d   
[0x1d]   ntdll!RtlUserThreadStart + 0x28   

Still not solved in v0.5, doesn’t seem like anyone is looking in to this at all.

In case it helps with more info, I have a Windows 11 system, fully up to date. It’s an AMD Ryzen CPU and I have plenty of RAM and SSD storage available. It’s a development computer, it’s well maintained. I have no similar issues with any other software from Microsoft or otherwise, just DevHome.

Kinda surprising that a Microsoft Development tool is completely borked for this long and there doesn’t appear to be any real energy to resolve it. Installed every version since release and it has never gotten beyond the spinning cursor.

Just to confirm, v0.2 still crashes on startup every time.

Can you guys look into this? I think I have identified the problem, see above. This issue is not only blocking the use of the application Dev Home but is also blocking the use of Dev Drive.

@DavidZidar Out of interest what about Dev Drive isn’t working for you?

I am able to create them through the Settings app, but when I run fsutil devdrv query D: I get This is not a developer volume. which is odd and concerning.

@mdsharpe - is your device an enterprise/IT managed device (eg: Intune, configmgr)? If so there is a bug that was just fixed in the latest cumulative update KB5031455.

Once this is applied, the drive should be mounted as a Dev Drive with Defender Performance Mode/Async scanning. If it is not recognized as a developer volume, it is being treated as a regular REFS drive and not getting async scanning.

@AmelBawa-msft Looks good to me! I had a look at the changes and tested it and it works on my end even with the environment variable. 🎉

Thanks everyone for helping with the investigation! @DavidZidar, I was able to repro with the steps you’ve mentioned and pushed a fix to the main branch. Please feel free to validate from your end as well.

So I tried removing my DOTNET_ENVIRONMENT=Development environment variable and all of a sudden Dev Home runs just fine.

You found it! I also have a system environment variable for DOTNET_ENVIRONMENT = DEVELOPMENT for safety. As soon as I remove it, I can run Dev Home!

I just realized something. The thing that is crashing is the dependency injection validation which is a development only feature, it is not enabled in production. So I tried removing my DOTNET_ENVIRONMENT=Development environment variable and all of a sudden Dev Home runs just fine. This is quite an oversight on a development tool. Obviously dependency injection should be correctly configured which is it not.

I still can’t get Dev Drive to show up though in the Windows settings for some reason. And I am no longer allowed to uninstall and reinstall Dev Home either.

Still happens with 0.4.

Also v0.3 crashes on startup for me.

@mdsharpe Apparently there’s a specific Windows Update patch that enables Dev Drive that I am not getting no matter how many times I check for updates (yes, I do follow the instructions). I opened a separate issue #1622, but I’ve realized it doesn’t really have anything to with Dev Home. It’s still not working though.

@cinnamon-msft Can you guys look into this? I think I have identified the problem, see above. This issue is not only blocking the use of the application Dev Home but is also blocking the use of Dev Drive.

I have TPM enabled and it’s crashing every time anyway.