05-21-2009 01:14 AM
Hey, In an application on stop command, I exit from labivew on exit I get an error the referenced memory could not be read click ok to terminate program can any one suggest why this error is seen
how this can be resolved?
enclosed a screen shot of error
Regards
anil
05-21-2009 01:45 AM
Hi anil,
Which version of LV u r using. Wat is your application. Can you give us some more information ??
Koushik
05-21-2009 02:14 AM
07-30-2009 04:12 PM
08-07-2009 03:35 AM
I got the same problem with an LabView application built with 8.6.1 but not with 8.5.1 The exe works very well until the EXIT-function. Other selfmade applications doesn't have this. I use only the database connectivity functions in all apps. Only the instruction adress is different on other pc. The problem is only on the pcs with the runtime engine.
Any idea?
Andreas |
08-10-2009 01:45 AM
Hi AndreasC,
This error message occurs when LabVIEW memory space goes corrupt and is often due a DLL or CIN code.
There can be two reasons for this:
1. Try removing all DLL calls in your code and see if it works. Most of the time, the corruption is traced to a call to a DLL function that has incorrectly passed inputs to the Call Library Function node, often by passing an uninitialized string or array, or by writing past the bounds of the string or array in the DLL function. Some DLL functions assume that a string buffer is presized to 256 bytes, 1 KB, or some other size. If a smaller sized string buffer is passed, the DLL can write past the buffer and corrupt the dataspace that follows.
2. This error can also be caused when running a LabVIEW built executable. If the VI calls a WinAPI DLL function and uses the full path to the DLL in the Call Library Function Node, the LabVIEW Application Builder will create a copy of the DLL in the data directory of the executable. Some DLLs such as WinAPI DLLs should only reside in one location, such as C:\WINDOWS\system32, otherwise errors/crashes can occur when called. To prevent this, remove the DLL path in the Call Library Function Node when calling WinAPI DLLs.
Some users have faced similar problems and the above solutions have worked for them.
Here are the links to those discussions:
http://forums.ni.com/ni/board/message?board.id=170&message.id=67230&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=170&thread.id=229434&view=by_date_ascending&page=1
Regards,
Ujjval