Skip to content

App crashes with second window and WebView #8323

@Eatham532

Description

@Eatham532

Description

I have a seccond window with a webView. When I try to close the seccond window my app crashes. I did a workaround by removing the webView from the grid. But after I close the seccond window I can't use DisplayAlert.

Steps to Reproduce

  1. Create two windows in Maui
  2. In the first window put a button that will open the seccond window.
  3. In the seccond window put a webView
  4. Run the program and open the seccond window
  5. Try to close the program and obsere the bug.

Expected: The seccond window closes and you can still use the first window
What happend: The application crashed.

Version with bug

6.0.400-preview.22301.10

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

Windows 11

Did you find any workaround?

Removed the webView before closing the window.

MainGrid.Clear();
while (MainGrid.Children.Count > 0)
{
    await Task.Delay(500);
}
await Task.Delay(1250);

Application.Current.CloseWindow(GetParentWindow());

Edit: The app will crash if you use DisplayAlert after closing the window.

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

area-controls-webviewWebViewfixed-in-7.0.100fixed-in-7.0.101fixed-in-7.0.81Look for this fix in 7.0.81!fixed-in-8.0.0-preview.1.7762Look for this fix in 8.0.0-preview.1.7762!p/1Work that is important, and has been scheduled for release in this or an upcoming sprintplatform/windowss/needs-attentionIssue has more information and needs another looks/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions