xamarin-macios icon indicating copy to clipboard operation
xamarin-macios copied to clipboard

[mac] ReleaseManagedRef crash when reusing views that have RemoveFromSuperview overridden

Open chamons opened this issue 6 years ago • 2 comments

Steps to Reproduce

NSOutlineViewDidRemove.zip

  1. Open attached project
  2. Run
  3. Click button about 10 times, scrolling through list when up appears to make it happen more often, but seems random.
  4. Comment out RemoveFromSuperview on MyView and it seems to go away.

Expected Behavior

Not randomly crash

Actual Behavior

💥

Environment

XM from master.

chamons avatar Jan 17 '19 18:01 chamons

Appears to be related to xamarin.github.io/bugzilla-archives/13/13430/bug.html

chamons avatar Jan 17 '19 18:01 chamons

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.

chamons avatar Jan 17 '19 18:01 chamons