IE has stopped working...

Ask general questions here.
User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

IE has stopped working...

Post by giuseppe.lacagnina » Thu Sep 08, 2016 8:00 am

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!

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: IE has stopped working...

Post by krstcs » Thu Sep 08, 2016 2:02 pm

You could use the System.Diagnostics library to search running processes for Internet Explorer and kill the processes directly.
Shortcuts usually aren't...

User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

Re: IE has stopped working...

Post by giuseppe.lacagnina » Thu Sep 08, 2016 2:09 pm

Would that be different from what happens with the grace period?

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: IE has stopped working...

Post by krstcs » Thu Sep 08, 2016 2:46 pm

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.
Shortcuts usually aren't...

User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

Re: IE has stopped working...

Post by giuseppe.lacagnina » Thu Sep 08, 2016 2:48 pm

I will try, but the problem is that Ranorex does not seem to be able to deal with an application crash.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: IE has stopped working...

Post by odklizec » Thu Sep 08, 2016 3:06 pm

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

Re: IE has stopped working...

Post by giuseppe.lacagnina » Thu Sep 08, 2016 3:51 pm

Thanks!

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

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: IE has stopped working...

Post by Aracknid » Tue Sep 13, 2016 2:58 pm

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.

User avatar
giuseppe.lacagnina
Posts: 113
Joined: Fri Sep 18, 2015 10:25 am
Location: Brunn am Gebirge, Vienna, Austria

Re: IE has stopped working...

Post by giuseppe.lacagnina » Tue Sep 13, 2016 3:02 pm

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