LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Crashes but Highlight Execution works error free

Solved!
Go to solution

I am designed a VI for my company and unfortunately I cannot post any code due to the nature of the project.  However I developed a VI that works in conjunction with a Lua script communicating in a hand-shaking-acknowledgement fashion via TCP.

 

Basically I have a typical State Machine that loops around where the main state waits for a TCP command, then once it recieves one, the Lua script waits for a reply acknowedging the LabVIEW finished.  Then the LabVIEW patiently waits again for another command.  This just goes back in forth until I exit.

 

When I run the VI with my script, it crashes.  I see no error messages or anything; the LabVIEW program just completely terminates.  However if I use Highlight Execution, it works 100% as designed and I cannot visibly see any issues.  I also ran through the entire program using "Step Through" and that also worked 100%.

 

I have tried getting the "error out" information, but there is none.  If I run it as is, it just completely shuts down LabVIEW on crash with no notifcation at all.  If I run it using either of the above methods, the Error Out reports no errors.

 

I am not using any local variables or anything that could cause a race condition (to my knowledge).  Aside from waiting for a command and sending one upon completion, the code works in a sequential fashion and even the communicaton is relatively sequential (since both programs block/busy wait until they recieve the command).

 

Does anyone have additional suggestions as to how I may debug this issue?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 1 of 8
(3,640 Views)

Have you looked at the Desktop Execution Trace Toolkit ?

 

http://digital.ni.com/manuals.nsf/websearch/971F7CE44822427186257B7A001033F9

0 Kudos
Message 2 of 8
(3,614 Views)

@NeilR wrote:

Have you looked at the Desktop Execution Trace Toolkit ?

 

http://digital.ni.com/manuals.nsf/websearch/971F7CE44822427186257B7A001033F9


I probably should have mentioned that I have LabVIEW 2009.  Does this software come installed?  That link only had the manual from what I could see.  And some searching makes it seem like I would need to purchase this software in addition. 

 

EDIT:

 

I'm pretty sure the issue is in the TCP somewhere, but it works flawlessly when ran in either of the slower execution modes yet completely crashes when ran at full speed.  So I just have no clue how to approach a solution.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
0 Kudos
Message 3 of 8
(3,605 Views)
Solution
Accepted by MrHappyAsthma

Looks like it comes bundled with 2009 Developer Suite.

 

Not trying to teach you how to suck eggs here but can you strip the application down to the bare bones to try to isolate the issue.

Keep chopping functionality until it no longer crashes and then build it up until the problem reappears to try to narrow it down.

Message 4 of 8
(3,585 Views)

It does not seem to be installed on my work machine, so I'm guesing we did not get that package.  I was able to locate the error by modifying the TCP VIs a bit.  Unfortunately I just resorted to trial and error and brute-force style debugging.  I was hoping for a more elegant solution to narrow in on the problem but alas, no such suggestion exists.  Thanks again for your comments/help 🙂

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If someone helped you out, please select their post as the solution and/or give them Kudos!
Message 5 of 8
(3,579 Views)

Well done !  Thanks for the Kudo Smiley Wink

0 Kudos
Message 6 of 8
(3,575 Views)

Hello! I am running into the same problem that you posted, however, the difference is that in my case when operating on NOT HIGHLIGHTED mode Error 66 is reported on the TCPRead VI. Error 66 – "LabVIEW: The network connection was closed by the peer". 

The VI runs smooth in Highlighted mode.

I  would really appreciate if you could share what amendments you made to the VIs. If you still remember of course:D.

Thank you very much.

Mon29
0 Kudos
Message 7 of 8
(3,318 Views)

oriolfillo,

 

It looks like you actually have a very similar issue as that of the original poster. Did you try the method original poster used (strip your VI down to bare bones until you get it working, and build it back up until you see the issue reappearing).

 

The issue looks like it could be a timing issue. Perhaps when you run the VI in regular full speed, you are not giving the peer enough time to respond to your request. See thread below

 

https://lavag.org/topic/13678-tcpip-error-code-66/

 

0 Kudos
Message 8 of 8
(3,268 Views)