We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

exception thrown when setting Details page of MasterDetail leaving the page that has the sfBarCode on it

Thread ID:

Created:

Updated:

Platform:

Replies:

126211 Sep 30,2016 04:25 PM Oct 20,2016 09:16 AM Xamarin.Forms 5
loading
Tags: SfBarcode
Nancy Healy
Asked On September 30, 2016 04:25 PM

Hello,

I am consistently getting an error when loading the detail page of a master detail page where my scenario is that it always happens when i load the next detail page after having a page that has the sfbarcode on it.  The error stacktrace is probably too much to put here but here is an excerpt of the top of stack:

at Syncfusion.SfBarcode.XForms.iOS.SfBarcodeMapping.OnSfBarcodePropertyChanged (System.String propertyName, Syncfusion.SfBarcode.XForms.SfBarcode barcode, Syncfusion.SfBarcode.iOS.SFBarcode nativeBarcode) [0x00352] in <ff4b85d453594494b69b0e76c46d7705>:0 

  at Syncfusion.SfBarcode.XForms.iOS.SfBarcodeRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00014] in <ff4b85d453594494b69b0e76c46d7705>:0 

  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)

  at Xamarin.Forms.BindableObject.OnPropertyChanged ...


Here is the near the bottom of the exception stack:

Syncfusion.SfBarcode.XForms.iOS.SfBarcodeRenderer.Dispose () [0x00008] in <ff4b85d453594494b69b0e76c46d7705>:0 

  at Xamarin.Forms.Platform.iOS.Platform.DisposeModelAndChildrenRenderers (Xamarin.Forms.Element view) [0x00038] in <34c8b4fc19184af1ae50594c101d8864>:0 

  at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00007] in <34c8b4fc19184af1ae50594c101d8864>:0 

  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00015] in <3b59ae6b0d94490dbc4d42528dcd29bb>:0 

  at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00021] in <3b59ae6b0d94490dbc4d42528dcd29bb>:0 

  at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in <3b59ae6b0d94490dbc4d42528dcd29bb>:0 

  at Xamarin.Forms.Page.OnInternalRemoved (Xamarin.Forms.VisualElement view) [0x00013] in <3b59ae6b0d94490dbc4d42528dcd29bb>:0 

  

maybe an issue of disposing of the custom renderer?  We do not have this same issue with any of the other sf xamarin forms controls that we are using.  Any thoughts?  Thanks for your time.



Sivakumar Punniya Moorthi [Syncfusion]
Replied On October 3, 2016 07:55 AM

Hi Nancy,

Thanks for using syncfusion products.

We are unable to reproduce the mentioned issue at Barcode sample. Could you please provide us more details along with issue reproducing sample? It will be helpful for us to analyze on it and provide you a possible solution. 
  
Please let us know, if you have any queries. 

Regards,
Sivakumar P 


Marc Hägele
Replied On October 19, 2016 10:35 AM

Have the same Issue.

And it happens only on iOS.



Marc Hägele
Replied On October 19, 2016 10:36 AM

My Stack:


