question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crashes with second window and WebView

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

6reactions
msftbot[bot]commented, Aug 25, 2022

We’ve moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

0reactions
BlueHippoGithubcommented, Nov 14, 2022

The workaround works just fine when you call close on the window from code, but not when subscribing to the Destroying event of a window.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Here's how to fix those mysterious Android WebView crashes
Tap the three-dot menu at the top right of this screen, then select "Uninstall updates." This won't uninstall Android System WebView completely— ...
Read more >
My app crashes when closing my seccond window
My app crashes when closing my seccond window. This is all I get. No information at all. I am using webview in my...
Read more >
android - Application crash sometimes on a WebView screen
Application crash sometimes on the activity with WebView with exception. Fatal Exception: java.lang.NullPointerException: Attempt to invoke ...
Read more >
App crashes while creating instanc…
I am using a 3rd party mac framework that uses deprecated WebView class. While running the app in apple silicon macs, The app...
Read more >
Windows Store application crashes when you remove a ...
Symptoms. This issue occurs when removing a WebView that uses the calc() CSS function from the Windows Store application markup. · Resolution. Update...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found