microsoft-ui-xaml: WinUI3 apps not running on Windows Insider build 21292.1000

Describe the bug

WinUI3 apps do not run on the latest Windows Insider build (21292.1000)

  • Running the app once installed closes immediately it with no prompt
  • Running app under debug in VS16.9preview2.0 closes the app and causes VS to restart
  • Running app under debug in VS16.8.2 & VS16.8.4 give me this error:

Unhandled exception at 0x7559581E (combase.dll) in App219.exe: 0xC0000602: A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately.

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Create a new blank app from the templates
  2. Try and debug the created app from Visual Studio
  3. See crash/restart of VS

Expected behavior

Apps should be able to run

Screenshots

Version Info

NuGet package version: Microsoft.WinUI 3.0.0-preview3.201113.0

Windows app type:

UWP Win32
Yes Yes
Windows 10 version Saw the problem?
Insider Build (21292.1000) Yes
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 20 (10 by maintainers)

Most upvoted comments

This bug has been fixed, and the fix will be available in our next release - WinUI 3 Preview 4. We’re hoping to ship this preview release in early February. Thanks!

The short summary of the cause is that the UDK library failed to properly call through to the OS dll when it should have, which resulted in it not accounting for OS changes on recent insider builds. An automated test was unfortunately missing for this, and a test was added with the fix.

FYI, we are planning to ship a Preview 4 in early-mid Feb., which will include the fix.

Workaround for x64 targets

  1. Open Visual Studio
  2. File > Open > Select %UserProfile%\.nuget\packages\microsoft.winui\3.0.0-preview3.201113.0\runtimes\win10-x64\native\Microsoft.Internal.FrameworkUdk.dll > click the arrow on the [Open ▼] button > Open With… > Binary Editor
  3. Edit > Go To > Go To (or type CTRL-G)
  4. Input 0x1ac64 and click the OK button
  5. The selected byte (may be at the bottom of the window) should read 0D
  6. Type C to change the value to 0C
  7. File > Save (or type CTRL-S)
  8. Recompile/repackage your application

Hello World test: Passed (21292, 21296 thanks @vitorgrs) ✔

Workaround for x86 targets:

  1. Open Visual Studio
  2. File > Open > Select %UserProfile%\.nuget\packages\microsoft.winui\3.0.0-preview3.201113.0\runtimes\win10-x86\native\Microsoft.Internal.FrameworkUdk.dll > click the arrow on the [Open ▼] button > Open With… > Binary Editor
  3. Edit > Go To > Go To (or type CTRL-G)
  4. Input 0x18f92 and click the OK button
  5. The selected byte (may be at the bottom of the window) should read 0D
  6. Type C to change the value to 0C
  7. File > Save (or type CTRL-S)
  8. Recompile/repackage your application

Hello World test: Passed (21292) ✔

Workaround for arm64 targets:

  1. Open Visual Studio
  2. File > Open > Select %UserProfile%\.nuget\packages\microsoft.winui\3.0.0-preview3.201113.0\runtimes\win10-arm64\native\Microsoft.Internal.FrameworkUdk.dll > click the arrow on the [Open ▼] button > Open With… > Binary Editor
  3. Edit > Go To > Go To (or type CTRL-G)
  4. Input 0x16d38 and click the OK button
  5. The selected byte (may be at the bottom of the window) should read A8
  6. Type 88 to change the value to 88
  7. File > Save (or type CTRL-S)
  8. Recompile/repackage your application

Hello World test: Passed (21296 thanks @snickler) ✔

Other notes

  • Nuget restore will likely trample your modified dll, so make a backup and restore it pre-build as needed

Hi, thanks @mrlacey and @codendone. Unfortunately WinUI 3 Preview 3 won’t work on any new insider builds, we’ll have to wait for the next WinUI 3 release.

Please ship preleases much more frequently. The quality of Preview 3 is still far from GA. There must be a Preview 4. Ideally there should be monthly prerelease like WinUI 2.

@martibravo i posted few days back about reunion 0.8.0 problem: #5295 maybe it could be the same

@mrlacey Agreed.

It appears there’s a disconnect somewhere between (Reunion) UDK, platform SDK, and Windows.Foundation in terms of Universal API Contract versioning. The change above stops the UDK from querying for a version (13) it doesn’t seem to actually support. Hopefully someone from Microsoft can shed some more light here and answer your questions.

Workarounds are great but it will also be useful to know:

  • Why/how this happened?
  • What’s being done to ensure it doesn’t happen again?

Hello World test: Passed (21292.rs_prerelease) ✔

Tested and worked on 21296.rs_prerelease too.

I am windows insider on all my machines. some are stopped (laptop has some stable insider version because I want to try features and not all bug fixes) and some are active (work pc has every build few hours after release). Yeah I know, this is extreme hazard, but if you know, what are you doing, it is safe. I am currently doing master thesis with WinUI3 technology as successor for desktop apps and this is extremely limiting. So like you said, I need to wait 5 months, probably more, almost 6, I think, to continue develop. Maybe I’m first so crazy doing this, but imagine, more and more people will get these builds and won’t be able to continue in their work. Is it so huge problem to create bug fix to enable it or create some workaround?

Hi, thanks @mrlacey and @codendone. Unfortunately WinUI 3 Preview 3 won’t work on any new insider builds, we’ll have to wait for the next WinUI 3 release.

Is this publicly documented anywhere?

As the next version of WinUI3 is the GA release and not due until “the first half of 2021” this is assumed to imply May/June, this is not good.

I suspect that developers testing the preview release of WinUI3 are also likely to be testing the insider builds of Windows. As Windows Insiders are aggressively updated this is going to affect more and more people going forward. As the only way to get off an insider build is to reinstall Windows (a large amount of work), this is going to discourage further testing of the WinUI3 preview.

I suspect this can only limit the number of people who can test WinUI3 or try and have apps developed ready for launch.