Вопрос

I have been working with an old Win32 application that uses OCI (Oracle Call Interface) to connect to an Oracle database. The application calls SetUnhandledExceptionFilter() to catch (among other things) access violations (exception code 0xC0000005).

However, as soon as the application logs on to Oracle using the OCI function orlon() the exception filter already installed gets overridden by the OCI lib which means exceptions are no longer caught by the filter the application originally installed. This has been verified both using a debugger and also by inspecting the function pointer value of the installed exception filter.

Does anybody have an idea why the OCI function orlon() calls SetUnhandledExceptionFilter() and how to disable this behaviour?

Это было полезно?

Решение

It seems that OCI/Oracle installs signal handlers (*nix) and exception filters (Windows) per default to handle incidents of segmentation faults (*nix), access violations (Windows) etc. in order to log diagnostics. The documentation describes where incidents are reported and how to examine them using the Oracle utility adrci.

Setting

DIAG_SIGHANDLER_ENABLED=FALSE

in the configuration file sqlnet.ora disables the OCI signal handler / exception filter and re-enables standard operating system failure processing.

Другие советы

You can also prevent the second call by overrideing "SetUnhandledExceptionFilter". See also: PreventSetUnhandledExceptionFilter

This will prevent the second call to be installed in the system...

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top