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

WinUI3 unmodified template crashes in release config: Unhandled exception at 0x00007FFBA70552F5 (Microsoft.ui.xaml.dll): 0xC000027B: An application-internal exception has occurred (parameters: 0x000001D814FC4330, 0x0000000000000002). #9793

Closed
jcoliz opened this issue Jul 5, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@jcoliz
Copy link

jcoliz commented Jul 5, 2024

Describe the bug

Creating a brand new solution with the "Blank App, Packaged (WinUI3 in Desktop)" (C#) fails to launch when built in release config.

I made a repro repo here: https://github.com/jcoliz/WinUI3.Hello.

Steps to reproduce the bug

  1. In Visual Studio, create a new solution using template "Blank App, Packaged (WinUI3 in Desktop)" (C#)
  2. Start with Debugging (F5) on Debug X64 config (Packaged). All is well
  3. Enabled mixed mode debugging
  4. Start with Debugging (F5) on Release X64 config (Packaged)

Result: Unhandled exception at 0x00007FFBA70552F5 (Microsoft.ui.xaml.dll) in WinUI3.Hello.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x000001D814FC4330, 0x0000000000000002).

Debug output: Exception thrown at 0x00007FFBF082F39C (KernelBase.dll) in WinUI3.Hello.exe: WinRT originate error - 0x802B000A: 'The text associated with this error code could not be found.'.

Call stack

[External Code]
hostpolicy.dll!00007ffd9dca2784()
hostpolicy.dll!00007ffd9dca3ef0()
hostfxr.dll!00007ffd9ef11d5c()
hostfxr.dll!00007ffd9ef110a8()
hostfxr.dll!00007ffd9ef09ae0()
WinUI3.Hello.exe!00007ff69e9deff8()
WinUI3.Hello.exe!00007ff69e9e0cc0()
WinUI3.Hello.exe!00007ff69e9e0d64()
kernel32.dll!00007ffe2c162310()
ntdll.dll!00007ffe2d7d5b2c()

Just for fun, I repro'd this on an Arm64 device. Same result. Interesting that the call stack is deeper.

Unhandled exception at 0x00007FFDC46DA1E8 (Microsoft.ui.xaml.dll) in WinUI3.Hello.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x000001B997A89860, 0x0000000000000002).
Exception thrown at 0x00007FFE2929CFA4 (KernelBase.dll) in WinUI3.Hello.exe: WinRT originate error - 0x802B000A : 'The text associated with this error code could not be found.'.

Call stack

KernelBase.dll!00007ffbf0930c02()
combase.dll!00007ffbf27cce09()
Microsoft.ui.xaml.dll!00007ffba70552f5()
Microsoft.ui.xaml.dll!00007ffba747085a()
Microsoft.ui.xaml.dll!00007ffba747014e()
twinapi.appcore.dll!00007ffbe69b0da4()
twinapi.appcore.dll!00007ffbe69b0e04()
twinapi.appcore.dll!00007ffbe699b97a()
twinapi.appcore.dll!00007ffbe699b081()
twinapi.appcore.dll!00007ffbe699b829()
twinapi.appcore.dll!00007ffbe69aa26d()
twinapi.appcore.dll!00007ffbe69cab91()
combase.dll!00007ffbf27cb85d()
Microsoft.ui.xaml.dll!00007ffba7470abf()
Microsoft.ui.xaml.dll!00007ffba6fcde01()
Microsoft.ui.xaml.dll!00007ffba6db23b5()
Microsoft.ui.xaml.dll!00007ffba6db2337()
Microsoft.ui.xaml.dll!00007ffba6ec3a97()
Microsoft.ui.xaml.dll!00007ffba6db7881()
Microsoft.ui.xaml.dll!00007ffba6cea3c3()
Microsoft.ui.xaml.dll!00007ffba6ed6514()
Microsoft.ui.xaml.dll!00007ffba6ed2178()
Microsoft.ui.xaml.dll!00007ffba6ed20bd()
Microsoft.ui.xaml.dll!00007ffba6ed2023()
Microsoft.ui.xaml.dll!00007ffba6e8d11c()
Microsoft.ui.xaml.dll!00007ffba6db2250()
[External Code]
hostpolicy.dll!00007ffb3ef82b76()
hostpolicy.dll!00007ffb3ef82e5c()
hostpolicy.dll!00007ffb3ef8379a()
hostfxr.dll!00007ffb3f59b5c9()
hostfxr.dll!00007ffb3f59e066()
hostfxr.dll!00007ffb3f5a02ec()
hostfxr.dll!00007ffb3f59e644()
hostfxr.dll!00007ffb3f5985a0()
WinUI3.Hello.exe!00007ff6d11bf998()
WinUI3.Hello.exe!00007ff6d11bfda6()
WinUI3.Hello.exe!00007ff6d11c12e8()
kernel32.dll!00007ffbf23c257d()
ntdll.dll!00007ffbf322af28()

Expected behavior

App build in release config should behave just like app build in debug config. Shouldn't crash on launch.

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.5.4: 1.5.240607001

Windows version

Windows 11 (22H2): Build 22621

Additional context

  • Running on Windows 23H2 22631.3737
  • Running latest VS 17.10.3
  • App using latest WindowsAppSDK 1.5.240607001
  • App using latest Microsoft.Windows.SDK.BuildTools 10.0.26100.1
@jcoliz jcoliz added the bug Something isn't working label Jul 5, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jul 5, 2024
Copy link

github-actions bot commented Jul 5, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jcoliz
Copy link
Author

jcoliz commented Jul 5, 2024

Ok, props to @github-actions bot who found the duplicate bug that I couldn't.

--- a/WinUI3.Hello/Properties/PublishProfiles/win-x64.pubxml
+++ b/WinUI3.Hello/Properties/PublishProfiles/win-x64.pubxml
@@ -14,6 +14,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
     <PublishReadyToRun Condition="'$(Configuration)' == 'Debug'">False</PublishReadyToRun>
     <PublishReadyToRun Condition="'$(Configuration)' != 'Debug'">True</PublishReadyToRun>
     <PublishTrimmed Condition="'$(Configuration)' == 'Debug'">False</PublishTrimmed>
-    <PublishTrimmed Condition="'$(Configuration)' != 'Debug'">True</PublishTrimmed>
+    <PublishTrimmed Condition="'$(Configuration)' != 'Debug'">False</PublishTrimmed>
   </PropertyGroup>
 </Project>

@MartyIX
Copy link
Contributor

MartyIX commented Jul 10, 2024

Helped me as well.

@codendone
Copy link
Contributor

Closing as duplicate of #9675.

@codendone codendone closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs-triage Issue needs to be triaged by the area owners label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants