NullReferenceExpection in ContainerFromIndex

4 posts, 0 answers
  1. Matthias Bibo
    Matthias Bibo avatar
    72 posts
    Member since:
    Mar 2010

    Posted 09 Jul 2014 Link to this post


    Hi,

    I am getting a NullReferenceExpection in the RadTreeView. I'm afraid i don't know exactly when it happens because I was not able to reproduce it successfully.

    Here is the Stacktrace:

    Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
    StackTrace:
       bei System.Windows.Controls.ItemContainerGenerator.ContainerFromIndex(Int32 index, Boolean translateForItemsControl)
       bei Telerik.Windows.Controls.RadTreeView.UpdateTabStopOnSelectionFromUI(IEnumerable`1 selectedItems)
       bei Telerik.Windows.Controls.RadTreeView.OnSelectionChangerSelectionChanged(Object sender, SelectionChangedEventArgs e)
       bei Telerik.Windows.Controls.SelectionChanger`1.InvokeSelectionChangedEvent(SelectionChangedEventArgs e)
       bei Telerik.Windows.Controls.SelectionChanger`1.End()
       bei Telerik.Windows.Controls.SelectionChanger`1.RemoveItem(Int32 index)
       bei System.Collections.ObjectModel.Collection`1.Remove(T item)
       bei Telerik.Windows.Controls.RadTreeViewItem.OnIsSelectedPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
       bei System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
       bei System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
       bei System.Windows.DependencyObject.InvalidateProperty(DependencyProperty property)
       bei MS.Internal.FrameworkCallbacks.InvalidateProperty(IntPtr nativeTarget, UInt32 propertyId)


    Is this a known issue, or is there a workaround for it?

    Best Regards
    Matthias
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 10 Jul 2014 Link to this post

    Hi Matthias,

    We are not aware of similar logged issue in our system. However, we would like to investigate it and that is why we kindly ask you to provide more information on it. Is it possible for you to send us a captured video, or an isolated project that we can look at ? How do you populate your RadTreeView ? What steps do you perform in order to reproduce the exception ? Thank you in advance fr your cooperation.

    Regards,
    Petar Mladenov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Matthias Bibo
    Matthias Bibo avatar
    72 posts
    Member since:
    Mar 2010

    Posted 11 Jul 2014 in reply to Petar Mladenov Link to this post

    Hi Petar,

    i'm afraid I cannot give you any more Information on this issue, because I
    simply don't have any. I found this Error in our logfile of one of our client
    installations. I have not been able to reproduce this bug myself. I am also not
    sure where this bug occurs, only that it does relative frequently at one of our
    clients using the current official release of telerik Controls for Silverlight.


    Here is the full Logfile entry:

    2014-07-10 15:38:25,795 ERROR 16 Bdl.DialogCrm.Silverlight -172.23.71.71.---> #### Client EXCEPTION: 
    Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
    StackTrace:
       bei System.Windows.Controls.ItemContainerGenerator.ContainerFromIndex(Int32 index,Boolean translateForItemsControl)
       bei Telerik.Windows.Controls.RadTreeView.UpdateTabStopOnSelectionFromUI(IEnumerable`1 selectedItems)
       bei Telerik.Windows.Controls.RadTreeView.OnSelectionChangerSelectionChanged(Object sender, SelectionChangedEventArgs e)
       bei Telerik.Windows.Controls.SelectionChanger`1.InvokeSelectionChangedEvent(SelectionChangedEventArgs e)
       bei Telerik.Windows.Controls.SelectionChanger`1.End()
       bei Telerik.Windows.Controls.SelectionChanger`1.RemoveItem(Int32 index)
       bei System.Collections.ObjectModel.Collection`1.Remove(T item)
       bei Telerik.Windows.Controls.RadTreeViewItem.OnIsSelectedPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
       bei System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
       bei System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
       bei System.Windows.DependencyObject.InvalidateProperty(DependencyProperty property)
       bei MS.Internal.FrameworkCallbacks.InvalidateProperty(IntPtr nativeTarget, UInt32 propertyId)


    I was hoping a code review of the functions in this stack trace would be
    sufficient to find a missing null check.

    Best Regards

    Matthias

  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 15 Jul 2014 Link to this post

    Hello Matthias,

    I checked our code and I believe we have the necessary null checks in the mentioned UpdateTabStopOnSelectionFromUI method.
    However, looking at the last line in the stacktrace : System.Windows.Controls.ItemContainerGenerator.ContainerFromIndex(Int32 index,Boolean translateForItemsControl)
    it seems that this might be also an issue in the Silverlight framework. Any additional information about this scenario might help us better investigate it.

    Regards,
    Petar Mladenov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top