LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Crash application

The problems are related and the thread safe setting just changed the corruption in memory slightly but didn't remove it.

 

You mention interfacing DLLs for interfacing your camera. This is the most likely culprit here. You either have some call library node misconfigured, the DLL itself does something illegal because of a bug, or the most likely reason: you pass in a buffer to the DLL that is to small and the DLL writes beyond the buffer end and destroys some memory that LabVIEW uses for something else. You will have to revisit every Call Library Node and check and triple check each one to be correctly configured and pass a big enoug data buffer to every parameter that the DLL is supposed to return data in.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 13
(1,019 Views)

But when I used interfacing DLL for interfacing camera in my old program with only one connected camera, everything was fine. But now I implemented connection for four cameras, which is only same DLL in forloop. So I dont think that problem is there. But I will try it.

 

Thank you,

Petr Vavra

0 Kudos
Message 12 of 13
(986 Views)

The Call Library Node interface may always have had a problem. Just because it doesn't crash or cause an error at runtime doesn't mean that it never overwrote memory that it shouldn't have. The changes just might have moved the corruption in some area that now matters. Or your use of multiple cameras through the same interface changed something in how the library works.

In that aspect the multithreading really may be a hint, but depending how your DLL interface works, setting the individual Call Library Nodes to run single threaded may not be enough. If your library has anywhere a call that passes a memory pointer to the DLL to later be retrieved asynchonously the library would have to be internally written to handle the possibility of multiple parallel retrievals of data. The pointer would need to be stored on a per camera context somehow but often might be just stored in a global variable for simpliticity which makes the interface absolutley unsuitable for multiple parallel camera operation. So you may have to verify with your camera interface provider if it even supports multiple parallel cameras and if all the APIs are fully multithread access safe (which I highly doubt from your description of the symptoms).

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