We have faced an issue with Ranorex.ExcelWorkSheet() function that crashes if used in testing scenario that is executed on Windows 2003 box (English locale, x64 bit), with Office 2010 (English, x86 bit).
The following FatalExecutionEngineError is thrown:
We are using the latest version of Ranorex (3.3.4).The runtime has encountered a fatal error. The address of the error was at 0x7934e109, on thread 0x3b0. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
The following script may be used to reproduce an issue:
Code: Select all
public bool TestCase()
{
bool result = true;
string pathToFile = "C:\\workbook_with_rm_formula.xls";
Process.Start(pathToFile);
//Initializing excel workSheet
Ranorex.ExcelWorkSheet sheet = new Ranorex.ExcelWorkSheet("/form[@processname='EXCEL']/element[@class='XLDESK']/workbook/table[@name='model1']");
//Initializing excel cell
Cell excelCell = sheet.FindSingle<Cell>(".//cell[@address='I18']");
excelCell.Click();
//Verify value in cell
if (excelCell.Text != "120")
{
result = false;
}
try
{
Process[] excelProcess = Process.GetProcessesByName("excel");
foreach (Process excelProc in excelProcess)
{
excelProc.Kill();
}
}
catch { logger.Warn("Excell process was not killed"); }
return result;
}
Could you please check and let me know if we are doing anything wrong here?
Thank you in advance.
Note: This issue is not reproducible on very similar box: Windows 2003 box (English locale, x64 bit), with Office 2007 (English, x86 bit)
Everything works fine on set of Windows 7 / Windows 2008 / Windows XP machines. Windows 2003 with Office 2010 is the only one affected.