IE crash with message "A problem caused the program to stop"

Ranorex Studio, Spy, Recorder, and Driver.
lila
Posts: 21
Joined: Wed Jun 18, 2014 10:17 am

IE crash with message "A problem caused the program to stop"

Post by lila » Mon Dec 05, 2016 7:16 am

Hi all,

Mine is automation suite which runs on IE browser. I have a function to terminate my browser for which I have used the below code
// 

public void terminateBrowser(string browsername)
		{
			try
			{
				Process[] pname = Process.GetProcessesByName("iexplore");
				
				do
				{
					Host.Local.KillBrowser(browsername);
					
					Delay.Milliseconds(5000);
				
					pname = Process.GetProcessesByName("iexplore");

				}while(pname.Length!=0);
				

			}
			
			catch(Exception e)
			{
				Logger.Instance.ErrorLog("Problem in executing terminateBrowser method because of " + e.ToString());
			}
		}
But the real problem i am facing is that at some random point during the execution of above method I get an error message "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."
Is there anyway to get rid of this issue? Help would be really appreciated.
Thanks

zivshapirawork
Posts: 65
Joined: Wed Sep 24, 2014 7:47 am
Location: Israel

Re: IE crash with message "A problem caused the program to stop"

Post by zivshapirawork » Thu Jan 05, 2017 8:20 am

Hi Lila

1. it is better to use the Ranorex Close application action for graceful termination
2. if you actually want to kill the process, then maybe this helps (for server) https://www.raymond.cc/blog/disable-pro ... rver-2008/


Last bumped by lila on Thu Jan 05, 2017 8:20 am.