This is a migrated thread and some comments may be shown as answers.

NullReferenceExpection in ContainerFromIndex

3 Answers 91 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matthias Bibo
Top achievements
Rank 1
Matthias Bibo asked on 09 Jul 2014, 12:28 PM

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

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 10 Jul 2014, 07:28 AM
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.
 
0
Matthias Bibo
Top achievements
Rank 1
answered on 11 Jul 2014, 07:09 AM
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

0
Petar Mladenov
Telerik team
answered on 15 Jul 2014, 08:47 AM
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.
 
Tags
TreeView
Asked by
Matthias Bibo
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Matthias Bibo
Top achievements
Rank 1
Share this question
or