Closed dfmacom closed 5 months ago
Uhm so I actually repeated this process again and it didn't happen this time. I will leave it up just so it is seen as it did happen as described and that project still seems corrupted. Handle this issue as you see fit
Did you change the type both in xaml and code behind ?
Did you change the type both in xaml and code behind ?
Yes
So you don’t have a consistent repro any longer or does the original project still exhibit this behavior? TBH sounds like the typical weird WinUI random instability and not a WinUIEx specific issue.
I do have the original project and it is still exhibiting the behavior that throws the exception. I can upload it as a public repo and link you to it in a bit, I need to clean some proprietary stuff out of it.
I would not be surprised if it is what you described as some of the WinUI random instability, though. There seems to still be plenty of that. Hopefully it will continue to be improved by the WinUI team
Close VS and delete bin and obj folders. Then open it again and see if it repros. My guess is some cache value from before you changing it wreaking havoc
I did that a few times among other things before opening the issue.
Also, are the WinUIEX.TestTools and WinUIEX.TestTools.MsTest packages supported in .NET8?
Faced the same issue, but I rather linked it to the Windows App SDK version 1.4.x (since the access violation exception was thrown even without using any WinUiEx functionality at all ... merely creating 2 instances of a window was sufficient to trigger the error).
Please have a look at the corresponding issue I just created: https://github.com/microsoft/microsoft-ui-xaml/issues/9310
@dfmacom I'm no longer maintaining the test tools and will be removed at some point, but there's nothing in there that prevents it from being used by a newer targetframework.
@TomPMoleman Thank you. Closing this issue since it's external.
With a new blank app project template created, changing the base class of MainWindow.cs to WindowEx as shown in the WinUI concept github page results in an unhandled memory exception in the MainWindow constructor.
System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
Steps to reproduce:
Note that this issue seems to remain even after changing the base class back to "Window". The project can still build but the unhandled exception pictured continues to occur. It seems that it corrupted the project or something.