LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

***Access Violation Error ***

Hello All,

I have a exe which runs on LV 2011. i was running some tests (for about 6-7hrs), however, i have this access violation error (0xC0000005) at EIP = 0x30345365.... 

i have attached the log file and the snapshot of this error.. 

 

its quite dangerous as when the error pops up, the machine still runs with all the sensors, analog output still ON... can anyone please suggest what could be going wrong?? 

 

I checked the knowledge base articles relating to this error, but none of the scenarios match to what I m doing... i have a producer consumer loop in my system... could that be a problem? 

I have had this issue in the past when i was running tests for more than 5hrs... sampling rate is 2Hz 

Now on LabVIEW 10.0 on Win7
Download All
0 Kudos
Message 1 of 12
(4,017 Views)

This seems to be a very generic error that Windows can throw and does not give us much information to go on. Can you explain more about what specifically your code is doing? Are you writing to any files or storing data?

 

Brandon L.
Automation Engineer
0 Kudos
Message 2 of 12
(3,967 Views)

Brandon, yes, i am writing 5 analog input channels to a .txt file format at 2Hz.

 

The inputs are being sampled at 4Hz, but I am down-sampling the inputs and writing at 2Hz... moreover, I have lot of digital inputs and outputs, analog output in my code.. i have observed this error to be popping up after every 4.5 to 5hrs...

 

could this be an issue with software?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 3 of 12
(3,954 Views)

A 0xC0000005 access violation error can be returned in a number of cases, such as an antivirus program or other software blocking permissions. You might look into potential issues that may be related to User Account Control or anti-virus programs. A good thing to try in these cases it to try running the software as an Administrator.

 

It could also means that VI has attempted to access memory that it shouldn't. I could possibly be that file you are writing is too large. And you might try to periodically save/close the file and open/write to a new one.

 

Are you able to run this VI on another machine? Do it still get this error on the other machine? This might help us narrow down if it is faulty RAM memory on your machine.

Brandon L.
Automation Engineer
0 Kudos
Message 4 of 12
(3,934 Views)

I checked the machine for RAM check.. it was all good.. i am confused if this error could be a result of the way i have written my code... 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 5 of 12
(3,910 Views)

From what you have told me, it looks like this could be an issue with you code trying to write too much data to a file at one time. LabVIEW has to create a buffer to store the data before you write it to the file.  There are limits to the size of this buffer, depending on a number of things.

 

How often are you writing to the text file?

 

How much data is being written to the text file?

 

Are you writing to it in the middle of the program or just at the end?

Brandon L.
Automation Engineer
0 Kudos
Message 6 of 12
(3,891 Views)

@Brandon-L wrote:

From what you have told me, it looks like this could be an issue with you code trying to write too much data to a file at one time. LabVIEW has to create a buffer to store the data before you write it to the file.  There are limits to the size of this buffer, depending on a number of things.

 

How often are you writing to the text file?

I am writing 7 analog input channels at the rate of 2Hz. i sample channels at 4Hz, but down-convert and save to file at 2Hz.

 

How much data is being written to the text file?

around 40-50MB, bt I hav written GB's of data to a text file before... moreover i am using producer consumer loop, so, tht should take care of buffer size and all that

 

Are you writing to it in the middle of the program or just at the end?

middle


 

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 7 of 12
(3,883 Views)

Hi LV_Enthu,

 

Have you tried to create several files instead of using only one large file? Another question, have you tried this in another computer?

 

Regards,

steve.bm
AE | NI
0 Kudos
Message 8 of 12
(3,858 Views)

hello steve.bm, 

                      i have not tried this code on diff computers, but I am creating only 1 file... also, I observed that after around 5.5MB of data being written i get this error... 

could this be a problem with the code or the machine itself?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 9 of 12
(3,852 Views)

Even though the text file that you writing is not that large, you might still have an issue with LabVIEW trying to create a buffer for the data coming in and Windows OS not allowing LabVIEW to exceed a certain limit. 

 

Are you closing your references to the text files?

You mentioned that you have "lot of digital inputs and outputs"...are you temporally storing the data maybe in the form of arrays, graphs or charts?

Do see the memory usage increase after the program has been running for a long time?

Have you tried running as Administrator?

Is you block diagram simple enough where you could post a picture of it?

0 Kudos
Message 10 of 12
(3,819 Views)