dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.13k stars 1.74k forks source link

[Windows] System.AccessViolationException when closing window #10887

Open rmarinho opened 1 year ago

rmarinho commented 1 year ago

Description

When trying to run Core.DeviceTests on windows, the tests crash when calling Window.Close() with the following exception

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

Steps to Reproduce

  1. Clone repo
  2. Run Core.DeviceTests on Windows

Link to public reproduction project repository

https://github.com/dotnet/maui/

Version with bug

7.0 Release Candidate 2

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows

Did you find any workaround?

No response

Relevant log output

Microsoft.Maui.dll!Microsoft.Maui.Handlers.ApplicationHandler.MapCloseWindow(Microsoft.Maui.Handlers.ApplicationHandler handler, Microsoft.Maui.IApplication application, object args) Line 25  C#
    Microsoft.Maui.dll!Microsoft.Maui.CommandMapper<Microsoft.Maui.IApplication, Microsoft.Maui.Handlers.ApplicationHandler>.Add.AnonymousMethod__0(Microsoft.Maui.IElementHandler h, Microsoft.Maui.IElement v, object o) Line 92  C#
    Microsoft.Maui.dll!Microsoft.Maui.CommandMapper.InvokeCore(string key, Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView, object args) Line 33    C#
    Microsoft.Maui.dll!Microsoft.Maui.CommandMapper.Invoke(Microsoft.Maui.IElementHandler viewHandler, Microsoft.Maui.IElement virtualView, string property, object args) Line 51   C#
    Microsoft.Maui.dll!Microsoft.Maui.Handlers.ElementHandler.Invoke(string command, object args) Line 95   C#
    Microsoft.Maui.Controls.dll!Microsoft.Maui.Controls.Application.CloseWindow(Microsoft.Maui.Controls.Window window) Line 104 C#
    Microsoft.Maui.Core.DeviceTests.dll!Microsoft.Maui.DeviceTests.WindowHandlerTests.RunWindowTest.AnonymousMethod__0() Line 219   C#
    Microsoft.Maui.dll!Microsoft.Maui.Dispatching.DispatcherExtensions.DispatchAsync.AnonymousMethod__0() Line 88   C#
    Microsoft.Maui.dll!Microsoft.Maui.Dispatching.DispatcherExtensions.DispatchAsync.AnonymousMethod__0() Line 67   C#
    Microsoft.Maui.dll!Microsoft.Maui.Dispatching.Dispatcher.DispatchImplementation.AnonymousMethod__0() Line 20    C#
ghost commented 1 year ago

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.