Object reference not set to an instance of an object

2 posts, 0 answers
  1. Marco Abergo
    Marco Abergo avatar
    1 posts
    Member since:
    Mar 2009

    Posted 21 Jun Link to this post

    I have a CarouselPage with three ContentPage.

    In each ContentPage I have a RadPieChart. I have a refresh button on the toolbar that read the data and refresh all the pie charts.

    If I press the refresh button on the first or on the second ContentPage all is ok.

    If I press the refresh button on the third page I have this error:

    Object reference not set to an instance of an object

    Can you help me???

    The call stack is:

      at Telerik.XamarinForms.ChartRenderer.Android.PieChartRenderer.SeriesInternal_CollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00028] in <filename unknown>:0 
      at (wrapper delegate-invoke) <Module>:invoke_void_object_NotifyCollectionChangedEventArgs (object,System.Collections.Specialized.NotifyCollectionChangedEventArgs)
      at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00012] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288 
      at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (NotifyCollectionChangedAction action, System.Object item, Int32 index) [0x00000] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:351 
      at System.Collections.ObjectModel.ObservableCollection`1[T].InsertItem (Int32 index, System.Collections.ObjectModel.T item) [0x00024] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:219 
      at Telerik.XamarinForms.Chart.ElementsCollection`1[T].InsertItem (Int32 index, Telerik.XamarinForms.Chart.T item) [0x0001b] in <filename unknown>:0 
      at System.Collections.ObjectModel.Collection`1[T].Add (System.Collections.ObjectModel.T item) [0x00023] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/mscorlib/system/collections/objectmodel/collection.cs:67 
      at MobileCRM.Shared.DashboardView+<>c__DisplayClass2_0.<.ctor>b__1 (System.Collections.Generic.List`1 datiAttivita) [0x00360] in D:\Prj3rd\OndaCRMApp\Client\MobileCRM.Shared\Pages\Home\DashboardView.xaml.cs:212 
      at Xamarin.Forms.MessagingCenter+<>c__DisplayClass4_0`1[TSender].<Subscribe>b__0 (System.Object sender, System.Object args) [0x00027] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Core\MessagingCenter.cs:54 
      at Xamarin.Forms.MessagingCenter.InnerSend (System.String message, System.Type senderType, System.Type argType, System.Object sender, System.Object args) [0x00069] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Core\MessagingCenter.cs:95 
      at Xamarin.Forms.MessagingCenter.Send[TSender] (Xamarin.Forms.TSender sender, System.String message) [0x00013] in C:\BuildAgent3\work\aad494dc9bc9783\Xamarin.Forms.Core\MessagingCenter.cs:23 
      at MobileCRM.Shared.DashboardViewModel+<ExecuteLoadSeedDataCommand>d__6.MoveNext () [0x00a03] in D:\Prj3rd\OndaCRMApp\Client\MobileCRM.Shared\ViewModels\Home\DashboardViewModel.cs:128 
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2923/52635947/source/mono/external/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/2923/52635947/source/mono/external/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/2923/52635947/source/mono/external/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/2923/52635947/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
      at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
      at MobileCRM.Shared.DashboardViewModel+<<get_LoadSeedDataCommand>b__5_0>d.MoveNext () [0x0001f] in D:\Prj3rd\OndaCRMApp\Client\MobileCRM.Shared\ViewModels\Home\DashboardViewModel.cs:45 
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
      at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (System.Object state) [0x00000] in /Users/builder/data/lanes/2923/52635947/source/mono/external/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
      at Android.App.SyncContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18 
      at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36 
      at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3340/4e275588/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.IRunnable.cs:81 
      at (wrapper dynamic-method) System.Object:10380bda-a7f1-45e5-8e3f-7465ce556290 (intptr,intptr)

     

     

     

     

  2. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 23 Jun Link to this post

    Hi Marco,

    Thanks for writing and for the details. Unfortunately, the stack trace does not allow us to pinpoint a possible cause for the exception -- we can see the line in the code, but it is not clear why would a certain reference be null at that point. Can you send us a small sample, which reproduces the problem, so that we can investigate? Looking forward to hearing from you.

    Best regards,
    Ves
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top