Page 1 of 1

Restart Behaviour

PostPosted: Wed Jan 09, 2019 12:15 pm
by chapa
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!

Re: Restart Behaviour

PostPosted: Thu Jan 10, 2019 11:38 am
by madshi
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.

Re: Restart Behaviour

PostPosted: Thu Jan 10, 2019 12:48 pm
by chapa
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.

Re: Restart Behaviour

PostPosted: Thu Jan 10, 2019 1:15 pm
by madshi
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?

Re: Restart Behaviour

PostPosted: Thu Jan 10, 2019 1:30 pm
by chapa
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.