09-09-2022 07:03 PM
Hello,
I made some changes on the LabView program, and rebuild the exe. However, when I deployed it on another machine, I get this error.
How do I fix it?
When I try to run it from the editor, I get this error. But, all the libraries and dependencies are the same as the old executable file.
Any suggestions?
Thanks,
09-09-2022 10:22 PM
You should undo your changes.
09-10-2022 02:45 AM
Hi Bill,
Thanks for your input. I don’t think it is the change in the program that caused it. The only change in the code is saving the data to another directory. We even build the original program with this development machine and deployed it in the same workstation that runs fine with the old executable, and it still has the same error.
09-10-2022 03:17 AM
Something changed because now you have an invalid handle. We can tell you more if you upload the VI.
09-10-2022 01:18 PM - edited 09-10-2022 01:19 PM
Well an Invalid Handle generally means you are not initializing your instrument (opening a new handle) before trying to access it or you are closing the instrument handle and then attempting to access the instrument using the old (invalid) handle.
But we need to see your code to know for sure...
09-11-2022 11:31 AM
I'll take a swing at an educated guess.
Your original build spec marked the default "remove unused polymorphic instances" then you did not rebuild all and tried to deploy exe changes by just replacing the exe rather than using the new installer.
My magic 8-Ball is fairly good.
09-12-2022 01:19 AM
I'm ignoring the error you get while running, because that's a runtime error and I'm assuming it's actually correct and you really didn't initialize the hardware correctly, as the others suggested.
For the EXE error, it helps to search for the error text (here's one example. I assume there are other pages too).
I don't see this often, but from what I can remember, it's usually one of two things:
09-12-2022 08:02 AM - edited 09-12-2022 08:03 AM
@tst wrote:
I don't see this often, but from what I can remember,.....
- ...
- There really was a problem when building the EXE. This happens sometimes and might require clearing the application builder compiled objects cache (Tools>>Advanced), force compiling all the VIs (Ctrl+Shift+Run button on the top level VI) and/or restarting LV.
Cleaning the build usually works when that happens ( it was more common in earlier versions but I still habitually always clean my builds before rebuilding). Just right-click the build spec and select clean build. This forces the app builder to recreate the temporary source distribution and forgives many sins in the linker.
Of course, the better option is to write code without bugs the first time.
09-12-2022 01:33 PM
Hi,
Thank you for your advices. I have tried all the options in this thread and still not able to get this. I even disable the part that is giving me the Handler error code, and still not able to run the executible.
09-12-2022 02:11 PM - edited 09-12-2022 02:33 PM
It could be a race condition and you were just lucky that it used to work.