madExcept is busy for a long time after crash

delphi package - automated exception handling
Post Reply
ai148
Posts: 16
Joined: Fri Oct 04, 2013 12:50 pm

madExcept is busy for a long time after crash

Post by ai148 »

madExcept 4.0.8.1 with Delphi 5

Hello!

After a crash we have the effect that the "please wait" box with the progress bar is displayed for a very long time, before the app is terminating. This can last 30 seconds or more on a fast system.
During development it can be very inconvenient to wait so long every few minutes. Most of the time the app has to be terminated within the task manager.
Why takes it so long? What is madExcept doing in this time?
How can we solve this problem?

Thank you in advance.
Reiner
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept is busy for a long time after crash

Post by madshi »

The "please wait" box is not supposed to be visible *at all*, normally. It's only shown in rare situations. So let me ask you two questions to figure out why it's shown in your case:

1) Are you using custom exception handlers (e.g. by using RegisterExceptionHandler, or something like that)?
2) Are you using self written DLLs which are compiled with madExcept?
ai148
Posts: 16
Joined: Fri Oct 04, 2013 12:50 pm

Re: madExcept is busy for a long time after crash

Post by ai148 »

I can answer both questions with "No".

Maybe some technical details about the application are helpful:
- big exe file (13 MB)
- we use a lot of third party components (like DevExpress Quantum Grid etc.)
- Python integration with Python4Delphi
- Database access
- App is running in VMWare with Win7 / 64

The problem appears on some images, not all.

Is there a log file from madExcept to see what is going on during that time?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept is busy for a long time after crash

Post by madshi »

Hmmmm... There's no logging activated by default. There's some logging code in madExcept which can be enabled by conditional defines, but I haven't actually used/tested it in years. I don't even know if it still compiles.

Does the "please wait" box appear every time an exception occurs? Or only sometimes? What happens if you add a simple test exception in a button click event? Does the "please wait" appear there, too?

And what do you mean that the problem appears on "some images"? What kind of images are we talking about? You mean some versions of your EXE? Or some projects but not others? Or some VMs but not others?
ai148
Posts: 16
Joined: Fri Oct 04, 2013 12:50 pm

Re: madExcept is busy for a long time after crash

Post by ai148 »

With image i mean VMWare Images. In most of these images it's fast and ok, in some others the "please wait" box stays 30 sec to some minutes.

We have made a test with a very simple (nil pointer) exception. The "please wait" box appears, the progress bar goes to 30% and then nothing happens. After a while (30 seconds to some minutes) the application terminates. There is no virus scanner or any other critical software on this virutal machine. Really a riddle...
Maybe the source is to find within Windows, so if the error cannot be found with a relative small effort, it should be reserved.

I have attached the madExcept settings in an animated GIF file.
madExcept Settings
madExcept Settings
i2.gif (178.03 KiB) Viewed 8344 times
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept is busy for a long time after crash

Post by madshi »

What happens if you create a simple new test project, just a form with a button which raises an exception. Does the same problem occur with such a test project?
ai148
Posts: 16
Joined: Fri Oct 04, 2013 12:50 pm

Re: madExcept is busy for a long time after crash

Post by ai148 »

We made the test - it's still the same. The progress bar goes to 70% instead of 30% like before.
There must be something with Windows, a bad configuration or any foreign software...
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept is busy for a long time after crash

Post by madshi »

Can you find a common pattern, maybe, for those VMs where it doesn't work? E.g. is it always the same exact OS? Maybe the same 3rd party software installed? How big are those VMs? Maybe you could make one available to me to look at?
ai148
Posts: 16
Joined: Fri Oct 04, 2013 12:50 pm

Re: madExcept is busy for a long time after crash

Post by ai148 »

It's possible to make a teamviewer session. I cannot publish the details here, so i will contact you via email.
ai148
Posts: 16
Joined: Fri Oct 04, 2013 12:50 pm

Re: madExcept is busy for a long time after crash

Post by ai148 »

We've found out that this is a problem with system rights. If the current user is the local admin, it works fine and fast.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: madExcept is busy for a long time after crash

Post by madshi »

Strange. Nobody else has ever reported a problem like this to me before, at least not that I can remember.

Is there any way for me to reproduce this problem? I rather think it might be specific to either your PC (e.g. maybe some special OS configuration or some specific 3rd party software) or to your software. Have you tried reproducing this with a brand new almost empty test project? Does the problem happen with such a test project, too?

I suppose you could try to debug this. Probably some win32 API is either blocking, or taking a long time to return. If you can find out which API is that, maybe we can figure out why that happens. If you copy madExcept.pas and mad.inc to your project folder, you can set breakpoints and debug it.
Post Reply