LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV Crash After Last Bit of Code is Executed

Hello,

 

My Main application runs perfectly fine. I have a subVI parallel process that when run by itself runs perfectly fine.  When I run the parallel subVI in the main application everything works well until I shut down.  After all the code runs I have one last little pop up that runs (for testing).  After hitting OK LabVIEW crashes.  Any ideas of where to start looking for this issue?

 

LV 2016 64-bit, Windows 10.

Other notes:

-The subVI is running a camera that works through DLL calls.  

-The main app initializes the camera by sending it commands through a Queue.  

-The camera sends images back to the main gui through a User Event.

-The Shutdown command gets sent to the camera worker in the same way as when I run the camera worker stand alone.

 

Thanks for any help,

Jesse Zamora 

0 Kudos
Message 1 of 11
(2,949 Views)

You will need to post code (an actual VI or a snippet).  Hard to debug without it. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 11
(2,935 Views)

Unfortunately the nature of the project does not allow me to do so.  I guess I am more wondering where anyone might start searching to solve this type of issue.  Any thoughts would be great?  

Thanks,

Jesse

0 Kudos
Message 3 of 11
(2,907 Views)

Try removing the SubVI with the dll calls (or comment them out) to see if the same thing happens. Its possible there is a problem with the clean-up of references when the VI hierarchy goes idle and collection occurs.

0 Kudos
Message 4 of 11
(2,904 Views)

The subVI that runs the camera has all the DLL calls.  As mentioned in the original post, If I comment this out and run the main app then it shuts down cleanly.  Is there a way for me to monitor open references for a particular VI?

 

Jesse

0 Kudos
Message 5 of 11
(2,900 Views)

Desktop Execution Trace Tool kit.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 11
(2,897 Views)

If a dll appears to cause LabVIEW to crash, it is likely that the there is a memory allocation issue.   I have recently had a situation where one particular dll call would appear to execute correctly but actually corrupted memory because the LabVIEW data structure was not correct for the dll.  LabVIEW did not crash when the dll call was made, but it would crash when LabVIEW was closed or the VI finished executing.  You could try just calling Initialise and Close functions, and no other camera function, see if the problem is still present.  You may be able to identify a problematic dll call this way.

0 Kudos
Message 7 of 11
(2,889 Views)

Had the same when top-level VI sent the command to subVI to close, but did not wait for confirmation. Closing top-level VI front panel killed sub-vi that did not properly close something.

0 Kudos
Message 8 of 11
(2,882 Views)

It wasn't entirely clear from your description.  If you run the SubVI, the code runs fine.  Do you see the crash upon exit?

 

Do you always see the crash if the two are working together?

 

Before opening the thread, I suspected you were calling into a DLL that wasn't cleaning up the memory.  As soon as you mentioned the DLL, I was more certain.  Who made the DLL?  Have you reached out to them at all?

0 Kudos
Message 9 of 11
(2,865 Views)

Do you wait for the Camera to finish or do you kill the queue earlier? Such things are fairly common reasons.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 11
(2,759 Views)