Page 1 of 1

IE has stopped working...

Posted: Thu Sep 08, 2016 8:00 am
by giuseppe.lacagnina
Dear All,

I need some help on a problem regarding IE crashing. I run my tests at night, launching a long and complex Ranorex solution with HTML test cases running in IE 11. I work with Windows 7 and Ranorex 5.4.4 (I am still not allowed to update).

The problem is easily stated. Sometimes, I find that IE crashes and produces a message dialog saying "Internet Explorer has stopped working...". This alert is waiting for an answer from the user and makes everything hang and wait. So I come in the morning and I find that many of my test cases could not run.

All my test cases end with closing IE and give it a grace period after which they should simply kill the process. This works almost always: that is, it does not work when an error occurs which produces an alert such as the one that I described above.

Is there anything I can do? Thanks in advance!

Re: IE has stopped working...

Posted: Thu Sep 08, 2016 2:02 pm
by krstcs
You could use the System.Diagnostics library to search running processes for Internet Explorer and kill the processes directly.

Re: IE has stopped working...

Posted: Thu Sep 08, 2016 2:09 pm
by giuseppe.lacagnina
Would that be different from what happens with the grace period?

Re: IE has stopped working...

Posted: Thu Sep 08, 2016 2:46 pm
by krstcs
Since I don't know exactly how Ranorex's method works I can't answer that question. They may attempt the same thing after the grace period. But it's worth trying to just see if it helps.

Typically, if you don't care about gracefully shutting down the application, killing the process this way is the same as killing it from task manager. The process is just stopped. I've found this to be more consistent, even if it isn't as nice.

Re: IE has stopped working...

Posted: Thu Sep 08, 2016 2:48 pm
by giuseppe.lacagnina
I will try, but the problem is that Ranorex does not seem to be able to deal with an application crash.

Re: IE has stopped working...

Posted: Thu Sep 08, 2016 3:06 pm
by odklizec
Hi,

I've experienced problem like this in the past too. IE suddenly started throwing this silly error and I could not find any relevant info about it. What seems helped was increasing size of HDD (free space). It was a virtual HDD so it was relative easy to expand its size ;) Also, I've setup IE to delete cookies, history and temp files on IE exit. Either of this helped and I'm not receiving such error for a while.

Re: IE has stopped working...

Posted: Thu Sep 08, 2016 3:51 pm
by giuseppe.lacagnina
Thanks!

I will try something similar... I would say it makes sense!

Re: IE has stopped working...

Posted: Tue Sep 13, 2016 2:58 pm
by Aracknid
One idea for you to look into is what we did. I wrote a separate program (nothing to do with Ranorex) to monitor my running scripts. If the script takes more than X amount of time (for us we set it to 60 minutes), kill that process.

For this to work, when we start the script, we get the process ID associated with that script. We write this to a specific place in the registry. The other program is always running and checks this location every minute. If the same PID is there for more than X amount of time, it just kills that task.

We've got a bunch of our own tools we wrote wrapped around running our compiled Ranorex scripts, so this just works for us.

Another thing we used to do (but no longer do) was have another app running in the background that was written in AutoIT (a free automation tool). All this did was look for specific dialog types, and if found, handle them. For example, you can write code in AutoIT to look for an IE window that has the error message you specified, and if find it click a button in that dialog, or kill the IE task. AutoIT is very easy to learn and pick up for this sort of thing. It's not great for doing true automation like Ranorex does, but it definitely has it's uses.

Aracknid.

Re: IE has stopped working...

Posted: Tue Sep 13, 2016 3:02 pm
by giuseppe.lacagnina
Thanks, it is interesting and I will try something along these lines.
However, we are calling Ranorex from a proprietary application and therefore I will have to be able to achieve what you say from within our system. It is not yet clear whether this can be done, but I will try.

At any rate, it is good to know that it is not just sillyness on my side.

Thanks again!

Giuseppe