LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labVIEW Crashes while closing the VI

Solved!
Go to solution

Hi all,

 

I am experiencing a labVIEW crash everytime I close my VI after running it. what the VI is doing is, it communicates with an opal kelly board through the okFrontPanel.dll and reads some data from it and displays it in the front panel. The vi runs fine and I get the results as well. But after stopping the vi, when i try to close the vi, labVIEW crashes. 

 

Has anyone faced such an issue? I would appreciate if anyone can help me fix this issue.


Thanks and regards,
Nitz

(P.S: I am not able to upload the code due to restrictions and also its a quite lengthy code to create a sample vi to replicate the scenario)

0 Kudos
Message 1 of 3
(3,914 Views)
Solution
Accepted by NitzZ

A crash is usually an indication that something inside the DLL is touching an area of memory which it shouldn't be touching. The fact that the VI runs fine is incidental. It seems that in this case the DLL touches something which is only affected when LV needs it when closing the VI. I think the only thing you can do about it on the LV side is make sure you allocate large enough buffers for variable length parameters the DLL uses. I'm assuming you don't have access to the source code of the DLL?


___________________
Try to take over the world!
Message 2 of 3
(3,896 Views)

Hi tst,

 

Even I was suspecting something similar but the way you explained the dll and memory behavior, I could understand the problem better and fix the issue. The crash was happening as the data capture length input to the dll had a wrong data type. Thank you very much for the help. Your posts have always inspired me and this is yet another instance.. Smiley Happy 


Warm regards,
Nitzz

0 Kudos
Message 3 of 3
(3,880 Views)