What is the best way to induce a frozen main thread?

delphi package - automated exception handling
Post Reply
stw576
Posts: 2
Joined: Wed Aug 17, 2005 5:13 pm

What is the best way to induce a frozen main thread?

Post by stw576 »

I want to test that my program now checks every 60 seconds for a frozen main thread. What is the best way to do this? Right now, I'm trying:

for i:=1 to 100 do
sleep(1000);

This causes the program to say "Not Responding" but madExcept isn't saying that the program seems to be frozen. Is it a bug in madExcept or am I approaching this wrong?
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

So madExcept isn't even complaining after those 100 seconds? Your code should actually trigger the freeze detection alarm. That's strange. Do you have a custom exception handler installed?
stw576
Posts: 2
Joined: Wed Aug 17, 2005 5:13 pm

Post by stw576 »

No, I don't have a custom exception handler installed. I showed this to a co-worker, and he showed me that I had one setting unchecked that I was depending on to show me that the application was frozen. Sorry about this. False alarm. But thanks for the quick response.
Post Reply