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: 

Im getting Error 1055 after trying to fix a memory leak

Hi all,

I was trying to fix the obvious memory leak from figure one which came from creating objects in the while loop however when I tried the fix in figure two I am now getting error 1055 object reference is invalid... can anyone point out what could fix this? I've also tried using shift registers as shown in figure three but this gave the same error 1055 as figure two. Any help would be massively appreciated.

 

figure one: memory leak creating infinite objectsfigure one: memory leak creating infinite objects

 figure two: error 1055figure two: error 1055figure three: shift registersfigure three: shift registers

 

0 Kudos
Message 1 of 8
(2,633 Views)

show your code, especially subvI in loop.
In figure 2 you've closed all references. Why?
I think you do the same in your subVI

0 Kudos
Message 2 of 8
(2,597 Views)

Couple things, first off the sequence structure is unnecessary- think dataflow.

 

Second, Artem is right, the object reference is invalid because you close the object reference after its first use. Without code to test it's hard to say but putting Close Reference outside of the while loop, only used after you're done, might fix things.

0 Kudos
Message 3 of 8
(2,590 Views)

Hi,

I tried the close reference as an attempt to a solution which I found after some Googling.

I didn't get the 1055 error before trying to move the create object parts outside the loop.

Honestly, I'm not really sure at this point as I'm new to using objects in LabVIEW.

The subVI. the other SubVI in this one is just the rotate and translation included in LabVIEW RoboticsThe subVI. the other SubVI in this one is just the rotate and translation included in LabVIEW Robotics

 

0 Kudos
Message 4 of 8
(2,589 Views)

Again, we cannot debug pictures. please attach the actual VI.

 

(Also be careful with naming. You are talking about "3D objects". The term "object" is typically used for something else)

0 Kudos
Message 5 of 8
(2,585 Views)

Sorry, this folder has the entire project - "3D picture test" is the current trial solution and backup five is the version with the memory leak.

0 Kudos
Message 6 of 8
(2,581 Views)

I didn't get error/memory leak in 3D picture test.
You only need timeout in loop.

0 Kudos
Message 7 of 8
(2,557 Views)

@Artem.SPb wrote:

You only need timeout in loop.


What would be the logic behind this? What is a "timeout" and where?

(A delay would simply push a memory leak to a later time, without fixing the underlying issue.)

0 Kudos
Message 8 of 8
(2,547 Views)