LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Avoid General Protection Fault

Hi,

How can I prevent the pop-up message of General Protection Fault, when using XML functions?

For example: errChk(CVIXMLGetRootElement(ReportHandle, &ReportRootElement))

When the ReportHandle is not correct I receive the General Protection Fault message.

Is there any way to prevent the message?

I tried: DisableBreakOnLibraryErrors(), SetBreakOnProtectionErrors(0) functions, but without success.

 

Thank you.

0 Kudos
Message 1 of 3
(3,104 Views)

Several aspects to this :

 

1.  There's no way I know of the trap and handle a GPF in CVI.  You just have to not generate them in the first place 🙂

2.  You can set a registry value to not do popup error messages (error mode) and to not send a love note to micro$oft but if you GPF you're process is going to die anyway.

3.  These are Win32 errors, not a CVI library error per se though the issue may be with the CVI library.   So the library error management functions don't do anything for you here.

 

I think you need to check for a valid report handle prior to making the call.

 

Menchar

0 Kudos
Message 2 of 3
(3,084 Views)
Thanks, I will check for a valid report handle.
0 Kudos
Message 3 of 3
(3,056 Views)