TraceProcess still running while madExcept is turned OFF

delphi package - automated exception handling
Post Reply
PizzaProgram
Posts: 21
Joined: Wed Mar 30, 2022 9:35 pm
Location: Budapest
Contact:

TraceProcess still running while madExcept is turned OFF

Post by PizzaProgram »

Hi,
I've just encountered a strange behaviour...

I had a bug in my program, when the CPU core jumps up to 100% in an infinite WHILE cycle.
100% CPU, picture made from Process Hacker.
100% CPU, picture made from Process Hacker.
100_percent_CPU.jpg (31.34 KiB) Viewed 4600 times
Additional info:
At mad-settings the "Check for frozen main thread" is OFF.

... and now comes the strange part:
1. If I DISABLE MadExcept completely at [Project > madExcept settings... ],
2. re-Build the whole EXE,
3. it's still doing the SAME! (while there should be no madTrace present at all, should it ? )
Last edited by PizzaProgram on Fri Feb 17, 2023 7:12 pm, edited 2 times in total.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: TraceProcess still running while madExcept is turned OFF

Post by madshi »

The Task Manager / ProcessExplorer does not really have access to the true callstack of each thread, because Delphi compiled EXEs do not come with debug information that the Task Manager or ProcessExplorer supports.

However, if madExcept is enabled, there's a "madTraceProcess" exported API in your EXE file. Since that's the only named export the Task Manager / ProcessExplorer can find, they'll show that as the function name listed for that thread. Which basically means it's completely meaningless. You seeing "madTraceProcess" means nothing. It's only shown because it's the only exported name of your EXE file.

If you disable madExcept completely, though, there should be no "madTraceProcess" listed, so that part is strange.
PizzaProgram
Posts: 21
Joined: Wed Mar 30, 2022 9:35 pm
Location: Budapest
Contact:

Re: TraceProcess still running while madExcept is turned OFF

Post by PizzaProgram »

Thank you for your answer!

What do you mean by "disable madExcept completely" ?
I've unchecked at Project setting + have rebuilt the EXE. (As I wrote in my orig. post.)
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Re: TraceProcess still running while madExcept is turned OFF

Post by madshi »

That should suffice - unless you have some bpls or dlls loaded which still link to madExcept.
Post Reply