LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Handle errors

Hi everybody!

I would like to know if there is a way to detect where is produced an unexpected error that causes my application to crash.

Any ideas?

Thanks.
0 Kudos
Message 1 of 7
(3,245 Views)
Hi Toni,

have you tried wiring the error clusters and use it in your vis as well?

Your question is very generic... Any more details? What's an "unexpected error" in your app?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,234 Views)
Hi GerdW,

An unexpected error in my application is when the application is running and suddenly a system error happens or appears a pop window saying to me that my application has generated an error and it must be closed, something like that.

Then, in my application there are several VIs running at the same time, everyone with a event structure, and I would like to know how to add  an event case in each of them to handle the error that produces the system. Frequently appears errors that crash my application, and pop windows appear. I check the events viewer of the OS and it says that is a System error. I'm thinking about reinstalling the OS.

Many thanks.
0 Kudos
Message 3 of 7
(3,228 Views)
These are usually caused by components which deal with pointers and memory handling, like drivers. The error dialog should have a button or a link with details of the module which caused the error, which sometimes gives you a clue (e.g. if the module is a VISA DLL, then the problem is most likely with the VISA driver). Finding the exact cause is not easy, because sometimes the crash can occur much later than the actual error.

If you have any drivers and components which do memory handling, you should make sure you use updated versions. If the crash is relatively common, you can try adding code which will allow you to disable parts of the program and see if that helps. If it does, the problem is most likely with the part you disabled.

___________________
Try to take over the world!
0 Kudos
Message 4 of 7
(3,213 Views)
Hi,

I have a couple of vi running at the same time, with an event structure inside a while loop. This loop executes repeatedly. How can I add an even case to handle an unexpected error? Then If I handle this error I could know what is happenning. And Could it be a solution to reinstall the OS and all the drivers again?

Many thanks.
0 Kudos
Message 5 of 7
(3,206 Views)
Hi,

I have a couple of vi running at the same time, with an event structure inside a while loop. This loop executes repeatedly. How can I add an even case to handle an unexpected error? Then If I handle this error I could know what is happenning. And Could it be a solution to reinstall the OS and all the drivers again?

Many thanks.
0 Kudos
Message 6 of 7
(3,205 Views)
You can't handle this error programmatically because it does not happen in your code. It is something that happens to the process and Windows is showing you that error, not LabVIEW. Reinstalling everything might or might not help.

___________________
Try to take over the world!
0 Kudos
Message 7 of 7
(3,201 Views)