LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll crashing in labview but not in exe

I am calling a third party dll to drive a USB spectrometer.  The aquire call crashes in labview often (almost every time).  Oddly enough the built application works great.  The dll takes an array of int16 [3648] and an I32 handle and returns data into the array.  What is different between a dll call in the development (vista an labview 8.51) and the runtime engine?

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 1 of 3
(2,630 Views)

falkpl wrote:

The dll takes an array of int16 [3648] and an I32 handle and returns data into the array.  What is different between a dll call in the development (vista an labview 8.51) and the runtime engine?


I too faced same problem with my USB smart card reader quite before. The third party dll developed is different for 32 bit and 64 bit and also for different OS. I had the application working fine XP and when moved to Vista, it crashes. So,

 

Do check your dll version.

OS Compatibility.

Post screenshots of dll and give description of the function parameters.

 

Mathan

0 Kudos
Message 2 of 3
(2,611 Views)

I did manage to fix the crashing.  The dll wrapper functions provided were set to run in the UI thread.  The acquire function was starving the trhead since it waits (not sleeps) for data and must do this in a polling loop with no dead time.  When this function is called in labview development environment all becomes unresponsive and Labview freezes.  When allowed to run in a seperate thread the crashing goes away.  I think this issue is good for now.  Only time and testing will let me know.

 

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 3
(2,590 Views)