LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll memory crash

Hallo everyone:

I just confront a terrible problem, i wrote a program which load existing DLL files to read and set parameters of several modules, after start, it works well at beginning, but one hour or more later(unregulated), the program stops automatically and the whole labview quit without any error. There must be some conflict or memory crash, but I can not locate the problem because of no error message.

Is there anyone with relative experience about this problem, it real kills.

Thanks in advance.

0 Kudos
Message 1 of 12
(4,436 Views)

In the program of DLL, did you free up the memory every time after you close it?

 

I would suggest try to monitor the memory usage while runing the VI.

0 Kudos
Message 2 of 12
(4,420 Views)

thanks so much for your reply, i do not know what happened within DLL program, it is 3th party application, i just load them repeatedly, no free up action, and it seems that Labview have no memory realease or control function, so i monitor the memory usage while running the VI, but everything looks fine, this crash occurs suddenly, shorlty and unregulately, the whole labview are shut down after crash, quit terrible.

do you know any solution to realease memory in Labview? 

0 Kudos
Message 3 of 12
(4,413 Views)

I don't think LV has open/close library functions and they are handled automatically. In your DLL library, are there open/close functions? If yes, be sure to call them. Otherwise, I would suggest call the DLL in other language and try to see if it is a LV problem or the DLL problem. Good luck.

0 Kudos
Message 4 of 12
(4,403 Views)

right now, this crash happened again when i openning IE, i do not know what kind of conflict that is, sometime it crashes when i open Word, sometime IE, quite strange problem.

0 Kudos
Message 5 of 12
(4,398 Views)

Just a shot in the dark here:

You said it crashes when you open Word or IE. Those are both Microsoft applications. Maybe there is a conflict while running other Microsoft software, if they are also trying to read/write to the dll simultaneously?

Message Edited by Cory K on 07-21-2009 09:26 AM
Cory K
0 Kudos
Message 6 of 12
(4,393 Views)

thanks for comments, the strange thing is that, these DLL have no relation with Labview at all, they are used to communicate with 3th party's devices.

 

0 Kudos
Message 7 of 12
(4,389 Views)
Even if your DLL is good and you are calling the correct functions in the correct order, you can crash LabVIEW by specifying the wrong function prototype in the call library node.  I have "successfully" used code which specified U32s when it should have specified U64s - "successfully" used until it crashed.  Even if it appears to be working correctly, you could have a poor prototype.  This corrupts the call stack and leads to random crashes like you are experiencing.
0 Kudos
Message 8 of 12
(4,368 Views)

I had the same problem. DLL comes from supplier. DLL crashes when closing.  Won´t bother usualy, because you shut down your C++ Host software anyway. But in my case, I don´t want to crash labview. There was no way to fix this.

I had to implement the whole functionality with LabVIEW primitves. Not funny!

0 Kudos
Message 9 of 12
(4,118 Views)

some update. the reason of my dll crash problem was found, all outputs from Call Libary Function Node shall be wired, ohterwise they may occupy too much memory, which causes the crash after a certain time.

0 Kudos
Message 10 of 12
(4,106 Views)