madTraceProcess32 creates exception in called program

contains all delphi packages mentioned below
Post Reply
preben.thomsen
Posts: 2
Joined: Thu Feb 06, 2025 10:22 am

madTraceProcess32 creates exception in called program

Post by preben.thomsen »

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.
iconic
Site Admin
Posts: 1109
Joined: Wed Jun 08, 2005 5:08 am

Re: madTraceProcess32 creates exception in called program

Post by iconic »

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
preben.thomsen
Posts: 2
Joined: Thu Feb 06, 2025 10:22 am

Re: madTraceProcess32 creates exception in called program

Post by preben.thomsen »

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 :D

/Preben
paul_au
Posts: 3
Joined: Mon Feb 17, 2025 3:25 am

Re: madTraceProcess32 creates exception in called program

Post by paul_au »

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.
Attachments
Screenshot 2025-02-17 142839.png
Screenshot 2025-02-17 142839.png (38.3 KiB) Viewed 1683 times
iconic
Site Admin
Posts: 1109
Joined: Wed Jun 08, 2005 5:08 am

Re: madTraceProcess32 creates exception in called program

Post by iconic »

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
paul_au
Posts: 3
Joined: Mon Feb 17, 2025 3:25 am

Re: madTraceProcess32 creates exception in called program

Post by paul_au »

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
iconic
Site Admin
Posts: 1109
Joined: Wed Jun 08, 2005 5:08 am

Re: madTraceProcess32 creates exception in called program

Post by iconic »

Hmmm, does the same thing happen with madTraceProcess64 with a 64-bit targeted application?

--Iconic
paul_au
Posts: 3
Joined: Mon Feb 17, 2025 3:25 am

Re: madTraceProcess32 creates exception in called program

Post by paul_au »

64 bit works! I also do not need to run madTraceProcess64.exe as administrator to get the stack trace
iconic
Site Admin
Posts: 1109
Joined: Wed Jun 08, 2005 5:08 am

Re: madTraceProcess32 creates exception in called program

Post by iconic »

Thank you for the additonal 64-bit test! Very much appreciated :D 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
Post Reply