Restart Behaviour

delphi package - automated exception handling

Restart Behaviour

Postby chapa » Wed Jan 09, 2019 12:15 pm

Hello, first time posting here.

Just upgraded to madExcept 5 from 3.
I rely on the option to restart my apps in 30 secs when exception occurs.

Now, in version 5, if except dialog get out of focus due to some reason, restart countdown is terminated. App auto restart is terminated, and I can not rely anymore, that the App will be restarted in any case.
Is this expected change of behavior of madExcept and I should workaround it, or something which will be fixed, so I can wait next release?

It is easily reproduced, when you click on exception dialog, than click on other window (or even background app). The Restart button stops showing restart progress mark.

Thanks for the great tool!
chapa
 
Posts: 3
Joined: Wed Jan 09, 2019 12:05 pm

Re: Restart Behaviour

Postby madshi » Thu Jan 10, 2019 11:38 am

This is actually intended behaviour. I've tested the latest madExcept 3.0o build and it shows the exact same behaviour. I'm not sure which madExcept 3 build you were using before. Are you sure it behaved differently? If so, it can't have been 3.0o.
madshi
Site Admin
 
Posts: 9967
Joined: Sun Mar 21, 2004 5:25 pm

Re: Restart Behaviour

Postby chapa » Thu Jan 10, 2019 12:48 pm

I cant confirm which version 3 was it.

It is actually good, if you click or manually move mouse.
In general, if you interact with Except Dialog, it is better restart countdown to be stopped, and restart prevented.
But my case is not such.

I have a few applications running on a single machine.
On external factors, like no connection with main server, I manually raise intended exception.
Waiting some time, and I know the Apps will resume.

But... As external factor occur for all the Apps, they all raise exception in the restart interval.
When second App raise Exception Dialog, first loses focus and restart is prevented. Next do the same with previous.
Finally, I am ending with all Apps hanged on Exception Dialog, and only the last restarted.
It was not the case last 10 years, never was, before the last upgrade from madExcept 3 (XE7).

It will be really good, if restart on exception is disabled only on real manual interaction with the dialog, like mouse click, button down, etc.
Just a suggestion, and would really like to see it again.
chapa
 
Posts: 3
Joined: Wed Jan 09, 2019 12:05 pm

Re: Restart Behaviour

Postby madshi » Thu Jan 10, 2019 1:15 pm

The OS doesn't tell madExcept *why* the focus went away. It could be a real user action (e.g. a mouse click on another application). Or it could be the situation you're reporting. madExcept doesn't know.

My suggestion is that you simply add some code to solve this problem. It's not very difficult. E.g. you can use RegisterExceptionHandler() to register a callback which madExcept will call when an exception occurs. In this callback you could e.g. start a thread with CreateThread() which does "Sleep(35000)" and then "madExcept.RestartApplication". Sounds easy enough to me?
madshi
Site Admin
 
Posts: 9967
Joined: Sun Mar 21, 2004 5:25 pm

Re: Restart Behaviour

Postby chapa » Thu Jan 10, 2019 1:30 pm

I fully understand that OS does not provide you with such info. But it still is "Lost Application Focus", App is not in user active focus, so is Except Dialog.
But it is easy to catch real interaction, like focus change (but not lost one), form mouse click, tab change, button clicked, or any other interaction event, and ignore lost App focus.

Going to workaround the problem like you proposed.
But still for me it is lost functionality of madExcept.

Thanks once again for the help and excellent work you are doing.
chapa
 
Posts: 3
Joined: Wed Jan 09, 2019 12:05 pm


Return to madExcept

Who is online

Users browsing this forum: No registered users and 5 guests