LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Access Violation error(OxC0000005)

My .exe file crashes after approx 4 hrs of Operation . The application slows down & system hangs & an Access Violation error message pops up. Once we Click Ok on the error, the .exe file crashes & it has to be opened again & run

I am also attaching the image of the issue along with all the report ids .

 

Also i am attaching a document "Access denied error" with all the actions carried out to address the issue 

0 Kudos
Message 1 of 10
(1,283 Views)

Hi Sarman,

 


@Sarman wrote:

My .exe file crashes after approx 4 hrs of Operation . The application slows down & system hangs & an Access Violation error message pops up.


Most probably there is a problem within your source code used to create the executable.

Are you sure there are no memory leaks (or similar issues) in your code?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(1,269 Views)

Seems to happen during DB Connect. Are you opening a DB connection over and over again but not properly closing the connection or possibly a statement every time? 

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 10
(1,262 Views)

Hi , we checked for memory leaks by running the Task Manager in parallel. You can see in the attached image that only 54% memory is consumed when the file is running. This value changes from 50-60 %

0 Kudos
Message 4 of 10
(1,248 Views)

Out of memory error is a different type of error. A LabVIEW refnum doesn’t take up that much memory and even the underlaying ADO/DAO object of a databese refnum is not going to consume huge amounts of memory. But somewhere in the database driver stack there might be a component that does not like to open new connections to the same database over and over without closing the previous ones properly.

But it is simply a guess from the error message you showed which indicates the crash to occur in DB Connect. It could be 100 other things that just happen to trip the system the moment the DB Connect was executed. But there seems to be something that accumulates over time as you indicate that it always happens after about 4 hours, or does it?

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 10
(1,221 Views)

Yes the crash happens after 4hrs of operation. It was also observed that after 2hrs of operation, system slows down & picks up its pace when we keep the bench in idle condition for a minute or so. Also the possible cause of error changes everytime the system crashes. I am attaching an image of a different cause of error.

We are using NI 6509 for DI & DO. 

0 Kudos
Message 6 of 10
(1,189 Views)

Hi Sarman,

 


@Sarman wrote:

Yes the crash happens after 4hrs of operation.

It was also observed that after 2hrs of operation, system slows down & picks up its pace when we keep the bench in idle condition for a minute or so.

Also the possible cause of error changes everytime the system crashes.


So the conclusion still is: there is some kind of memory leak in your code and you need to fix that.

 

As long as you only show some error dialogs we cannot help you with your task (apart from giving generic advice)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(1,170 Views)

Is there a way I can diagnose from which part of the code , we are having Memory Leaks?. 

0 Kudos
Message 8 of 10
(1,155 Views)

Hi Sarman,

 

use DETT

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(1,147 Views)

You can also open your crash dumps with WinDbg, see where the exception occurs and if the stack trace gives you any clue.

0 Kudos
Message 10 of 10
(1,144 Views)