LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Exception: Access Violation (0xC0000005) at Receipt on a network application build under Labview 2011 with Win 7; could someone give a solution?

The error it’s appearing from time to time and is embarrassing when you get it after 3 days of running.

Download All
0 Kudos
Message 1 of 4
(3,191 Views)

It looks like it could be a memory access problem.  If your program runs for 3 days, is it possible that you are simply "running out of memory" because you are, for example, "growing" arrays (or other structures) and they just consume all of your memory?  This can also happen if you get into an infinite recursion loop.

 

Judging by your Front Panel, I'm guessing this is a pretty complicated program.  You might consider seeing if you can get a run-time estimate of the memory your program is using, and write this periodically to a log file (open the file, go to the end, write, and close it -- this way, when everything crashes, your file is still intact and you can see what was happening just before it failed).

 

Bob Schor

0 Kudos
Message 2 of 4
(3,161 Views)

To help determine the cause of this error in your application, could you describe in general what your application is doing? Are you using any toolkits, hardware (DAQ, FPGA, cameras, etc.), external code (e.g. DLLs, ActiveX), etc? Is there a certain scenario when the crash is likely to happen? Are you having any memory usage issues, like an array getting bigger and bigger? It seems like it could be an memory issue since it runs fine for several days. You could use the Windows Task Manager to check out memory usage or the Windows Performance Monitor. The NI LabVIEW Desktop Execution Trace Toolkit is also available for tracking memory leaks and reference leaks. Or you could consider the file logging suggestion of the above post.

 

An Access Violation is a general Windows exception, so there can be a wide variety of root causes. There are other LabVIEW threads discussing some causes of this exception. This forum post is particularly helpful, as they list several scenarios and potential fixes:

  • upgrade to LabVIEW 2012 SP1. A couple threads said the upgrade fixed issues with the XY Graph that was causing this exception.
  • Initializing an array of known size and using Insert into Array instead of Build Array
  • Problems with call library function node and a fix
  • Having too many open references (hardware, file, etc)

There's another post about this error when using an FPGA.

As you can see there are a wide variety of causes, so more information about your application and the nature of the crash, including memory usage around the time of the crash, would be useful.

Taylor B.
National Instruments
0 Kudos
Message 3 of 4
(3,159 Views)

Hello,

Thank you for your input. I’ll try to evaluate the memory allocation during the running process!

Stefan Paunescu

0 Kudos
Message 4 of 4
(3,088 Views)