App crashes with second window and WebView
See original GitHub issueDescription
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
- Create two windows in Maui
- In the first window put a button that will open the seccond window.
- In the seccond window put a webView
- Run the program and open the seccond window
- 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:
- Created a year ago
- Reactions:1
- Comments:7
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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.