LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 7.1 App (exe) hangs

I am currently experiencing a problem where an application (exe) that was built using LabVIEW 7.1, hangs (or freezes).  No error dialog/s are displayed and  CPU usage is 100%.  The application must then be shutdown using the Windows Task Manager. This application is executing on a single core 1.6GHz Pentium M with 2GB RAM and running under Windows XP SP1.  A third party debugger that we are using indicates that the application does not exit the DLL "lvalarms.dll". 
I've had a look at all of the postings on this forum and the known errors that relate to the "lvalarms.dll" DLL.  These all seem to indicate possible errors with this DLL only when using timed loops with multi-core PC's. 
The version of "lvalarms.dll" that was shipped with 7.1 is 7.1.0.27.  Does anybody know if this is the latest version for 7.1.
I am in possession of LabVIEW 8.5 but porting this app to 8.5 would mean quite a lot of development as we are using some of the DSC features.  Therefore this is not an option.
 
Any ideas?
 
Rob
0 Kudos
Message 1 of 5
(5,549 Views)
If an application seems to freeze and the CPU goes to 100%, it tends to be an issue with looping.  Either an infinite while loop or an extremely long unning for loop.  If the person who wrote the DLL code expected a loop to not run extremely long, they may have put no delay in the loop so it could fall out as fast as possible.

So, do you have a siutation where you are calling a LV VI (probably a DSC VI) with bad parameters or an extremely large array?  I had an issue in the past where one of the algorithms happened to detect 0 (or really close to 0) instances, and I did a mth operation dividing a number by that result and using that as a loop counter, so I got a for loop running to an extremely high number, where typically, it only ran 100 times max.

I also had a situation where the user put 0 in as a step size, and a while loop calculated the array of values.  Well, with a step size of 0, the while loop never terminated, since you got the same number out every time.
0 Kudos
Message 2 of 5
(5,515 Views)
Thanks for the response.  This application does call other DLL's written by external contractors.  I'll have a closer look at these DLL's for the looping issues you have mentioned. The "lvalarms.dll" is an NI DLL that is installed under that LabVIEW Run-time System.  Not sure if this is definitely the cause but as I mentioned previously our debugger indicates that the application does not exist a function in this DLL when the application hangs.
0 Kudos
Message 3 of 5
(5,457 Views)

Hello Robert,

Does the application freezes when running the built application or does this occur in the development environment as well? Is this DLL trying to access another DLL? Sometimes LabVIEW will display an error describing that a DLL is calling another DLL; however there are cases in which the system hangs. Does this Executable use OPC servers in conjunction?


Regards,

Juan Galindo

  

Juan Galindo
Applications Engineer
National Instruments
0 Kudos
Message 4 of 5
(5,426 Views)

Hi Juan,

Thanks for you response. 

It seems that the application only freezes when running in the development environment but I'm still running tests on the build application.  No dialogs are displayed describing the error/s.  The DLL's that are being accessed by LabVIEW are not accessing other DLL's so I don't think that that is the problem.  My application is implementing an OPC server and also acting as an OPC client connection to another OPC server that convertes OPC to H1 protocol.  My debugger shows the call stack and shows that the application is stuck in lvalarm.dll when it freezes.

I will run the built application for a couple of days to see if this error still occurs.

Regards,

Rob

 

 

0 Kudos
Message 5 of 5
(5,423 Views)