04-13-2020 12:59 PM
Application created using Build Specifications hangs when running as a standalone executable.
Hangs=Application does load and arrow says running but nothing happens. No user interface controls are clickable. Only way to exit the application except click on abort execution.
Same VI runs OK while running from LabVIEW.
LabVIEW 2018.
Solved! Go to Solution.
04-13-2020 01:03 PM
What does the application do? Interact with hardware? Access the network? Access certain folders, ini files?
Does it work better if you do a right-click...run as administrator?
04-13-2020 01:14 PM
Yes, it does interact with HW. It scans COMPORT and selects one. Doesn't access any folder or network locations. And HW is connected exactly the same way. I also tried copying exe file where VI is located unsuccessfully.
Also tried running as admin unsuccessfully.
04-13-2020 01:19 PM - edited 04-13-2020 01:20 PM
Did you built an installer with all dependencies or just an exe that you copy around manually?
I assume the hardware is no longer still reserved by the VI.
Do you use any unusual antivirus or security software?
04-13-2020 01:46 PM
I think I found the solution.
I removed following .net calls and it started working OK.
Looking for some explanation.
04-13-2020 03:21 PM
Well without seeing your code we can only guess...
First guess is a race condition somewhere in your code that might have worked okay in the development environment but is racing when complied.
Second guess is you don't have a required runtime library such as NI-VISA or NI-488.2 installed on the target machine.
04-13-2020 03:24 PM - edited 04-13-2020 03:25 PM
Looks like there is an issue with this forum website. I posted the solution two times and it is not showing up.
(I copied/pasted screenshot) is that the issue?
Let me try again the third time.
04-13-2020 03:29 PM - edited 04-13-2020 03:33 PM
I am trying this on the same machine. So no issue with run time or drivers.
After I "disabled" above .net call for getting file version and code works ok now in application mode.
One more note: My main VI is inside LLB. Getting VI ref is an issue in application mode?
Either way, shouldn't it pop up an error?
04-13-2020 04:14 PM
Isn't cutting out that code a little cutting your thumb off and saying that it fixed your hangnail condition? Rather than lop off some code that seemed to have some kind of relevance, why not poke around and see exactly why this isn't working correctly? (Unless, of course, you've declared your thumb to be a non-essential digit. ;))
Will it throw an error? Maybe. Automatic error handling is disabled in an executable, so unless you are propagating errors through the error in and out of your subVIs, they will be swallowed.
04-13-2020 04:30 PM - edited 04-13-2020 04:41 PM
Correct, issue is not resolved. I just pointed out where the issue is.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kIWRSA2&l=en-US