04-10-2017 12:40 PM
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
04-10-2017 12:44 PM
You will need to post code (an actual VI or a snippet). Hard to debug without it.
04-10-2017 02:02 PM
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
04-10-2017 02:17 PM
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.
04-10-2017 02:31 PM
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
04-10-2017 02:34 PM
Desktop Execution Trace Tool kit.
Ben
04-10-2017 02:48 PM
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.
04-10-2017 03:23 PM
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.
04-10-2017 07:06 PM
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?
04-11-2017 09:40 AM
Do you wait for the Camera to finish or do you kill the queue earlier? Such things are fairly common reasons.
/Y