Forum Xamarin Xamarin.Forms

Messed up Navigation and then ObjectDisposedException

I have a Shell application that has several items in a flyout menu.

The first item in chosen by default. If I touch another item on the flyout menu (which contains a CollectionView) and then touch the previous menu item, I get an ObjectDisposedException...

Unhandled Exception: System.ObjectDisposedException: Cannot access a disposed object. Object name: 'GroupableItemsViewController1'.
at Foundation.NSObject.get_SuperHandle () [0x00012] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.24/src/Xamarin.iOS/Foundation/NSObject2.cs:449
at UIKit.UICollectionViewController.get_CollectionView () [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.14.1.24/src/Xamarin.iOS/UICollectionViewController.g.cs:1101
at Xamarin.Forms.Platform.iOS.ItemsViewController1[TItemsView].RemeasureLayout (Xamarin.Forms.VisualElement formsElement) [0x00076] in D:\a\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ItemsViewController.cs:327 at Xamarin.Forms.Platform.iOS.ItemsViewController1[TItemsView].HandleFormsElementMeasureInvalidated (Xamarin.Forms.VisualElement formsElement) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ItemsViewController.cs:342
at Xamarin.Forms.Platform.iOS.StructuredItemsViewController1[TItemsView].HandleFormsElementMeasureInvalidated (Xamarin.Forms.VisualElement formsElement) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\CollectionView\StructuredItemsViewController.cs:186 at Xamarin.Forms.Platform.iOS.ItemsViewController1[TItemsView].OnFormsElementMeasureInvalidated (System.Object sender, System.EventArgs e) [0x0000a] in D:\a\1\s\Xamarin.Forms.Platform.iOS\CollectionView\ItemsViewController.cs:336
`
If I choose the item with the CollectionView and then go about 3 pages deep and the navigate back out to that main p/age and then choose the first page from the menu AND THEN choose the page with the CollectionView, the page that I navigated to 3 pages deep is displayed again. If I touch the back button in the navigation bar, I get a different OjectDisposedException. about a custom renderer on that page.

This was all working and then just started happening. Any ideas?

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    I can't be able to reproduce the issue , If posssible could you provide a minimal project to use for test ?

Sign In or Register to comment.