LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tips for race conditions in EXE?

I have a VI that runs well on my machine under the LV development environment.  When I compile to an EXE and install to a production machine, it randomly crashes with no real trace information available, it appears to crash in one of my DLLs, seemingly because I've already closed a TCP/IP/database connection.

Of course, putting pop-up messages is a pain and hides the actual problem.

Is there a way to identify the node identified in the crash (hex format) to the node in the block diagram?

   ...Dan

Message Edited by dgholstein on 05-17-2007 08:16 AM

0 Kudos
Message 1 of 7
(3,279 Views)
Dan:
 
What version of LabVIEW are you using?...LabVIEW 8 introduced debugging in executables!
 
Quote NI Support  "try searching the LabVIEW Help for 'debugging applications' "
0 Kudos
Message 2 of 7
(3,256 Views)
Using 7.0.

   ...Dan
0 Kudos
Message 3 of 7
(3,253 Views)
Are your DLLs thread safe?  If not, you can either run them in the UI thread or put locks on the calls using semaphores or something similar.

What OS are you using?  If it is a Windows variant, you can try embedding calls to the Windows kernel to display debug strings.  You can view these easily with DebugView from Microsoft SysInternals.  Use the call library node to call the Windows kernel32.dll to post the strings.  Here is a LV8.2 screenshot of the setup.  We have found this technique very useful for debugging race conditions, since it does not slow down the code much.  Wrap the DLL call in a subVI and drop them around where you think the problem is.


Message Edited by DFGray on 05-18-2007 08:00 AM

Message 4 of 7
(3,231 Views)
Thanks for the info, I will take a peek at it later today.
0 Kudos
Message 5 of 7
(3,223 Views)
Sorry. Please ignore my last post... wrong thread... too many forum windows open!
0 Kudos
Message 6 of 7
(3,217 Views)
DFGray;

Thanks for the tip, that's a gem.

   ...Dan
0 Kudos
Message 7 of 7
(3,190 Views)