- Home
- Forum
- Xamarin.Forms
- Out of memory exception
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)
- 2List`1[T].set_Capacity (System.Int32 value)
- 3List`1[T].EnsureCapacity (System.Int32 min)
- 4List`1[T].Insert (System.Int32 index, T item)
- 5Collection`1[T].InsertItem (System.Int32 index, T item)
- 6ObservableCollection`1[T].InsertItem (System.Int32 index, T item)
- 7Collection`1[T].Add (T item)
- 8NumericalAxis.GenerateVisibleLabels ()
- 9ChartAxis.UpdateLabels ()
- 10ChartAxis.ComputeDesiredSize (System.Drawing.SizeF size)
- 11ChartCartesianAxisLayout.MeasureVerticalAxis (System.Collections.Generic.List`1[T] axes, System.Drawing.SizeF size)
- 12ChartCartesianAxisLayout.MeasureAxis (System.Drawing.SizeF size)
- 13ChartCartesianAxisLayout.Measure (System.Drawing.SizeF availableSize)
- 14ChartBase.MeasureAxis ()
- 15ChartBase.UpdateArea ()
- 16ChartBase.OnMeasureChart ()
- 17SfChart.OnMeasure (System.Int32 widthMeasureSpec, System.Int32 heightMeasureSpec)
- 18View.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)
SIGN IN To post a reply.
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
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
EM Emil
- Jul 6, 2018 12:50 AM UTC
- Jul 9, 2018 04:46 AM UTC