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

Opening the "settings://" protocol causes the WinUI3 application to crash #8763

Open
stefanvd opened this issue Aug 20, 2023 · 0 comments
Open
Labels
area-wapproj bug Something isn't working team-Markup Issue for the Markup team

Comments

@stefanvd
Copy link

Describe the bug

I have 2 WinUI3 applications in a 1 package project, both with protocol schemes such as "settings" and "main" (=set default project in the package). However, when I try to open the protocol using the Run window with "settings://", it crashes.

The error message:

Exception thrown: 'System.Runtime.InteropServices.COMException' in WinRT.Runtime.dll
WinRT information: The Application Object must initially be accessed from the multi-thread apartment.
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in WinRT.Runtime.dll
WinRT information: The Application Object must initially be accessed from the multi-thread apartment.
The application called an interface that was marshalled for a different thread.

Steps to reproduce the bug

  1. Download https://github.com/stefanvd/winui3protocol
  2. Open Visual Studio "main" project
  3. Run the "package" on (ARM64)
  4. The "main" window shows up. Then when you open the "Run" window (windows+ R) and type "settings://hello". It crashes instead of displaying the "settings" window as it should

Expected behavior

  1. Open the "Settings" window

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.3.3: 1.3.230724000

Windows version

Windows Insider Build (xxxxx), Windows 11 (22H2): Build 22621

Additional context

See this discussion microsoft/WindowsAppSDK#3795 (reply in thread)

@stefanvd stefanvd added the bug Something isn't working label Aug 20, 2023
@stefanvd stefanvd changed the title Bug title Open protocol crash the WinUI3 application Aug 20, 2023
@stefanvd stefanvd changed the title Open protocol crash the WinUI3 application Opening the "settings://" protocol causes the WinUI3 application to crash Aug 20, 2023
@bpulliam bpulliam added the team-Markup Issue for the Markup team label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-wapproj bug Something isn't working team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

3 participants