Bug 36269 - NullReferenceException when Pushing a Modal ContentPage
Summary: NullReferenceException when Pushing a Modal ContentPage
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-11-25 23:12 UTC by Stuart Campbell
Modified: 2016-08-26 10:07 UTC (History)
6 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:
RESOLVED NORESPONSE

Description Stuart Campbell 2015-11-25 23:12:49 UTC
I get this error consistently in our App - unfortunately I haven't been able to build a repro case for it but I'm hoping the below stacktrace can highlight where it is occurring.

Background - we have a master/detail main view in our app - when a user logs out the master/detail screen is hidden and a login screen is displayed modally - this is when the crash occurs.

StackTrace:


 at Xamarin.Forms.VisualElement.get_IsVisible () [0x0000b] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementTracker.OnUpdateNativeControl (CoreAnimation.CALayer caLayer) [0x001a0] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementTracker.UpdateNativeControl () [0x00027] in <filename unknown>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementTracker.HandlePropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x0015a] in <filename unknown>:0 
  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00012] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) [0x000fb] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) [0x0014b] in <filename unknown>:0 
  at Xamarin.Forms.BindingExpression.ApplyCore (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property, Boolean fromTarget) [0x0020b] in <filename unknown>:0 
  at Xamarin.Forms.BindingExpression.Apply (System.Object sourceObject, Xamarin.Forms.BindableObject target, Xamarin.Forms.BindableProperty property) [0x0006b] in <filename unknown>:0 
  at Xamarin.Forms.Binding.Apply (System.Object newContext, Xamarin.Forms.BindableObject bindObj, Xamarin.Forms.BindableProperty targetProperty) [0x00042] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.ApplyBindings (System.Object oldContext, Boolean skipBindingContext) [0x0003b] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.ApplyBindings (System.Object oldContext) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x0005a] in <filename unknown>:0 
  at Xamarin.Forms.Element.OnBindingContextChanged () [0x0001d] in <filename unknown>:0 
  at Xamarin.Forms.View.OnBindingContextChanged () [0x00042] in <filename unknown>:0 
  at Xamarin.Forms.Grid.OnBindingContextChanged () [0x00006] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.SetInheritedBindingContext (Xamarin.Forms.BindableObject bindable, System.Object value) [0x00061] in <filename unknown>:0 
  at Xamarin.Forms.Element.OnBindingContextChanged () [0x0001d] in <filename unknown>:0 
  at Xamarin.Forms.Cell.OnBindingContextChanged () [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.BindingContextPropertyBindingPropertyChanged (Xamarin.Forms.BindableObject bindable, System.Object oldvalue, System.Object newvalue) [0x0001b] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) [0x0010e] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) [0x0014b] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, Boolean fromStyle, Boolean checkAccess) [0x0005f] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.BindableObject.set_BindingContext (System.Object value) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.TemplatedItemsList`2[TView,TItem].UnhookItem (Xamarin.Forms.TItem item) [0x00011] in <filename unknown>:0 
  at Xamarin.Forms.TemplatedItemsList`2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e, Boolean fixWindows) [0x00480] in <filename unknown>:0 
  at Xamarin.Forms.TemplatedItemsList`2[TView,TItem].OnProxyCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00000] in <filename unknown>:0 
  at Xamarin.Forms.ListProxy.OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000a] in <filename unknown>:0 
  at Xamarin.Forms.ListProxy+<>c__DisplayClass52_0.<OnCollectionChanged>b__0 () [0x00018] in <filename unknown>:0 
  at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/Foundation/NSAction.cs:163 
  at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
  at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication.cs:77 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0001c] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication.cs:60 
  at Condor.Mobile.iOS.Application.Main (System.String[] args) [0x0001f] in /Users/Stuart/Sandbox/Distillery/Condor/Modules/Surveillance/Clients/Condor.Mobile.Surveillance/Main/Condor.Mobile.Surveillance.iOS/Main.cs:32
Comment 1 Rui Marinho 2016-01-29 15:34:11 UTC
Thank you for taking the time to submit the bug. We tried to reproduce the issue you reported but were unable given the description. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue we would very much appreciate it.

Warm regards,
Xamarin Forms Team
Comment 2 Samantha Houts [MSFT] 2016-04-13 19:48:33 UTC
Thank you for your bug report. As we have not received the information requested, we cannot properly triage your bug and are marking it resolved.

Warm regards,
Xamarin Forms Team