Pre loader

Wpf Scichart 2D, System.OutOfMemoryException in release mode


Hi all,

I’ve programmed an interface with scichart 2D (Visual studio 2012)

when i run my program from debug mode, this is running perfect, when i run in release mode the program is shutdown and

i got this message :

An exception of type ‘System.OutOfMemoryException’ occurred in SciChart.Data.dll but was not handled in user code.

Any idea ?

Thanks a lot

  • You must to post comments

Hello Verschueren Jean-Philippe,

Can you tell me what is your “Platform target” value ?

Can you go to project properties > Build tab > Platform target, but beware to check if Configuration combobox was switch from Active(Debug) ===>>> to Release

take a look at this screenshot:

  • You must to post comments

Hello Nazariy,

thanks for your answer , it was because the check box prefer “32 bit version” was checked.

Best regards.

  • You must to post comments

Hi Jean Philippe.

A simple calculation to determine the memory requirement of SciChart is as follows.

40,000,000 points of X=Double, Y=Double requires 40,000,000 * 2 * 8 bytes just to store the data values. This is 640MBytes.

In addition, scichart needs some memory to store drawing commands and pixel coordinates (but not much).

Adding Metadata to X,Y points requires a further 4 bytes per data-point = 800MByte. Metadata is not added unless you add it, however for FIFO charts we have to create an empty Metadata array anyway. So it is possible to have 800MByte memory requirement for 40M points.

This is the raw amount of memory required to just store the data.

The limit per-process for 32-bit applications is 1.5GByte of memory and less if the heap is fragmented. So it is easy to get out of memory exception in 32-bit mode with this many data points.

What you can do is change the data-types.

  1. Don’t use FIFO and don’t use metadata as this will discard the 4 bytes per data-point required for the metadata.
  2. Use XType or YType int, float to reduce memory requirements.

e.g. 40M points, non FIFO, X,Y types float will require just 320MByte. A considerable reduction.

Alternatively, force your application to run in 64-bit mode when you have such high data requirements and everything will be OK!

Best regards,

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies