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

Nullreference exception when too long?

1 Answer 49 Views
ExpanderControl
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
selom
Top achievements
Rank 1
selom asked on 23 Apr 2013, 04:44 PM
I have a raddataboundlistbox with various items. One of the listitems is an expander control that expands a conversation. I'm getting a crash when the conversation is too long, here is the stack trace

System.NullReferenceException was unhandled
  Message=NullReferenceException
  StackTrace:
       at Telerik.Windows.Controls.VirtualizationStrategy.CheckBottomScrollableBounds()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.ManageViewport()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.BalanceVisualSpace()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.CleanupAfterCollectionReset()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.OnCollectionReset()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.UpdateViewportOnItemsChange(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Controls.RadVirtualizingDataControl.OnItemsChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Controls.RadDataBoundListBox.OnItemsChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Controls.Primitives.DataControlBase.OnListSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadListSource.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.Windows.Data.RadListSource.RefreshOverride()
       at Telerik.Windows.Data.RadListSource.Refresh()
       at Telerik.Windows.Data.RadListSource.AttachData(IEnumerable data)
       at Telerik.Windows.Data.RadListSource.SetSource(IEnumerable value)
       at Telerik.Windows.Data.RadListSource.set_SourceCollection(IEnumerable value)
       at Telerik.Windows.Controls.RadDataBoundListBox.OnItemsSourceChanged(IEnumerable oldSource)
       at Telerik.Windows.Controls.Primitives.DataControlBase.OnItemsSourceChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
       at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
       at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
       at System.Windows.Data.BindingExpression.RefreshExpression()
       at System.Windows.Data.BindingExpression.SendDataToTarget()
       at System.Windows.Data.BindingExpression.SourceAcquired()
       at System.Windows.Data.BindingExpression.System.Windows.IDataContextChangedListener.OnDataContextChanged(Object sender, DataContextChangedEventArgs e)
       at System.Windows.Data.BindingExpression.DataContextChanged(Object sender, DataContextChangedEventArgs e)
       at System.Windows.FrameworkElement.OnDataContextChanged(DataContextChangedEventArgs e)
       at System.Windows.FrameworkElement.OnAncestorDataContextChanged(DataContextChangedEventArgs e)
       at System.Windows.FrameworkElement.NotifyDataContextChanged(DataContextChangedEventArgs e)
       at System.Windows.FrameworkElement.OnAncestorDataContextChanged(DataContextChangedEventArgs e)
       at System.Windows.FrameworkElement.NotifyDataContextChanged(DataContextChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyProperty dp)
       at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
       at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
       at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.FrameworkElement.set_DataContext(Object value)
       at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
       at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
       at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
       at MS.Internal.FrameworkCallbacks.SetPropertyOrAddItem(Object target, PropertyInfo propertyInfo, Object value, Int32 typeIndex, String propertyName)
       at MS.Internal.FrameworkCallbacks.SetNonAttachedProperty(Object target, String propertyName, Object propertyValue, Int32 typeIndex)
       at MS.Internal.FrameworkCallbacks.SetValueToProperty(Object target, String propertyName, Object propertyValue, Int32 typeIndex, String attachedDPOwnerNamespace, String attachedDPOwnerAssembly)
       at MS.Internal.FrameworkCallbacks.SetProperty(IntPtr nativeTarget, String propertyName, CValue& propertyValue, Int32 typeIndex, String attachedDPOwnerNamespace, String attachedDPOwnerAssembly)
       at MS.Internal.XcpImports.MeasureNative(IntPtr element, Single inWidth, Single inHeight)
       at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at Telerik.Windows.Controls.RadExpanderControl.MeasureOverride(Size availableSize)
       at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)
       at MS.Internal.XcpImports.MeasureOverrideNative(IntPtr element, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
       at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
       at System.Windows.FrameworkElement.MeasureOverride(Size availableSize)
       at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)
       at MS.Internal.XcpImports.MeasureNative(IntPtr element, Single inWidth, Single inHeight)
       at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at Telerik.Windows.Controls.StackVirtualizationStrategy.MeasureContainer(RadVirtualizingDataControlItem container)
       at Telerik.Windows.Controls.VirtualizationStrategy.GetContainerForItem(IDataSourceItem item, Int32 insertAt)
       at Telerik.Windows.Controls.StackVirtualizationStrategy.GetContainerForItem(IDataSourceItem item, Int32 insertAt)
       at Telerik.Windows.Controls.VirtualizationStrategy.GetContainerForItem(IDataSourceItem item, Boolean insertLast)
       at Telerik.Windows.Controls.VirtualizationStrategy.ManageLowerViewport(Boolean recycle)
       at Telerik.Windows.Controls.RadVirtualizingDataControl.ManageViewport()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.BalanceVisualSpace()
       at Telerik.Windows.Controls.RadVirtualizingDataControl.OnVerticalScrollOffsetChanged(Boolean balanceImmediately)
       at Telerik.Windows.Controls.RadDataBoundListBox.OnVerticalScrollOffsetChanged(Boolean balanceImmediately)
       at Telerik.Windows.Controls.RadVirtualizingDataControl.OnCompositionTarget_Rendering(Object sender, EventArgs e)
       at System.Windows.Media.CompositionTarget.OnRendering(Object sender, RenderingEventArgs e)
       at MS.Internal.JoltHelper.RaiseEvent(IntPtr target, UInt32 eventId, IntPtr coreEventArgs, UInt32 eventArgsTypeIndex)

Also when it crashes, raddiagnostics is unable to handle it (no dialog).

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 24 Apr 2013, 06:43 AM
Hi Selom,

Thanks for writing and for reporting this issue.

It will be great if you manage to isolate the issue in a small Windows Phone project and send it to us for debugging. This will help us directly investigate the case and see how we can assist you further.

Note that you will have to open a new support ticket in order to be able to attach your project.

Thanks for your time.

All the best,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
ExpanderControl
Asked by
selom
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or