-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access Violation in WinUI 3 #7695
Comments
I hit this issue when binding to a property on an interface or abstract class with a treeview |
This issue is blocking us from adopting WinUI 3. @gabbybilka |
Agree it looks like a bug in WinUI3. Thanks for providing the debug info. In response to the property change notification, it's trying to reach back and get the new value, and it looks like the pointer it has to the internal ICustomProperty reflection object is bad. In the interest of getting unblocked, maybe you could switch this binding to an {x:Bind}, or otherwise add some code to replace it. If it's happening for all of the bindings on this object, then that would be interesting to know too. |
We already use |
We workarounded the issue by not replacing the whole viewModel but instead changing the properties of the viewModel. |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
To recap this issue, it may happen when you are replacing the existing ViewModel with a new instance of ViewModel and then notify the changes using the class ParentViewModel : INotifyPropertyChanged
{
private ChildViewModel _children;
public ChildViewModel Children
{
get => ...
set
{
_children = value;
PropertyChanged?.Invoke(this, new(nameof(ChildViewModel)));
}
}
} Then bind your page to |
@llongley as someone who manages a large repo, I understand the challenge of trying to manage issues and I appreciate everything that's being done to close old issues. Having said that, it's disappointing when issues get closed without having a discussion with the author who took the time to report the issue and keep it active. This doesn't reflect well on WinUI and I hope you reconsider the processes being used to close issues. |
Describe the bug
We encountered access violation while developing a WinUI 3 app. It happens in the
PropertyChanged
event for ourColumnsViewModel
(we use this ViewModel to provide column properties for ListView).Given that the failure happens in unmanaged code with 0xC0000005, we think this might be a bug of WinUI 3.
Steps to reproduce the bug
App dump: https://1drv.ms/u/s!ApWNk8G_rszRgooFZijjJphwT7b17g?e=1UowSc
Expected behavior
No crashing is expected.
Screenshots
NuGet package version
WASDK 1.2-preview1
Windows app type
Device form factor
Desktop
Windows version
Windows Insider Build (25193)
The text was updated successfully, but these errors were encountered: