xamarin-macios
xamarin-macios copied to clipboard
[mac] ReleaseManagedRef crash when reusing views that have RemoveFromSuperview overridden
Steps to Reproduce
- Open attached project
- Run
- Click button about 10 times, scrolling through list when up appears to make it happen more often, but seems random.
- Comment out RemoveFromSuperview on MyView and it seems to go away.
Expected Behavior
Not randomly crash
Actual Behavior
💥
Environment
XM from master.
Appears to be related to xamarin.github.io/bugzilla-archives/13/13430/bug.html
Waiting for ViewWillMoveToSuperview to be invoked with null appears to cover some of the use cases RemoveFromSuperview hits and doesn't appear to trigger this.