05-18-2021 09:35 AM
I'm having an issue when I build my VI into an application. The camera works fine when I run the VI, and it also works find after I build the application, however it only works the first time you open the application. You can start and stop the VI and it works fine. If you close the application, and reopen it then the camera stops working with the following error code: -1074360316
Any ideas on how to trouble shoot this? Currently I can work around the problem by re-building the application everytime I close it out, but it would be nice to understand what is happening.
My actual VI is pretty complex, but I've made a stripped down version with only the camera functions and it has the exact same problem:
05-18-2021 10:35 AM
The error is an invalid camera session. In your code, you don't close the active session, which could be an issue. When you exit the while loop, you should close the session. That might clear everything so you can start a session on your next run.
It is always a good idea to clean everything up when you are done.
Bruce
05-18-2021 11:25 AM - edited 05-18-2021 11:28 AM
Hi Bruce,
Thanks for the suggestion I added in the close camera at the end. The error still occurs, and it happens at the configure grab VI. Also when you stop the VI there are no errors so it looks like its closing the camera fine.