uno: Uno App with WinUI3 in .NET 5 Desktop project crashes reproducibly after start

Current behavior

The app crashes after a random time or after direct interaction (e.g. button click) with a UI control

Expected behavior

I would expect the app to not crash

How to reproduce it (as minimally and precisely as possible)

  1. Create a new project using the unoapp-winui template
  2. Remove all projects except WinUI (Desktop, Packaging Project, Shared Project)
  3. Add some interactive UI components (e.g. TextBox, Button, …)
  4. Start the app
  5. Interact with UI (e.g. press a button)
  6. App crashes

For a sample project see attachment. The bug occurs also on other Windows 10 machines

Workaround

No workaround

Environment

Nuget Package:

  • [ x ] Microsoft.WinUI (v3.0.0-preview4.210210.4)
  • [ x ] Uno.Core (v2.3.0-dev.3)
  • [ x ] Microsoft.VCRTForwarders.140 (v1.0.6)

Affected platform(s):

  • [ x ] Windows
  • [ x ] Solution Templates (unoapp-winui)

IDE:

  • [ x ] Visual Studio 2019 (version: 16.9.2)

Relevant plugins:

None

Anything else we need to know?

UnoAppBugRepro.zip

When using WinDBG I get the following message immediately before process termination: onecoreuap\windows\dwm\legacymarshal\marshal\inputmanagerexports.cpp(97)\marshal.dll!00007FFEB4024842: (caller: 00007FFEBE219B6E) ReturnNt(2) tid(6908) C000000D onecoreuap\windows\dwm\legacymarshal\marshal\inputmanagerexports.cpp(97)\marshal.dll!00007FFEB4024842: (caller: 00007FFEBE219B6E) ReturnNt(3) tid(6908) C000000D onecoreuap\windows\dwm\legacymarshal\marshal\inputmanagerexports.cpp(97)\marshal.dll!00007FFEB4024842: (caller: 00007FFEBE219B6E) ReturnNt(4) tid(6908) C000000D ntdll!NtTerminateProcess+0x14:

On start of the app I get the following (handled) exception message: Exception thrown at 0x00007FFF350DD759 (KernelBase.dll) in UnoAppBugRepro.Windows.Desktop.exe: WinRT originate error - 0x80040155 : 'Die Proxyregistrierung für die IID {18F80E27-59B9-5ABD-B917-B24E077FCEDB} wurde nicht gefunden.'.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Yes I did. Also I tried replacing WinUI by Project Reunion everywhere, including in Prism, but that did not solve the issues

I found out that this problem is solved by using a Window as root UI container not a Page (as the unoapp-winui template creates). So now it is working for me

Thanks. This may be a WinUI issue that has been fixed in a more recent build, for instance in Reunion 0.5. We’ve not updated to the latest version but will do so soon.