=Error HRESULT E_FAIL has been returned from a call to a COM component.

2 posts, 0 answers
  1. Yonghan
    Yonghan avatar
    27 posts
    Member since:
    Dec 2010

    Posted 10 Jan 2011 Link to this post

    Hi,

    Here is the situation.
    If chart have DataPoints without Annotations, works fine.
         DataSeries.Clear();
         :
         Annotations.Clear();
         :

    If I added some MarkedZone annotations, then  system throws an COM exception at DataSeries.Clear();

    So, I chagned call sequence like this.
    1) Annotations.Clear();
    2) DataSeries.Clear();
    ==> It's working!

    The stacktrace is as follows:

    System.Exception was unhandled by user code
      Message=Error HRESULT E_FAIL has been returned from a call to a COM component.
      StackTrace:
           at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
           at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, String s)
           at MS.Internal.XcpImports.SetValue(IManagedPeerBase doh, DependencyProperty property, Object obj)
           at System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value)
           at System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty property, EffectiveValueEntry& newEntry, 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.DependencyPropertyChangedWeakListener.SourcePropertyChanged(DependencyObject c, DependencyProperty dp)
           at System.Windows.DPChangedEventHandler.Invoke(DependencyObject sender, DependencyProperty dp)
           at System.Windows.DependencyObject.OnPropertyChanged(DependencyProperty dp)
           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.SetValue(DependencyProperty dp, Object value)
           at Telerik.Windows.Controls.Charting.MarkedZone.set_ElementMargin(Thickness value)
           at Telerik.Windows.Controls.Charting.MarkedZone.Update()
           at Telerik.Windows.Controls.Charting.ChartArea.UpdateAnnotations()
           at Telerik.Windows.Controls.Charting.Axis.UpdateRangeAndStep(Double minValue, Double maxValue, Double step)
           at Telerik.Windows.Controls.Charting.Axis.UpdateRangeAndStep()
           at Telerik.Windows.Controls.Charting.Axis.BuildAxisData()
           at Telerik.Windows.Controls.Charting.AxisY.BuildAxisData()
           at Telerik.Windows.Controls.Charting.Axis.UpdateAxis()
           at Telerik.Windows.Controls.Charting.AxisY.UpdateAxis()
           at Telerik.Windows.Controls.Charting.Axis.ChartAreaDataChanged(Object sender, EventArgs e)
           at System.EventHandler.Invoke(Object sender, EventArgs e)
           at Telerik.Windows.Controls.Charting.ChartArea.OnDataChanged()
           at Telerik.Windows.Controls.Charting.ChartArea.UpdateChart()
           at Telerik.Windows.Controls.Charting.ChartArea.OnDataSeriesItemPropertyChanged(Object sender, PropertyChangedEventArgs e)
           at Telerik.Windows.Controls.Charting.RadHierarchicalObservableCollection`1.OnItemPropertyChanged(Object sender, PropertyChangedEventArgs args)
           at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
           at System.Collections.ObjectModel.ObservableCollection`1.OnPropertyChanged(PropertyChangedEventArgs e)
           at Telerik.Windows.Data.RadObservableCollection`1.OnPropertyChanged(PropertyChangedEventArgs e)
           at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
           at Telerik.Windows.Data.RadObservableCollection`1.ClearItems()
           at Telerik.Windows.Controls.Charting.RadHierarchicalObservableCollection`1.ClearItems()
           at Telerik.Windows.Controls.Charting.DataSeries.ClearItems()
           at System.Collections.ObjectModel.Collection`1.Clear()
           at RMS.Controls.ChartBuilder.ModDataSeries(RadChart chart, String seriesName, List`1 models)
           at RMS.Views.ProdManCreateRecipe.ManageRecipeItem(Object state)
      InnerException:


    and VS2010 Exception is as follows:
    Microsoft JScript runtime error: Unhandled Error in Silverlight Application
    Code: 4004   
    Category: ManagedRuntimeError      
    Message: MS.Internal.WrappedException: UIElement.Measure(availableSize) cannot be called with NaN size.  ---> System.InvalidOperationException: UIElement.Measure(availableSize) cannot be called with NaN size.
       at System.Windows.UIElement.Measure(Size availableSize)
       at Telerik.Windows.Controls.Charting.LinearSeriesPanel.MeasureOverride(Size availableSize)
       at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
       --- ?? ?? ?? ??? ? ---
       at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
       at System.Windows.UIElement.UpdateLayout()
       at Telerik.Windows.Controls.HACKS.AttachPopupToVisualTree(Popup popup)
       at Telerik.Windows.Controls.PopupManager.Open(Popup popup, Boolean attachToVisualRoot)
       at Telerik.Windows.Controls.PopupManager.OpenWindow(Popup popup, Boolean attachToVisualRoot)
       at Telerik.Windows.Controls.PopupManager.Open(Popup popup, PopupType type, Boolean attachToVisualRoot)
       at Telerik.Windows.Controls.PopupManager.Open(Popup popup, PopupType type)
       at Telerik.Windows.Controls.RadWindowPopup.WindowPopupSilverlightFactory.WindowPopupSilverlightImpl.Show()
       at Telerik.Windows.Controls.RadWindowPopup.WindowPopupSilverlightFactory.WindowPopupSilverlightImpl.OpenPopup()
       at Telerik.Windows.Controls.RadWindowPopup.WindowPopup.Open(Boolean isModal)
       at Telerik.Windows.Controls.RadWindow.ShowWindow(Boolean modal)
       at Telerik.Windows.Controls.RadWindow.ShowDialog()
       at Telerik.Windows.Controls.RadWindow.ConfigureModal(RadAlert content, DialogParameters dialogParams)
       at Telerik.Windows.Controls.RadWindow.Alert(Object content)
       at RMS.App.Application_UnhandledException(Object sender, ApplicationUnhandledExceptionEventArgs e)
       at MS.Internal.Error.CallApplicationUEHandler(Exception e)
       at MS.Internal.Error.GetXresultForUserException(Exception ex)    

  2. Evgenia
    Admin
    Evgenia avatar
    1437 posts

    Posted 13 Jan 2011 Link to this post

    Hi Yonghan,

    I'm sorry but we couldn't reproduce this issue on our local tests. You can find a sample project attached where your pottential problem was tested and everything is working as expected.
    Could you open a Support thread and send us a sample stripped down project where this issue occurs so that we will be able to investigate it and help you?

    Greetings,
    Evgenia
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top