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

[Windows] Application.Current.OpenWindow() constantly crashes #5383

Closed
kucint opened this issue Mar 17, 2022 · 3 comments
Closed

[Windows] Application.Current.OpenWindow() constantly crashes #5383

kucint opened this issue Mar 17, 2022 · 3 comments
Labels
platform/windows 🪟 t/bug Something isn't working
Projects

Comments

@kucint
Copy link

kucint commented Mar 17, 2022

Description

Under Windows (Windows 10, Windows 11), trying to create a new window causes application crash.

See attached project:
MauiApp4.zip

No matter what I do, the exception is thrown.
Am I missing something?

Steps to Reproduce

  1. uninstall all Visual Studio instances present on the computer.
  2. install clean version of Visual Studio Preview (Version 17.2.0 Preview 2.0). This version comes with the MAUI preview 14.
  3. create a new MAUI project
  4. create new DemoPage, may be empty
  5. replace implementation of OnCounterClicked method with following code:
    private void OnCounterClicked(object sender, EventArgs e)
    {
    var page = new DemoPage();
    var wnd = new Window(page);
    Application.Current.OpenWindow(wnd);
    }
  6. Run the application on Windows and click the "counter" button.
  7. Application crashes with following message:
    image

Referred Just-In-Time option does not exists in Visual Studio (I think it existed in the past but has been removed):

image

Version with bug

Preview 13 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

Windows SDK 10.0.19041

Did you find any workaround?

no

Relevant log output

No response

@kucint kucint added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Mar 17, 2022
@jsuarezruiz
Copy link
Contributor

From the exception:

'WinUI: Error creating second Desktop Window on the current process. No more than one Desktop Window is allowed per process.'.

@jfversluis jfversluis removed the s/needs-verification Indicates that this issue needs initial verification before further triage will happen label Mar 17, 2022
@jfversluis
Copy link
Member

As mentioned in the blogpost for preview 11

The Windows App SDK implementation of multi-window will be in an experimental release until release in v1.1 (see roadmap).

We're aware and working on it, but we have to wait until WinUI got their bits ready :)

@kucint
Copy link
Author

kucint commented Mar 17, 2022

I see, thanks you for info!
I am looking forward for the incoming MAUI release.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/windows 🪟 t/bug Something isn't working
Projects
No open projects
Triage
Awaiting triage
Development

No branches or pull requests

3 participants