This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Error 2: Memory is Full when Opening a New Reference in LabVIEW

Updated Oct 18, 2022

Reported In

Software

  • LabVIEW

Issue Details

I receive Error 2 LabVIEW: Memory is full when running my LabVIEW code. This error occurs when opening a new reference with a VI such as Obtain Notifier, Obtain Queue, Open VI Reference, .NET Constructor Node, Open/Create/Replace File, etc. Why do I receive this error and how can I prevent it?

Solution

LabVIEW uses a finite amount of memory to store each type of reference. The number of simultaneously opened references is therefore limited to 1048575 for each type of reference. Therefore any Block Diagram function which creates a new reference in memory may return this error.

This indicates a reference leak in the code. References are not being closed properly and eventually 1048575 references of the same type are open simultaneously. The error then occurs when trying to open the 1048576th reference. To prevent the reference limit from being reached, modify the application so it closes references when they are no longer in use using the appropriate VI such as Release Notifier, Release Queue, Close Reference, etc.

Additional Information

There are some additional toolkits if you want to find unclosed references in your LabVIEW code. These are helpful to find reference leaks in general also when the error mentioned does not appear.