LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Freeze on dll access

Here's my problem: We have a transient recorder in our lab thats accessed through a dll. There is a really old 16-bit app that no longer runs to control them. The configuration program, however, still runs and detects the 2 installed PCI cards.
Until now, just accessing the first and then the second board through "Call Library Function Node" produced an error which I am working on.
But since today, my Account has been added to the Admins group, and ever since, accessing the dll more than once leads to a complete lcok-up (as in can't move the mouse, everything dead).
I really wonder why the configuration program that uses the same dll runs without errors, whilst my (very simple) LabView vi now suddenly crashes. Any ideas? Some type of memory violation maybe?

Thanks for any hints,
Adrian
0 Kudos
Message 1 of 5
(3,134 Views)

This is hard to debug, as we can not see "inside" the dll.

Maybe it has something to do with multithreding? The "Call Library Function Node" has an option where you can configure where the dll is executed (Run in UI Thread or Reentrant). Try out both options. Maybe this helps.

 

0 Kudos
Message 2 of 5
(3,127 Views)
Hmm, setting the function to reentrant does stop the crashing, but leads to LabView using loads of CPU for several seconds. I then get a poorly documented error from the dll that I've never seen before ("loading port gatearray failed", what could that mean?).

I thought that "run in ui thread" vs. "reentrant" only changed the order of execution? Can someone explain that to me?

Thanks for the tip anyway, finally no more constant rebooting.
Adrian
0 Kudos
Message 3 of 5
(3,120 Views)

This setting defines if the dll can be accessed in parallel form labView or not. If the option is set to "run in ui thread", the dll is handled in the same thread as the labView User Interface, and so can not be accessed in paralle in LabView, as there is only one instance of the dll in memory. If you set the option to "reentrant" labview can start the dll in multiple instances, that will run in parallel then. If you get errors in thsi configuration, your dll might not be "multithreading-save" so the dll does not like to be called from parallel processes.

Message 4 of 5
(3,112 Views)
That's strange, the dll is supposed to work with multiple daq cards that are accessed at once. Looks like I'll have to contact the (remainders) of the manufacturer.
Thanks for the information anyway!
0 Kudos
Message 5 of 5
(3,097 Views)