From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Run Out Issue

Solved!
Go to solution

I have the following error popping up in an executable I've built:

 

MEMORY ERROR BOX.png

 

Here is the code I believe to be causing this issue:

memory error code.gif

 

 

Is there some underlying memory issue with zip file VIs that im missing? or am I missing something else? Why is the error saying 'error occured at unknown on block diagram'??

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 1 of 27
(3,381 Views)

@dhaugen92 wrote:

I have the following error popping up in an executable I've built:

 

MEMORY ERROR BOX.png

 

Here is the code I believe to be causing this issue:

memory error code.gif

 

 

Is there some underlying memory issue with zip file VIs that im missing? or am I missing something else? Why is the error saying 'error occured at unknown on block diagram'??


I am not sure why you would suspect a zip file...

 

The only glaring item is the "build array"  if that code snippet is in a loop.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 27
(3,371 Views)

If it is reliably repeatable you can also turn on highlight execution and figure out exactly what causes it.

 

But no, to my knowledge there is no problem with the zip vis.

0 Kudos
Message 3 of 27
(3,361 Views)

How large is your raw data file?  I know the zip files will struggle after a certain size.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 27
(3,318 Views)

@BowenM wrote:

If it is reliably repeatable you can also turn on highlight execution and figure out exactly what causes it.

 

But no, to my knowledge there is no problem with the zip vis.



it only happens in the executable version of this program...

running source code does not seem to trigger this error......... which makes it even weirder!

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 5 of 27
(3,303 Views)

@crossrulz wrote:

How large is your raw data file?  I know the zip files will struggle after a certain size.


Not very large at all. Just a flattened binary string of an array of about 3000-8000 double floating point numbers. probably around 1-5kb

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 6 of 27
(3,290 Views)

What happens if you diagram disable the code in false case?

 

What code is in the true case?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 27
(3,281 Views)

@Ben wrote:

What happens if you diagram disable the code in false case?

 

What code is in the true case?

 

Ben


Havent tried to diagram disable..

in the true case there is no code. nothing happens if its true.

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 8 of 27
(3,278 Views)

Try to flatten the two 2D arrays separately, then append the resulting strings. (Arrays in LabVIEW are contiguous in memory and maybe you are running out of sufficient contiguous space. Doubt it thought by your numbers ...). Can you show us the rest of the code? What is outside the currently visible section?

 

What happens if you build build some example code containing significantly smaller arrays?

 

What kind of code is in the subVI that outputs the lower 2D array? Does it have uninitialized shift registers, for example?

0 Kudos
Message 9 of 27
(3,271 Views)

@altenbach wrote:

Try to flatten the two 2D arrays separately, then append the resulting strings. (Arrays in LabVIEW are contiguous in memory and maybe you are running out of sufficient contiguous space. Doubt it thought by your numbers ...). Can you show us the rest of the code? What is outside the currently visible section?

 

What happens if you build build some example code containing significantly smaller arrays?

 

What kind of code is in the subVI that outputs the lower 2D array? Does it have uninitialized shift registers, for example?


The code outside of this screenshot is proprietary. The subVI that outputs the 2D array is used in many other applications at my company, none of which have this memory issue. Pretty much all of the other code of this program is reused in other applications (so is not subject to this investigation), and the memory error pops up when the code enters this particular state of the state machine. The other code in this state is also reused in other applications, and also does not create the memory error. 

 

I've tried instead, inserting the dump from the subVI into the already established array:

memory issue.gif

 

If this does not solve the issue, I'll know by around 3:30pm (again, this error happened about every 4 hours)

 

**the problem with appending the strings is that the space for the 2d array is already allocated, so i fear it will concatenate an array with 3000 values and 10000 empty values with an array of only 500-1000 values, if that makes sense...

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
0 Kudos
Message 10 of 27
(3,261 Views)