LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll access crashes LV

Hi there,

I am working with an external dll. It is an easy vi, I just use the "Call Library Function Node" to read some data, there is nothing else in there.

I have no idea how to solve it, because it crashes in different places everytime.
When I execute the program it ussually works properly, I get my data.
But when I stop the program and try to save it or just to resize or move any element it crashes. A message comes saying that LV has produced a fatal error and will be closed. This is what happens most of the times, but sometimes it just crashes at the very beginning.

99% of the times I get no log file. But last time I got it. I post it here so maybe it is helpfull.


####
#Date: Mo, 14. Mrz 2005 16:15:50
#OSName: Windows NT
#OSVers: 5.0
#AppName: LabVIEW
#Version: 7.1
#AppKind: FDS



D:\lvmerc\src\source\data\LVDataWriter.cpp(449) : DWarn: FlatSize for array is negative
$Id: //labview/branches/Mercury/dev/source/data/LVDataWriter.cpp#2 $
0x004E4BFB - LabVIEW + 0
0x004E4C78 - LabVIEW + 0
0x004C0385 - LabVIEW + 0
0x004C8873 - LabVIEW + 0
0x004C8719 - LabVIEW + 0
0x007A0038 - LabVIEW + 0
0x0079EEC9 - LabVIEW + 0
0x0079CF2E - LabVIEW + 0
0x0079B87E - LabVIEW + 0
0x009FDFD7 - LabVIEW + 0
0x00A04DAD - LabVIEW + 0
0x009FAE5B - LabVIEW + 0
0x004B7F79 - LabVIEW + 0
0x004B7E3C - LabVIEW + 0
0x004B7D47 - LabVIEW + 0



What I do not understand is that it is trying to read or write from D, which is my CDRom, and I am not using it at all!!

I think it should be something related with the memory that LV is using. The dll has been working for long time without problems, so I do not think that is the cause.

I am getting the data through the serial port. I have tried to put some delays, but it does not help too much.

Any idea?

Thanks in advance.
0 Kudos
Message 1 of 2
(2,447 Views)
Not sure what is causing the crash but I can clear up a bit of confusion...

The D drive you see is not your CD-ROM, but the location of the source file when LabVIEW was built - the D drive here at NI. As a bit of trivia, the code name for LV 7 was Mercury which is why the directory is called lvmerc.

It sounds like something somewhere is corrupting memory. Bugs that like are nasty because it seems like everything is fine and can keep running for days until you do just the right thing and boom! It might be something as simple as the Call Library Node not being quite right - if you declare your method as a cdecl but tell LabVIEW it is a stdcall, then you can corrupt the stack. I would go back and be extra special careful and look at your function declaration in the DLL and your Call Library Node.

Also, when you say the DLL has been working for some time, how do you mean? In LabVIEW? In another application language?

Brian
0 Kudos
Message 2 of 2
(2,438 Views)