Bug 38193 - OpenGLViewRenderer crashes when leaving the page.
Summary: OpenGLViewRenderer crashes when leaving the page.
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS (show other bugs)
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-01-29 17:53 UTC by Andy
Modified: 2016-04-25 16:25 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Description Andy 2016-01-29 17:53:41 UTC
We tried switching from Xamarin.Forms 1.5.1 to XamarinForms 2.0.1.6505 . We have an OpenGLView that is on its own page. When we leave that page to go back to the main page, we get a crash.

Object reference not set to an instance of an object  at Xamarin.Forms.Platform.iOS.OpenGLViewRenderer.OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1 e) [0x0000e] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (Xamarin.Forms.Platform.iOS.TElement element) [0x00118] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (Boolean disposing) [0x0007b] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.ViewRenderer`2[TView,TNativeView].Dispose (Boolean disposing) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.OpenGLViewRenderer.Dispose (Boolean disposing) [0x00044] in <filename unknown>:0 
  at Foundation.NSObject.Dispose () [0x00000] in /Users/builder/data/lanes/2377/73229919/source/maccore/src/Foundation/NSObject2.cs:130 
  at Xamarin.Forms.Platform.iOS.Platform.DisposeModelAndChildrenRenderers (Xamarin.Forms.Element view) [0x00038] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00007] in <filename unknown>:0 
  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00015] in <filename unknown>:0 
  at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00021] in <filename unknown>:0 
  at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.Page.OnInternalRemoved (Xamarin.Forms.VisualElement view) [0x00013] in <filename unknown>:0 
  at Xamarin.Forms.Page.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00022] in <filename unknown>:0 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/2377/73229919/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:286 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (NotifyCollectionChangedAction action, System.Object item, Int32 index) [0x00000] in /Users/builder/data/lanes/2377/73229919/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:349 
  at System.Collections.ObjectModel.ObservableCollection`1[T].RemoveItem (Int32 index) [0x0002b] in /Users/builder/data/lanes/2377/73229919/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:203 
  at System.Collections.ObjectModel.Collection`1[T].Remove (System.Collections.ObjectModel.T item) [0x0002d] in /Users/builder/data/lanes/2377/73229919/source/mono/external/referencesource/mscorlib/system/collections/objectmodel/collection.cs:134 
  at Xamarin.Forms.NavigationPage+<PopAsyncInner>d__69.MoveNext () [0x00123] in <filename unknown>:0
Comment 1 Brandon Minnick 2016-02-08 22:44:00 UTC
Here's additional information about the app (from the customer)

What type of page navigation are you using?
MainPage is a NavigationPage. We go to the next page which has the OpenGLView using MainPage.Navigation.PushAsync

Is the OpenGLView nested inside of a view?
It is nested inside of of a view on the 2nd page.

Does the OpenGLView take up the whole screen?
No it is a square the full width of the screen.
Comment 2 Brandon Minnick 2016-02-10 23:28:20 UTC
Here's additional information about the app (from the customer)

We installed several of the versions of Xamarin.Forms.2.x to see if it was just a bug in the latest version. We went back 1 by 1. The first version where this crash happens is in 1.5.2.6469-pre1

We are currently on 1.5.1.6471

This is turning into a bigger issue for us because we need the ListViewCachingStrategy RecycleElement for an update we are working on.
Comment 3 Jason Smith [MSFT] 2016-03-10 18:38:22 UTC
Should be fixed in 2.2.0-pre1
Comment 4 Parmendra Kumar 2016-04-25 16:25:09 UTC
I have checked this issue with 2.2.0-pre1 and its working fine at my end. I am no getting crash with latest xamarin.forms package.

Hence closing this issue.

If you still facing same issue please feel free to reopen this issue.

Thanks.