LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application created in LabVIEW hangs but works ok as a VI from LabVIEW

Solved!
Go to solution

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.

0 Kudos
Message 1 of 11
(3,231 Views)

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?

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

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.

0 Kudos
Message 3 of 11
(3,213 Views)

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?

0 Kudos
Message 4 of 11
(3,209 Views)

I think I found the solution.

I removed following .net calls and it started working OK.

Looking for some explanation.

 

_TestMan__0-1586803585939.png

 

0 Kudos
Message 5 of 11
(3,154 Views)

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.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 11
(3,174 Views)

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.

0 Kudos
Message 7 of 11
(3,170 Views)

_TestMan__0-1586809558779.png

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?

0 Kudos
Message 8 of 11
(3,164 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 11
(3,144 Views)

Correct, issue is not resolved. I just pointed out where the issue is.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kIWRSA2&l=en-US

0 Kudos
Message 10 of 11
(3,140 Views)