wilsonvargas / ButtonCirclePlugin

Circle Buttons with icon for your Xamarin.Forms Applications
MIT License
96 stars 18 forks source link

Crashes on Android When Navigate to Page #30

Closed eopeter closed 6 years ago

eopeter commented 6 years ago

This plugin has issues where when you navigate to a page with the ButtonCircle, the app crashes with the following error. Was working before update to v2.0.2 and latest Xamarin Forms 2.5....

ButtonCircleRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs`1[TElement] e) System.NullReferenceException: Object reference not set to an instance of an object

1 ButtonCircleRenderer.OnElementChanged (Xamarin.Forms.Platform.Android.ElementChangedEventArgs1[TElement] e) 2 VisualElementRenderer1[TElement].SetElement (TElement element) 3 IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) 4 Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) 5 VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) 6 VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) 7 VisualElementPackager.Load () 8 VisualElementRenderer1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) 9 VisualElementRenderer1[TElement].SetElement (TElement element) 10 IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) 11 Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) 12 VisualElementPackager.AddChild (Xamarin.Forms.VisualElement view, Xamarin.Forms.Platform.Android.IVisualElementRenderer oldRenderer, Xamarin.Forms.Platform.Android.RendererPool pool, System.Boolean sameChildren) 13 VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) 14 VisualElementPackager.Load () 15 VisualElementRenderer1[TElement].SetPackager (Xamarin.Forms.Platform.Android.VisualElementPackager packager) 16 VisualElementRenderer1[TElement].SetElement (TElement element) 17 IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) 18 Platform.CreateRenderer (Xamarin.Forms.VisualElement element, Android.Content.Context context) 19 ViewCellRenderer.GetCellCore (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context) 20 CellRenderer.GetCell (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context) 21 CellFactory.GetCell (Xamarin.Forms.Cell item, Android.Views.View convertView, Android.Views.ViewGroup parent, Android.Content.Context context, Xamarin.Forms.View view) 22 ListViewAdapter.GetView (System.Int32 position, Android.Views.View convertView, Android.Views.ViewGroup parent) 23 BaseAdapter.n_GetView_ILandroid_view_View_Landroid_viewViewGroup (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 position, System.IntPtr native_convertView, System.IntPtr native_parent) 24 (wrapper dynamic-method) System.Object.0da3b9c2-4f96-42ce-bd4d-03be1c52fc87(intptr,intptr,int,intptr,intptr)

hytea commented 6 years ago

@eopeter FWIW, This error usually has to do with the reference to the icon font library you are using. I was seeing this error when I was trying to load the material icon given in the example at the bottom of the main page in this repo. The icon is "md-ic-directions-bike" and should be "md-directions-bike" after I changed that it worked fine.

wilsonvargas commented 6 years ago

Yes, this is problem probably. The list of icons was changed since version 1.3.9, please check it here. I going to process close this issue.