在 Delphi 的项目选项中打开 ,确保 madExcept_.bpl 未出现在运行时包的列表中 。madExcept 的核心代码必须直接链接(静态链接)到可执行文件(.exe)中。

开发者 frankmoritz 在官方论坛明确询问过此问题,madExcept 作者 madshi 给出了标准答案:

MadExcept hooks into Delphi’s exception mechanism ( System.SysUtils.Exception ). When an unhandled exception occurs, instead of crashing with an OS error, MadExcept intercepts it and provides:

: It includes a debug memory manager that can replace the standard Delphi memory manager to instantly identify buffer overruns/underruns and access to already freed memory. Security & Malware Context

: In the madExcept settings dialog within the Delphi IDE, navigate to the Exception Auto Actions tab and check "Automatically save bug report" .

You load a plugin BPL dynamically at runtime. The plugin overruns its stack. The crash report will show: Exception address: $12345678 Module: MyPlugin.bpl ($12000000 - $12400000 madexceptbpl top)

If this file is causing system errors or performance spikes, try these steps:

This prevents duplicate MadExcept instances inside BPLs and clarifies the stack trace – you'll no longer see madexceptbpl top as an ambiguous token.