Skip to content

Unpackaged framework-dependent app crashes if fusion manifest not present/embedded #2634

@riverar

Description

@riverar

Describe the bug

In scenarios where the fusion manifest is not embedded into the output executable, an app bootstrapping with Windows App SDK will fail to start. This appears to have regressed since 1.0.0.

Repro project: repro.zip

Steps to reproduce the bug

  1. Open repro project provided above
  2. Compile/execute output
  3. Observe app does not start correctly
  4. Edit the .vcxproj and replace all instances of <EmbedManifest>false</EmbedManifest> with <EmbedManifest>true</EmbedManifest>.
  5. Compile/execute output
  6. Observe app starts correctly

Expected behavior

App to start correctly regardless of fusion manifest presence.

NuGet package version

1.1.1 ❌ Broken
1.1.0 ❌ Broken
1.0.4 ❌ Broken
1.0.3 ❌ Broken
1.0.2 ❌ Broken
1.0.1 ❌ Broken
1.0.0 ✔️ Works

Packaging type

Unpackaged

Windows version

Insider Build (xxxxx)

IDE

Visual Studio 2022

Additional context

Impacted Rust bindings, which does not use fusion manifests.

It appears the bootstrapping component is attempting to locate reg-free WinRT information. In non-framework-dependent apps, that is expected. In framework-dependent apps it is not. The fusion manifest in these scenarios will have very little aside from optional common controls/DPI flags.

Output window
'repro.exe' (Win32): Loaded 'C:\Sources\was-repros\redacted\x64\Debug\repro\repro.exe'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Symbol loading disabled by Include/Exclude setting.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Sources\was-repros\redacted\x64\Debug\repro\Microsoft.WindowsAppRuntime.Bootstrap.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Symbols loaded.
'repro.exe' (Win32): Unloaded 'C:\Windows\System32\ucrtbased.dll'
'repro.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Symbols loaded.
D:\a\_work\1\s\BuildOutput\Release\x64\WindowsAppRuntime_DLL\WindowsAppRuntimeInsights.h(53)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFC598324DB: (caller: 00007FFC5982E1C6) LogHr(1) tid(b6f8) 8007007E The specified module could not be found.
    Msg:[Unable to load resource dll. Microsoft.WindowsAppRuntime.Insights.Resource.dll] 
'repro.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\AppXDeploymentClient.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\Windows.ApplicationModel.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Symbols loaded.
D:\a\_work\1\s\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(776)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFC5982B0D9: (caller: 00007FFC59829C2F) LogHr(2) tid(b6f8) 80040010 Object is not in any of the inplace active states
    Msg:[Bootstrap.Intitialize: Scanning packages for Major.Minor=1.1, Tag=, MinVersion=1001.524.1918.0] CallContext:[\Initialize] 
'repro.exe' (Win32): Loaded 'C:\Windows\System32\Windows.StateRepositoryCore.dll'. Symbols loaded.
D:\a\_work\1\s\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(865)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFC5982B85C: (caller: 00007FFC59829C2F) LogHr(3) tid(b6f8) 80040011 Not able to convert object
    Msg:[Bootstrap.Intitialize: Microsoft.WinAppRuntime.DDLM.1000.516.2156.0-x6_1000.516.2156.0_x64__8wekyb3d8bbwe not applicable. Version doesn't match MinVersion criteria (Major.Minor=1.1, Tag=, MinVersion=1001.524.1918.0)] CallContext:[\Initialize] 
D:\a\_work\1\s\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(865)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFC5982B85C: (caller: 00007FFC59829C2F) LogHr(4) tid(b6f8) 80040011 Not able to convert object
    Msg:[Bootstrap.Intitialize: Microsoft.WinAppRuntime.DDLM.1000.516.2156.0-x8_1000.516.2156.0_x86__8wekyb3d8bbwe not applicable. Version doesn't match MinVersion criteria (Major.Minor=1.1, Tag=, MinVersion=1001.524.1918.0)] CallContext:[\Initialize] 
D:\a\_work\1\s\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(885)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFC5982BB5E: (caller: 00007FFC59829C2F) LogHr(5) tid(b6f8) 80040012 Not able to perform the operation because object is not given storage yet
    Msg:[Bootstrap.Intitialize: Microsoft.WinAppRuntime.DDLM.1001.524.1918.0-x6_1001.524.1918.0_x64__8wekyb3d8bbwe is applicable (Major.Minor=1.1, Tag=, MinVersion=1001.524.1918.0)] CallContext:[\Initialize] 
D:\a\_work\1\s\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(908)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFC5982C486: (caller: 00007FFC59829C2F) LogHr(6) tid(b6f8) 80040013     Msg:[Bootstrap.Intitialize: Microsoft.WinAppRuntime.DDLM.1001.524.1918.0-x6_1001.524.1918.0_x64__8wekyb3d8bbwe best matches the criteria (Major.Minor=1.1, Tag=, MinVersion=1001.524.1918.0) of 172 packages scanned] CallContext:[\Initialize] 
'repro.exe' (Win32): Loaded 'C:\Windows\System32\twinui.appcore.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\OneCoreUAPCommonProxyStub.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\daxexec.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\container.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\userenv.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\usermgrcli.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\Windows.StateRepositoryClient.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\Windows.StateRepositoryPS.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\LicenseManagerApi.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\capauthz.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\propsys.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\apphelp.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\networkexplorer.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\Windows.FileExplorer.Common.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\edputil.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\urlmon.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\iertutil.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\srvcli.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\netutils.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\cldapi.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\sspicli.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\AppResolver.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\BCP47Langs.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\mpr.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\OneCoreCommonProxyStub.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\execmodelproxy.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.1_1001.524.1918.0_x64__8wekyb3d8bbwe\Microsoft.WindowsAppRuntime.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\rometadata.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'. Symbols loaded.
'repro.exe' (Win32): Loaded 'C:\Windows\System32\xmllite.dll'. Symbols loaded.
'repro.exe' (Win32): Unloaded 'C:\Windows\System32\powrprof.dll'
'repro.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'. Symbols loaded.
D:\a\_work\1\s\dev\UndockedRegFreeWinRT\urfw.cpp(416)\Microsoft.WindowsAppRuntime.dll!00007FFC5901C617: (caller: 00007FFC5902FA12) ReturnHr(1) tid(b6f8) 8007000E Not enough memory resources are available to complete this operation.
D:\a\_work\1\s\dev\WindowsAppRuntime_DLL\dllmain.cpp(30)\Microsoft.WindowsAppRuntime.dll!00007FFC5902FBF3: (caller: 00007FFC5903B7EB) FailFast(1) tid(b6f8) 8007000E Not enough memory resources are available to complete this operation.
Unhandled exception at 0x00007FFC5902FBF3 (Microsoft.WindowsAppRuntime.dll) in repro.exe: Fatal program exit requested.

Metadata

Metadata

Assignees

Labels

area-UndockedRegFreeWinRTTopics related to Undocked RegFree WinRT in Windows App SDKbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions