07-13-2023 06:26 AM
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
07-13-2023 07:11 AM
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?
07-13-2023 07:28 AM
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?
07-13-2023 07:41 AM
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 %
07-13-2023 08:40 AM
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?
07-13-2023 11:27 PM
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.
07-14-2023 03:33 AM - edited 07-14-2023 03:34 AM
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)…
07-14-2023 06:49 AM
Is there a way I can diagnose from which part of the code , we are having Memory Leaks?.
07-14-2023 07:33 AM
07-14-2023 07:41 AM
You can also open your crash dumps with WinDbg, see where the exception occurs and if the stack trace gives you any clue.