Out of memory exception

I am getting out of memory exception on my sfchart with the exception below. can you image what could be the problem here? i am seeing in my crash reports.

 

NumericalAxis.GenerateVisibleLabels ()

System.OutOfMemoryException: Out of memory

  • 1
    (wrapper alloc) System.Object.AllocVector(intptr,intptr)
  • 2
    List`1[T].set_Capacity (System.Int32 value)
  • 3
    List`1[T].EnsureCapacity (System.Int32 min)
  • 4
    List`1[T].Insert (System.Int32 index, T item)
  • 5
    Collection`1[T].InsertItem (System.Int32 index, T item)
  • 6
    ObservableCollection`1[T].InsertItem (System.Int32 index, T item)
  • 7
    Collection`1[T].Add (T item)
  • 8
    NumericalAxis.GenerateVisibleLabels ()
  • 9
    ChartAxis.UpdateLabels ()
  • 10
    ChartAxis.ComputeDesiredSize (System.Drawing.SizeF size)
  • 11
    ChartCartesianAxisLayout.MeasureVerticalAxis (System.Collections.Generic.List`1[T] axes, System.Drawing.SizeF size)
  • 12
    ChartCartesianAxisLayout.MeasureAxis (System.Drawing.SizeF size)
  • 13
    ChartCartesianAxisLayout.Measure (System.Drawing.SizeF availableSize)
  • 14
    ChartBase.MeasureAxis ()
  • 15
    ChartBase.UpdateArea ()
  • 16
    ChartBase.OnMeasureChart ()
  • 17
    SfChart.OnMeasure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec)
  • 18
    View.n_OnMeasure_II (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec)
  • 19
    (wrapper dynamic-method) System.Object.d7985186-ac34-4024-a266-dc6d3ef5deb8(intptr,intptr,int,int)

3 Replies

MP Michael Prabhu M Syncfusion Team July 6, 2018 10:43 AM UTC

Hi Emil, 
 
Sorry for the inconvenience caused, given your stack trace we suspect that the interval property may not fall within the data range. Having said that we created a simple sample with axis minimum set to 0 and maximum as 500 and set interval as 0.1 this made the sample to hang (because it will create 5000 labels and we did this just to stress test the control) but still we didn’t get any exception.  
 
Since we are not aware of your exact scenario, it is not possible for us to replicate the issue at our end, can you please help us by modifying the sample which we attached below to replicate your scenario, and this will help us to provide you a better solution at the earliest.  
 
Sample:138562
 
 
Let us know if you have any concerns.  
 
Thanks, 
Michael 
 




EM Emil July 6, 2018 10:19 PM UTC

hi, 

.I found the problem. I had double value on yAxis. my app is multilingual and if data is stored with dot as decimal separator(in English language) and user changes to German which accept comma , it was double value like 467,354656768 and it since conversion is not valid double, it was 467354656768 and defining 10 interval caused this problem. thank you for the hint, it was helpful to figure this out


MP Michael Prabhu M Syncfusion Team July 9, 2018 04:46 AM UTC

Hi Emil, 
 
We are glad that you could figure it out with our suggestion. Please let us know if you need any other assistance on this. 
 
Thanks, 
Michael 



Loader.
Up arrow icon