Error: GenericMethodWithArgsDoesNotExistOnType

4 posts, 0 answers
  1. Petr
    Petr avatar
    8 posts
    Member since:
    Aug 2010

    Posted 07 Oct 2011 Link to this post

    Hi,

    We are experiencing an occasional crash when calling Rebind() method on a databound RadChart. Here is the stacktrace:

    Message: Unhandled Error in Silverlight Application [GenericMethodWithArgsDoesNotExistOnType]
    Arguments: Average,System.Linq.Enumerable
    Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.60531.0&File=System.Core.dll&Key=GenericMethodWithArgsDoesNotExistOnType at System.Linq.Expressions.Expression.FindMethod(Type type, String methodName, Type[] typeArgs, Expression[] args, BindingFlags flags)
    at System.Linq.Expressions.Expression.Call(Type type, String methodName, Type[] typeArguments, Expression[] arguments)
    at Telerik.Windows.Data.Expressions.EnumerableSelectorAggregateFunctionExpressionBuilder.CreateMethodCallExpression(LambdaExpression memberSelectorExpression)
    at Telerik.Windows.Data.Expressions.EnumerableSelectorAggregateFunctionExpressionBuilder.CreateAggregateExpression()
    at Telerik.Windows.Data.EnumerableSelectorAggregateFunction.CreateAggregateExpression(Expression enumerableExpression)
    at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.<ProjectionPropertyValueExpressions>b__3(AggregateFunction f)
    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
    at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
    at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
    at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateProjectionInitExpression()
    at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateAggregateFunctionsProjectionMemberBinding()
    at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.<CreateMemberBindings>d__0.MoveNext()
    at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
    at System.Dynamic.Utils.CollectionExtensions.ToReadOnly[T](IEnumerable`1 enumerable)
    at System.Linq.Expressions.Expression.MemberInit(NewExpression newExpression, IEnumerable`1 bindings)
    at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateSelectBodyExpression()
    at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.CreateResultSelectorExpression()
    at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilder.get_ResultSelectorExpression()
    at Telerik.Windows.Data.Expressions.GroupDescriptorExpressionBuilderBase.CreateQuery()
    at Telerik.Windows.Data.Expressions.GroupDescriptorCollectionExpressionBuilder.CreateQuery()
    at Telerik.Windows.Data.QueryableExtensions.GroupBy(IQueryable source, IEnumerable`1 groupDescriptors)
    at Telerik.Windows.Data.QueryableCollectionView.CreateView()
    at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
    at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
    at Telerik.Windows.Data.QueryableCollectionView.GroupedIndexOf(Object item)
    at Telerik.Windows.Data.QueryableCollectionView.InternalIndexOf(Object item)
    at Telerik.Windows.Data.QueryableCollectionView.TryRestorePreviousCurrency()
    at Telerik.Windows.Data.QueryableCollectionView.InitializeCurrencyOnRefresh()
    at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
    at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
    at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
    at Telerik.Windows.Data.QueryableCollectionView.OnGroupDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
    at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
    at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
    at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
    at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
    at System.Collections.ObjectModel.Collection`1.Add(T item)
    at Telerik.Windows.Controls.Charting.DataBindingHelper.PerformSampling(QueryableCollectionView dataEngine, Int32 samplingThreshold, IEnumerable`1 samplingFunctions)
    at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessNoGrouping(SeriesMapping seriesMapping, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState, Int32 seriesCount)
    at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessMapping(SeriesMapping seriesMapping, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState, Int32 seriesCount)
    at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessMappings(SeriesMappingCollection seriesMappings, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState)
    at Telerik.Windows.Controls.Charting.DataBindingHelper.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ISeriesDefinition defaultSeriesDefinition, ChartFilterDescriptorCollection globalFilterDescriptors, ChartSortDescriptorCollection globalSortDescriptors, SamplingSettings samplingSettings, ZoomScrollSettings zoomScrollSettings, AxisRangeState axisXRangeState)
    at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ChartArea chartArea)
    at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData)
    at Telerik.Windows.Controls.RadChart.Rebind(Object originalData)
    at Telerik.Windows.Controls.RadChart.Rebind()

    Is this a known issue? We are running Q3 2010 (2010.3.1110.1040).

    Thank you,
    Petr
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 12 Oct 2011 Link to this post

    Hello Petr,

    Unfortunately we are unsure what is causing the erroneous behavior as we have not received similar reports so far and we could not reproduce the issue in our tests. Could you elaborate a bit more on your specific scenario, how often do you experience the exception, could you reproduce it every time with the same steps?
    It would be best if you can open a formal support ticket and send us a small runnable sample application that we can investigate locally so we can advise you properly how to proceed.


    Best wishes,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Petr
    Petr avatar
    8 posts
    Member since:
    Aug 2010

    Posted 12 Oct 2011 Link to this post

    Hi again,
    Thank you for your prompt reply. I have been able to gather few more details: it seems that the crash occurs everytime the chart tries to apply Average sampling to its bound data. If I reduce the amount of data below the sampling threshold or switch to different sampling function, everything runs just fine.

    Petr
  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 17 Oct 2011 Link to this post

    Hello Petr,

    Unfortunately based on the provided information so far we are still unable to reproduce the problematic behavior on our end.

    If sending a runnable sample application is not possible, then please elaborate what is the data type that you are trying to sample and optionally send us the chart declaration that you are using. Could you confirm that your scenario actually works with different aggregate function? Also, make sure that you are applying the sampling aggregate function on the data field that represents the YValue in your chart.


    Greetings,
    Giuseppe
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top