LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

program stops reproducable without message.

Hello!
I have made five VIs: one which builds the user interfaces and four which grants the functions openDevice, startMeasurement, getRawData, closeDevice. The device is self developed. If I make openDevice and then closeDevice => OK. If I perform all the functions in a sequence, on closeDevice the program is performed completely but then, when the program should come back from the CallLibrary node to a breakpoint, the whole LabVIEW application will be terminated. The actions in the called library function are performed completely. I assume a memory problem in LabVIEW but I cannot find it. Maybe someone could have a look at the enclosed VIs.
Any suggestions are welcome. Thanks a lot! Georg
0 Kudos
Message 1 of 2
(2,239 Views)
GeorgsLabView wrote:

> Hello!
> I have made five VIs: one which builds the user interfaces and four
> which grants the functions openDevice, startMeasurement, getRawData,
> closeDevice. The device is self developed. If I make openDevice and
> then closeDevice => OK. If I perform all the functions in a sequence,
> on closeDevice the program is performed completely but then, when the
> program should come back from the CallLibrary node to a breakpoint,
> the whole LabVIEW application will be terminated. The actions in the
> called library function are performed completely. I assume a memory
> problem in LabVIEW but I cannot find it.

Make that a memory problem in the DLL 😉 memory problems in LabVIEW are
so rare nowadays that anytime you use a DLL somewhere in
your code, you
can with 99.999% safety assume that the problem is in the DLL or the way
you configured the CLN to call the DLL.

As such I can't immediately see anything wrong with the way you call the
DLL but that doesn't mean much as there are a lot of potential problems
such as the arrays and strings you pass in being shorter than what the
DLL tries to write into. This can crash immediately or not, but if it
doesn't it will just overwrite some other crucial information for
LabVIEW and when you close it LabVIEW trips over this when it tries to
properly deallocate its hundreds and hundreds of dynamically allocated
pointers, arrays, management structures etc.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 2
(2,239 Views)