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
Windows.UI.Xaml.dll read access violation: TeachingTip & static data source => **cornerRadius** was nullptr #2295
Comments
@jp-weber I've run your code and spent some time debbuging the issue, here's what I found: when the first time you open the page and listview is being populated with entries, for each of those elements a TeachingTip is created. When we leave the page and come back to it, same thing happens: listview is being populated with entries and for each of those elements a TeachingTip is created. But - the old Teaching Tips (the ones that were created the first time we entered the page) - are still there. So, when you right click on an element of the list - both teaching tips are trying to open. And for some reason, the old teaching tip is missing some references and we get the following exception : CornerRadius is probably just top of the iceberg and many other references the teaching tip relies on are being null. So when we are leaving the page - listview doesn't release the items its binded to, teaching tips are still binded and they don't get garbage collected. The workaround is to remove ItemsSource for list view when you leave the page like this: And have the ListView bind to a variable using By doing so, all the old teaching tips are getting destroyed and they're not linked to the ListView anymore :) |
Thank you for investigating the error. In a more complex construction with an adapted navigation, this unfortunately does not work. I am currently using Template10 and I have not yet found a suitable approach to implement the workaround here. The workaround I currently use is to reload the ObservableCollection with the data |
@StephenLPeters null_pointer_read_c0000005_windows.ui.xaml.dll!cdependencyobjectvalidatecornerradiusvalue
|
The exception is gone with WinUI 2.6. I have now also made the creation of the control in the code behind and deleted it from the XAML. Now there are no more problems. |
Describe the bug
By binding the TeachingTip (IsOpen) to a static data source, the app crashes after navigation to a page if go back and then open the TeachingTip.
test app to reproduce:
https://github.com/jp-weber/WinUITeachingTipBug
Model
Data source
View
Steps to reproduce the bug
Steps to reproduce the behavior:
Expected behavior
NuGet package version:
2.3.200213001
2.4.0-prerelease.200322001
2.5.0-prerelease.201027002
The text was updated successfully, but these errors were encountered: