madTraceProcess32 creates exception in called program
-
- Posts: 2
- Joined: Thu Feb 06, 2025 10:22 am
madTraceProcess32 creates exception in called program
Hi there
We have used madExcept for many years (10+) in many versions of Delphi with great success. This includes the madTraceProcess32 for detecting endless loops in all our service applications (can also run in user mode).
Unfortunately madTraceProcess32 does not work with our latest version of Delphi that we use, Delphi 12.
When MadTraceProcess is started for an application, only the stack trace page is created with the current content of the clipboard. The application itself is throwing an exception with error code C0000005 (buffer overrun) in ntdll.dll. The application then terminates.
My current system is:
Embarcadero® Delphi 12 Version 29.0.51961.7529
Microsoft Windows 10 Enterprise
10.0.19045 Build 19045
madTraceProcess32.exe is digitally signed by Mathias Rauen
8. november 2023 18:15:15
// ***************************************************************
// madExcept.pas version: 5.1.4 · date: 2023-11-08
// -------------------------------------------------------------
// exception handling
// -------------------------------------------------------------
// Copyright (C) 1999 - 2023 www.madshi.net, All Rights Reserved
// ***************************************************************
Any help will be appreciated.
We have used madExcept for many years (10+) in many versions of Delphi with great success. This includes the madTraceProcess32 for detecting endless loops in all our service applications (can also run in user mode).
Unfortunately madTraceProcess32 does not work with our latest version of Delphi that we use, Delphi 12.
When MadTraceProcess is started for an application, only the stack trace page is created with the current content of the clipboard. The application itself is throwing an exception with error code C0000005 (buffer overrun) in ntdll.dll. The application then terminates.
My current system is:
Embarcadero® Delphi 12 Version 29.0.51961.7529
Microsoft Windows 10 Enterprise
10.0.19045 Build 19045
madTraceProcess32.exe is digitally signed by Mathias Rauen
8. november 2023 18:15:15
// ***************************************************************
// madExcept.pas version: 5.1.4 · date: 2023-11-08
// -------------------------------------------------------------
// exception handling
// -------------------------------------------------------------
// Copyright (C) 1999 - 2023 www.madshi.net, All Rights Reserved
// ***************************************************************
Any help will be appreciated.
Re: madTraceProcess32 creates exception in called program
Hello,
While I do not have Delphi 12 available for testing you said that 0xC0000005 was thrown? That's definitely ACCESS_VIOLATION, usually a *bad* memory access ;/
Quick question, did this work with previous compilers such as Alexandria (11.x) and below, sounds like it perhaps? Last thing, are we able to reproduce this with your instructions?
--Iconic
While I do not have Delphi 12 available for testing you said that 0xC0000005 was thrown? That's definitely ACCESS_VIOLATION, usually a *bad* memory access ;/
Quick question, did this work with previous compilers such as Alexandria (11.x) and below, sounds like it perhaps? Last thing, are we able to reproduce this with your instructions?
--Iconic
-
- Posts: 2
- Joined: Thu Feb 06, 2025 10:22 am
Re: madTraceProcess32 creates exception in called program
Hi again
I do not think you can reproduce the issue from my input, unless the error is also on your platform or source code.
We are using madExcept and madTraceProcess32 in Embarcadero® Delphi 11 Version 28.0.44500.8973 and many prior releases of Delphi.
One major problem is to debug into madExcept source files, to try to catch the offending call. Any suggestions will be welcome
/Preben
I do not think you can reproduce the issue from my input, unless the error is also on your platform or source code.
We are using madExcept and madTraceProcess32 in Embarcadero® Delphi 11 Version 28.0.44500.8973 and many prior releases of Delphi.
One major problem is to debug into madExcept source files, to try to catch the offending call. Any suggestions will be welcome

/Preben
Re: madTraceProcess32 creates exception in called program
Just to add to this: we discovered this issue (or very similar).
Both and old madTraceProcess.exe and the latest madTraceProcess32.exe cause the running application to think for a few seconds, then disappear off screen. Attached is what we get instead of the usual stack trace window.
Only Delphi 12 executables seem affected. I tested a Delphi 11 executable and that works fine: no crash, and stack trace is produced.
Both and old madTraceProcess.exe and the latest madTraceProcess32.exe cause the running application to think for a few seconds, then disappear off screen. Attached is what we get instead of the usual stack trace window.
Only Delphi 12 executables seem affected. I tested a Delphi 11 executable and that works fine: no crash, and stack trace is produced.
- Attachments
-
- Screenshot 2025-02-17 142839.png (38.3 KiB) Viewed 1683 times
Re: madTraceProcess32 creates exception in called program
Hello,
So the issue with madTraceProcess generating an exception is only occuring when your target application is compiled with Delphi 12? Is this only *your* company's application or does this happen with *any* Delphi 12 executable, say a new do-nothing/empty application? Thanks for running your tests, it's what I wondered about with previous Delphi versions (per my initial post). According to you, previous compilers (11) worked.
--Iconic
So the issue with madTraceProcess generating an exception is only occuring when your target application is compiled with Delphi 12? Is this only *your* company's application or does this happen with *any* Delphi 12 executable, say a new do-nothing/empty application? Thanks for running your tests, it's what I wondered about with previous Delphi versions (per my initial post). According to you, previous compilers (11) worked.
--Iconic
Re: madTraceProcess32 creates exception in called program
good point - I tested with a "do nothing" Delphi 12 VCL program with a blank form and that's it.
Same problem.
I recorded a video if you want to see it in action: https://drive.google.com/file/d/18ro2iH ... drive_link
Same problem.
I recorded a video if you want to see it in action: https://drive.google.com/file/d/18ro2iH ... drive_link
Re: madTraceProcess32 creates exception in called program
Hmmm, does the same thing happen with madTraceProcess64 with a 64-bit targeted application?
--Iconic
--Iconic
Re: madTraceProcess32 creates exception in called program
64 bit works! I also do not need to run madTraceProcess64.exe as administrator to get the stack trace
Re: madTraceProcess32 creates exception in called program
Thank you for the additonal 64-bit test! Very much appreciated
According to you this is a Delphi 12 compiler issue with a 32-bit app only while using madTraceProcess32. Madshi will see this, please give this some time however and sorry for any inconvenience.
--Iconic

--Iconic