LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am getting memory cold not be read errors

I am running LabView 8.2.1 on windows XP.  I am communicating with a USB device through a DLL. I am getting windows errors that state the instruction at 0X00000000 referenced memory at 0X00000000 the memory could not be read. (The locations are never the same that’s why I used zeros).  All the DLL call work fine on an individual basis. When I get this message LabView locks up and disappears I have tried monitoring the memory but the monitor disappears also. It doesn't happen at the same place in the program,  in happens at the beginning the end and everywhere in between.

 

Any ideas would be greatly appreciated.

0 Kudos
Message 1 of 8
(3,188 Views)
A few questions...
  • Have you had any prior success with the device?
  • Do you have enough time to take a snapshot of the error messages?
  • Have you tried capturing anything using NI Spy?

 

0 Kudos
Message 2 of 8
(3,181 Views)
  • The device works fine using the same DLL in some C++ applications.
  • I can take a snap shot of the error but all it says is exactly what I wrote "The instruction at 0X3038ff90 referanced memory at 0X00000008 the memory could not be read"
  • I have not tried NI Spy, I will do that but all other tries to use NI debug have failed for the reason that when it bombs it takes everything.
0 Kudos
Message 3 of 8
(3,175 Views)
Those kinds of errors are usually due to stomping over a part of memory that you shouldn't be touching. Likely cause is the allocation of memory, or non-allocation of enough memory. Even if the DLL call works once by itself doesn't mean it isn't messing up with memory, and causing subsequent calls, or calls to other functions to crash LabVIEW. Are any of the DLL calls using arrays, or strings? Do you see "void *" in any of the argument types?
0 Kudos
Message 4 of 8
(3,169 Views)
There are some strings I don't see any voids
0 Kudos
Message 5 of 8
(3,160 Views)
OK. Are these strings inputs or outputs of the DLL call? If they're outputs you need to preallocate the string. I'm not saying this is the issue since we can't see your code unless you post it and the DLL. At the moment there's little to go on other than the fact that you're getting a crash when you call a DLL from LabVIEW, and the specific DLL call that causes the crash is random. Like I said, not much to go on.
0 Kudos
Message 6 of 8
(3,147 Views)
Let me back up a bit. The crash doesn't always happen when calling the DLL I am also sending and retreaving from a microsoft access database and it happens then also, and it happens when I have a window pop up to enter indentifying data about the test and I am not actually sending or receiving anything.
0 Kudos
Message 7 of 8
(3,138 Views)
Hi Jim,
 
Would the crash happen if you never called any of the DLLs, but left the rest of your code the same?  Here is a KnowledgeBase that talks about DLLs and LabVIEW crashing that might be helpful.
 
Regards,

James R.
National Instruments
0 Kudos
Message 8 of 8
(3,106 Views)