Application Specific Information:
*** Terminating app due to uncaught exception 'System.AggregateException', reason: 'System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Syncfusion.SfBarcode.XForms.iOS.SfBarcodeMapping.OnSfBarcodePropertyChanged (System.String propertyName, Syncfusion.SfBarcode.XForms.SfBarcode barcode, Syncfusion.SfBarcode.iOS.SFBarcode nativeBarcode) [0x00352] in <ff4b85d453594494b69b0e76c46d7705>:0 
  at Syncfusion.SfBarcode.XForms.iOS.SfBarcodeRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00014] in <ff4b85d453594494b69b0e76c46d7705>:0 
  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00012] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.BindableObject+SetValueFlags attributes, System.Boolean silent) [0x000fb] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.BindableObject+SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0014b] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0005f] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Syncfusion.SfBarcode.XForms.SfBarcode.set_SymbologySettings (Syncfusion.SfBarcode.XForms.BarcodeSettings value) [0x00000] in <a01c3ff686df42b7a7ecf36c6ee18922>:0 
  at Syncfusion.SfBarcode.XForms.SfBarcode.Dispose () [0x00008] in <a01c3ff686df42b7a7ecf36c6ee18922>:0 
  at Syncfusion.SfBarcode.XForms.iOS.SfBarcodeRenderer.Dispose () [0x00008] in <ff4b85d453594494b69b0e76c46d7705>:0 
  at Xamarin.Forms.Platform.iOS.Platform.DisposeModelAndChildrenRenderers (Xamarin.Forms.Element view) [0x00038] in <a6cd19dbb15f4cf7a888f95a192e4376>:0 
  at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00007] in <a6cd19dbb15f4cf7a888f95a192e4376>:0 
  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00015] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00028] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00021] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Page.OnInternalRemoved (Xamarin.Forms.VisualElement view) [0x00013] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Page.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00022] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:351 
  at System.Collections.ObjectModel.ObservableCollection`1[T].RemoveItem (System.Int32 index) [0x0002b] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:205 
  at System.Collections.ObjectModel.Collection`1[T].Remove (T item) [0x0002d] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/collections/objectmodel/collection.cs:113 
  at Xamarin.Forms.NavigationPage+<PopAsyncInner>d__58.MoveNext () [0x00123] in <7b0368eb3d0f405da776a09e3171532a>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer+<>c__DisplayClass54_0+<<RemoveViewControllers>b__0>d.MoveNext () [0x000d4] in <a6cd19dbb15f4cf7a888f95a192e4376>:0 
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object
  at Syncfusion.SfBarcode.XForms.iOS.SfBarcodeMapping.OnSfBarcodePropertyChanged (System.String propertyName, Syncfusion.SfBarcode.XForms.SfBarcode barcode, Syncfusion.SfBarcode.iOS.SFBarcode nativeBarcode) [0x00352] in <ff4b85d453594494b69b0e76c46d7705>:0 
  at Syncfusion.SfBarcode.XForms.iOS.SfBarcodeRenderer.OnElementPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) [0x00014] in <ff4b85d453594494b69b0e76c46d7705>:0 
  at (wrapper delegate-invoke) <Module>:invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
  at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00012] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.BindableObject+SetValueFlags attributes, System.Boolean silent) [0x000fb] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.BindableObject+SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x0014b] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x0005f] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Syncfusion.SfBarcode.XForms.SfBarcode.set_SymbologySettings (Syncfusion.SfBarcode.XForms.BarcodeSettings value) [0x00000] in <a01c3ff686df42b7a7ecf36c6ee18922>:0 
  at Syncfusion.SfBarcode.XForms.SfBarcode.Dispose () [0x00008] in <a01c3ff686df42b7a7ecf36c6ee18922>:0 
  at Syncfusion.SfBarcode.XForms.iOS.SfBarcodeRenderer.Dispose () [0x00008] in <ff4b85d453594494b69b0e76c46d7705>:0 
  at Xamarin.Forms.Platform.iOS.Platform.DisposeModelAndChildrenRenderers (Xamarin.Forms.Element view) [0x00038] in <a6cd19dbb15f4cf7a888f95a192e4376>:0 
  at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00007] in <a6cd19dbb15f4cf7a888f95a192e4376>:0 
  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00015] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00028] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x00021] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Page.OnInternalRemoved (Xamarin.Forms.VisualElement view) [0x00013] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at Xamarin.Forms.Page.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00022] in <7b0368eb3d0f405da776a09e3171532a>:0 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:351 
  at System.Collections.ObjectModel.ObservableCollection`1[T].RemoveItem (System.Int32 index) [0x0002b] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:205 
  at System.Collections.ObjectModel.Collection`1[T].Remove (T item) [0x0002d] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/collections/objectmodel/collection.cs:113 
  at Xamarin.Forms.NavigationPage+<PopAsyncInner>d__58.MoveNext () [0x00123] in <7b0368eb3d0f405da776a09e3171532a>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3818/ad1cd42d/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
  at Xamarin.Forms.Platform.iOS.NavigationRenderer+<>c__DisplayClass54_0+<<RemoveViewControllers>b__0>d.MoveNext () [0x000d4] in <a6cd19dbb15f4cf7a888f95a192e4376>:0 <---

Marc Hägele
Replied On October 19, 2016 11:54 AM

Ok Guys,

as I have a lot of time pressure to get this app ready and sorry in advance...

After disassembly the SfBarcode.XForms.IOS and fixing all the ugly disassembly errors I was able to fix it this way:





      if (propertyName == SfBarcode.SymbologySettingsProperty.PropertyName)
        {
          this.nativeSettings = BarcodeSettingsMapping.GetNativeBarcodeSettings(barcode.SymbologySettings, barcode);
          if (this.nativeSettings != null)
          {
            nativeBarcode.SymbologySettings = (this.nativeSettings);
          }
          if (barcode.SymbologySettings != null)
          {
            barcode.SymbologySettings.PropertyChanged += SymbologySettings_PropertyChanged;
          }
        }

It was crashing on adding the eventhandler to SymbologySettings when going back on the navigator, but barcode.SymbologySettings is already null.

Best regards
Marc



Sivakumar Punniya Moorthi [Syncfusion]
Replied On October 20, 2016 09:16 AM


Hi Marc,

We have found Simliar support incident under your account to track the status of this issue. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know, if you have any query.

Regards,
Sivakumar P.
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;