Root > Integral parts > Options > Advanced page

Advanced page

Previous pageReturn to chapter overviewNext page   

This is "Advanced" page in EurekaLog project's options.



Advanced options


This page allows you to set advanced EurekaLog options. There are also some sub-categories:



1. "Use speed optimizations" option enables caching of kernel information to improve performance of stack tracing.


Turn off for packers and protectors.


Note: this option will be automatically disabled when "Detalization level" option is set to "Show any (including RAW addresses)" or "Show any item belong to executable module (unknown locations within DLL)" value.


It is recommended to keep this option unchecked unless you suffer from slow work of your application.



2. "Use low-level hooks" option allows or forbids using of low-level hooks. Low-level hooks use code injection (e.g. overwrite code with JMP machine instruction).


Using low-level hooks allows you to capture low-level information such as CPU state. Low-level hooks are also required for additional WER functionality. However, a documented way of installing low-level hook is available only in Windows XP and later. For older OS - undocumented hack will be used. If this option is unchecked - EurekaLog will use RTL functionality and will not install low-level hooks.



Low-level hooks will always be used on Delphi 2007 and below, since RTL support for handling exception was only introduced in Delphi 2009.
Using of low-level hooks may introduce compatibility issues with 3rd party protection software with anti-crack detection.
EurekaLog uses different implementation on Windows 2000 and Windows XP and above:
oWindows 2000: use SEH - inject hook into KiUserExceptionDispatcher (undocumented hack).
oWindows XP+: use VEH - add handler via documented API.
This option controls only collecting information stage ("raise"). This option has no effect on other places. For example, hooks for handling exception are controlled by these options.


Turn off for packers and protectors.


Important note: turning off low-level hooks means that EurekaLog will not install additional hooks for API functions. This means that EurekaLog will not intercept important system calls. For example, EurekaLog will not hook ExitThread function, which means EurekaLog will not know when a thread exits. This will lead to thread information stored forever - until application terminates. You can call internal _NotifyThreadGone or _CleanupFinishedThreads functions to notify EurekaLog about thread's termination. Such manual notifications can be avoided by using EurekaLog's wrappers (TThreadEx, for example).



3. "Handle every SafeCall exception" option is used to catch safecall-exceptions with EurekaLog. This option is useful in COM servers, COM applications and other interface-related code.


When this option is off - safecall exceptions will be handled by default processing which usually means losing information about error location.

When this option is on - safecall exceptions will be handled by EurekaLog and then by default processing.


Usually it's a good idea to disable error dialogs and visual feedback for safecall exceptions since these exception will be handled by calling code (which will display error message).



Each safecall exception is considered to be handled exception. Keep that in mind when you setup exception filters or write event handlers.
This option has no effect if "Catch handled exceptions" option is enabled (see below).
This option requires extended memory manager enabled.
It's a good idea to include fix for QC report #81725 when you use "Handle every SafeCall exception" option.
Internally, "Handle every SafeCall exception" option installs hook for ComObj.HandleSafeCallException routine (when low-level hooks are allowed) or scans exception's call stack for _HandleAutoException routine (when low-level hooks are not installed). The later can cause building call stack for all exceptions even with "deferred call stacks" option set.


Alternative for this option is to invoke EurekaLog manually from your SafeCallException handler.


See also:



4. "Catch handled exceptions" option will enable EurekaLog for all exceptions. By default EurekaLog processes only exceptions which are unhandled (see handled/unhandled terms definitions).


It's not recommended to use this option. That's because "handled" for exception means that this exception is expected and it was handled by code. Therefore, it's better to setup proper exception handling in your code. This option is used primary as last resort measure to work with "bad" code (the code which hides unhandled exceptions).


Be sure to setup proper exception filtering when you enable this option. Often it's a good idea to disable error dialogs and visual feedback for handled exceptions.


Note: you should use "Handle every SafeCall exception" option for safecall-exceptions instead of "Catch handled exceptions" option.

Note: this option requires extended memory manager enabled.



5. "Call RTL OnException event" option will invoke default processing for exception after processing exception by EurekaLog. Use this option to get default behaviour (such as error dialogs), but still use EurekaLog features.


Usually it's a good idea to disable error dialogs and visual feedback when enabling this option.


It's not recommended to use this option. It's primary used for backward compatibility with old EurekaLog versions. New code should consider using RTL error dialog instead.



See also:

Send feedback... Build date: 2020-01-21
Last edited: 2018-06-14
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.

Permanent link to this article: