LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

troubleshoot not enough memory error

Solved!
Go to solution

I am getting a not enough memory error, and while there are tons of posts about this on the forums, I had some additional questions. First, I have two cRIOs, and think the error may have been thrown by one of them. Is this even possible though? I'm trying to narrow down which exe the error may be in. Second, does anyone have an order of steps they take when they get these errors in order to troubleshoot them?

0 Kudos
Message 1 of 6
(3,114 Views)

I would still like those questions answered for future reference but I *may* have found the problem. I think I was plotting the same lines on top of each other lots of times, do to some for loop indexing flaws. I can't test for sure now because I have no hardware available. But later today I will update.

0 Kudos
Message 2 of 6
(3,107 Views)

Essentially I found the problem. It was in my host. I was adding data to a queue at at unreasonably high rate. I didn't notice because my graphs did not look as if they were being updated that fast. That is because I was queuing up the same data repeatedly, until I got new data. So, although my 8 graphs looked to be updating every 1 second (I do a TCP read for new data every 1 second), they were actually updating...wait for it....20 times a second.

0 Kudos
Message 3 of 6
(3,086 Views)

Just to be "wise cracky"

Add more memory until the issue goes away.

 

Seiously though This KB will help find ways to improve memory issues


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 6
(3,081 Views)
Solution
Accepted by topic author GregFreeman

Found the REAL problem! I was not reading my header correctly, this resulted in type casting the wrong bytes of data. Every now and then I would be type casting bytes of data that when type casted from a string to a I32 resulted in a number around 17 million. I am assuming the TCP read tries to malloc this memory (or new if its c++ Smiley Happy) and was unable to do so. That's why I got the not enough memory error. When I started reading my TCP bytes correctly, the error went away.

Message 5 of 6
(3,041 Views)

This might just have saved my life! Smiley Happy

 

Thank you for continuing your thread and posting your solution on the discussion forums!

 

(A very happy) Thoric

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 6 of 6
(2,966 Views)