I constantly have OutOfMemoryException when I set IChartSeriesViewModel.DataSeries.FifoCapacity and there are 4 or more chart on a single SciChartSurface.
Exception’s code block is
viewModel.DataSeries.FifoCapacity = 1000000;
where viewModel is newly created instance of ChartSeriesViewModel class.
What it could be?
Exception stack trace is
A. `1..ctor(Int32 )
Abt.Controls.SciChart.Model.DataSeries.XyDataSeries`2.ClearColumns()
Abt.Controls.SciChart.Model.DataSeries.DataSeries`2.Clear()
Abt.Controls.SciChart.Model.DataSeries.DataSeries`2.set_FifoCapacity(Nullable`1 value)
p.s. I have no opportunity to set x64 as target platform. My SciChart version is 3.1 but there is the same problem with 3.22.
- Serg Polyanskikh asked 9 years ago
- You must login to post comments
From your comments above – 4 dataseries should not cause this problem, even in 32 bit.
- 1x DataSeries of type TX=Double, TY=double requires 16 bytes per point.
- FIFO DataSeries require approximately 2x the memory (32 bytes per point).
- (This is unavoidable as FIFO DataSeries are implemented as a circular buffer, and must be unwrapped to a linear (non-circular) buffer before drawing)
Therefore 4x Fifo DataSeries (assuming TX=double, TY=double) should require 4(8+8)2*1000000=128MBytes.
Q1: How much memory do you observe the application to be using?
Q2: Are you sure that the memory is all allocated by SciChart? (Please post memory profiler screenshots for example)
Q3: How much memory does the target PC have?
Best regards,
Andrew
- Andrew Burnett-Thompson answered 9 years ago
- last edited 9 years ago
-
The aplication (started from VS) consumes only 500 MB of 8 GB RAM at the moment of crash. Memory profiler throws an error when Just My code option disabled: Error 1 DA0002: It appears that the file was collected without properly setting the environment variables with VSPerfCLREnv.cmd. Symbols for managed binaries may not resolve
-
Ok thanks. Any chance you can send us a small code sample (email to support[at]scichart[dot]com) which reproduces the issue. We are unaware of any memory issues with FifoSeries but it is possible that there is something deeper going on.
-
I inserted GC.Collect() before updating FifoCapacity and now OutOfMemoryException is in there. Can you tell smth about this? please, see http://postimg.org/image/n8e0e7wcl/ and http://postimg.org/image/fvgpqahmj/
-
As I said already - a.) this should not happen under normal use and b.) we need a code sample which reproduces the issue in order to investigate further.
- You must login to post comments
Please login first to submit.