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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

NullReferenceException on Dispose

Thread ID:

Created:

Updated:

Platform:

Replies:

141027 Nov 19,2018 09:24 PM UTC Nov 20,2018 05:38 AM UTC WPF 2
loading
Tags: SfCircularGauge
Grant
Asked On November 19, 2018 09:24 PM UTC

I saw several threads for IOS and Xamarin Forms with the same issue.  Using version 16.3.0.29.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Syncfusion.UI.Xaml.Gauges.CircularScale.CreateTicks()
   at Syncfusion.UI.Xaml.Gauges.CircularScale.OnRangeValueChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.Activate(Object item)
   at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
   at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperty(TreeChangeInfo info, DependencyObject d, FrameworkObject& fo, DependencyProperty dp, FrameworkPropertyMetadata fMetadata, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
   at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperties(TreeChangeInfo info, FrameworkElement fe, FrameworkContentElement fce, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
   at System.Windows.FrameworkElement.InvalidateTreeDependentProperties(TreeChangeInfo parentTreeState, Boolean isSelfInheritanceParent, Boolean wasSelfInheritanceParent)
   at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState)
   at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation)
   at System.Windows.FrameworkElement.OnVisualParentChanged(DependencyObject oldParent)
   at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent)
   at System.Windows.Media.Visual.RemoveVisualChild(Visual child)
   at System.Windows.Media.VisualCollection.DisconnectChild(Int32 index)
   at System.Windows.Media.VisualCollection.Clear()
   at System.Windows.Controls.UIElementCollection.ClearInternal()
   at System.Windows.Controls.Panel.ClearChildren()
   at System.Windows.Controls.Panel.OnItemsChangedInternal(Object sender, ItemsChangedEventArgs args)
   at System.Windows.Controls.Panel.OnItemsChanged(Object sender, ItemsChangedEventArgs args)
   at System.Windows.Controls.ItemContainerGenerator.OnRefresh()
   at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
   at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
   at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Windows.Data.ListCollectionView.RefreshOverride()
   at System.Windows.Data.CollectionView.RefreshInternal()
   at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
   at Syncfusion.UI.Xaml.Gauges.SfCircularGauge.Dispose()
   at System.Windows.Navigation.DisposeTreeQueueItem.DisposeElement(Object node)
   at System.Windows.Navigation.DisposeTreeQueueItem.DisposeElement(Object node)
   at System.Windows.Navigation.DisposeTreeQueueItem.DisposeElement(Object node)
   at System.Windows.Navigation.DisposeTreeQueueItem.DisposeElement(Object node)
   at System.Windows.Navigation.DisposeTreeQueueItem.DisposeElement(Object node)
   at System.Windows.Navigation.DisposeTreeQueueItem.DisposeElement(Object node)
   at System.Windows.Navigation.DisposeTreeQueueItem.Dispatch(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Grant
Replied On November 19, 2018 09:27 PM UTC

Xaml:
<syncfusion:SfCircularGauge x:Name="gauge3" Margin="5" Background="Transparent" Grid.Column="1" HeaderAlignment="Bottom" BorderThickness="1" BorderBrush="White"  >
                    <syncfusion:SfCircularGauge.GaugeHeader>
                        <TextBlock Text="{Binding FluidicsStatus.HighVacuumStatus.VacuumPsi, StringFormat={}{0:F2} kPa, FallbackValue=0.0 kPa}"  Height="40" Width="auto" FontSize="18" Foreground="Black"/>
                    </syncfusion:SfCircularGauge.GaugeHeader>
                    <syncfusion:SfCircularGauge.Scales>
                        <syncfusion:CircularScale  MajorTickOffset="0.4" MinorTickOffset="0.4" LabelOffset="0.5" RimStroke="Maroon" TickStroke="{StaticResource ForegroundBrush}" SmallTickStroke="{StaticResource ForegroundBrush}"  SmallTickLength="8" RimStrokeThickness="5"
                                          LabelStroke="{StaticResource ForegroundBrush}" FontSize="14" FontWeight="SemiBold"  SmallTickStrokeThickness="2" SweepDirection="Counterclockwise"
                                          Interval="5" MinorTicksPerInterval="2" TickLength="20" TickStrokeThickness="1" BindRangeStrokeToLabels="False" BindRangeStrokeToTicks="False"
                                          StartAngle="45" SweepAngle="270" StartValue="{Binding FluidicsStatus.HighVacuumStatus.ManageParams.ErrorWeakKPa}" EndValue="{Binding FluidicsStatus.HighVacuumStatus.ManageParams.ErrorStrongKPa}" >
                            <syncfusion:CircularScale.Ranges>
                                <syncfusion:CircularRange StartValue="{Binding FluidicsStatus.HighVacuumStatus.ManageParams.WeakKPa}" EndValue="{Binding FluidicsStatus.HighVacuumStatus.ManageParams.TargetKPa}"  Stroke="DarkGreen"  />
                            </syncfusion:CircularScale.Ranges>
                            <syncfusion:CircularScale.Pointers>
                                <syncfusion:CircularPointer EnableAnimation="True" PointerCapDiameter="20" PointerType="NeedlePointer" NeedlePointerStroke="LightSkyBlue" NeedlePointerStrokeThickness="5" NeedleLengthFactor="0.8" PointerCapStroke="#414d4f" Value="{Binding FluidicsStatus.HighVacuumStatus.VacuumPsi}"/>
                            </syncfusion:CircularScale.Pointers>
                        </syncfusion:CircularScale>
                    </syncfusion:SfCircularGauge.Scales>
                </syncfusion:SfCircularGauge>

Muneesh Kumar G [Syncfusion]
Replied On November 20, 2018 05:38 AM UTC

Hi Grant, 
 
Greetings from Syncfusion. We have checked the reported scenario with our end and we were able to reproduce the reported issue. We have logged a defect report for this and the fix will be available in our upcoming Volume 4 release which is expected to be roll out on mid of December 2018. 
 
Regards, 
Muneesh Kumar G. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon