Unhandeled Exception in 3.0.2 Spy

Ranorex Spy, Recorder, and Studio.
User avatar
odd
Posts: 17
Joined: Fri Mar 11, 2011 9:37 am

Unhandeled Exception in 3.0.2 Spy

Post by odd » Mon May 23, 2011 2:43 pm

Hello.

We are working on terminal server (windows server 2008 R2) with VS2010 + Ranorex.
Today i have updated ranorex from 3.0.1 to 3.0.2 and since than i can't find or highlight any objects with the Spy. It just don't do anything and show error window or crashes.

Installation performed by "Install to remote desktop" tool. There were no such problem before.

Error text:

Code: Select all

System.IO.FileNotFoundException: [Resource lookup failed - infinite recursion or critical failure detected.]
  System.Environment.GetResourceFromDefault(String key)+0xffffffff
  System.ObjectDisposedException..ctor(String objectName)+0x0
  System.Windows.Forms.Control.DestroyHandle()+0x8d
  System.Windows.Forms.Control.Dispose(Boolean disposing)+0xef
  System.Windows.Forms.Form.Dispose(Boolean disposing)+0x17e
  Ranorex.Controls.SpyForm.Dispose(Boolean disposing)+0x16
  System.ComponentModel.Component.Dispose()+0x0
  System.Windows.Forms.Form.WmClose(Message& m)+0x242
  System.Windows.Forms.Form.WndProc(Message& m)+0x1b5
  System.Windows.Forms.Control+ControlNativeWindow.OnMessage(Message& m)+0x0
  System.Windows.Forms.Control+ControlNativeWindow.WndProc(Message& m)+0x8e
  System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)+0x25

However, tests are working perfectly.
Last edited by odd on Tue May 24, 2011 7:49 am, edited 1 time in total.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Unhandeled Exception in 3.0.2 Spy

Post by Support Team » Mon May 23, 2011 5:52 pm

That's a very weird exception, it looks like the .NET Framework is not able to find its own language resources. The GetResourceFromDefault is a framework method that maps identifiers to language dependent strings.

Please, try to completely uninstall Ranorex and then install it anew.
If that does not help, please try to repair your .NET Framework installation, since it seems that something is broken there...

Regards,
Alex
Ranorex Team
.
Image

User avatar
odd
Posts: 17
Joined: Fri Mar 11, 2011 9:37 am

Re: Unhandeled Exception in 3.0.2 Spy

Post by odd » Tue May 24, 2011 8:59 am

Tried to reinstall net 4, 3.5, ranorex. Same result.

Gathered some additional information: The problem occurs only when our application is working (net 3.5 32 bit devexpress application).

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Unhandeled Exception in 3.0.2 Spy

Post by Support Team » Tue May 24, 2011 9:08 am

odd wrote:Tried to reinstall net 4, 3.5, ranorex. Same result.
Does this only happen on one machine or is this reproducible on other machines, too?
odd wrote:The problem occurs when our application is working (net 3.5 32 bit devexpress application).
So, if you just run Spy and track e.g. Windows Calculator the problem does not exist?
odd wrote:P.S. As i understand, using 64 bit spy with 32 bit application is nnot recommended, right? (some controls recognized differently)
In general, you can use both the x86 and x64 Spy versions with 32 bit applications, since the Ranorex Bit Bridge (unless disabled) will take care about that. Performance might be better if you use the Spy with the same bit width as your application (see this section in the Ranorex User Guide for more info).

Regards,
Alex
Ranorex Team
.
Image

User avatar
odd
Posts: 17
Joined: Fri Mar 11, 2011 9:37 am

Re: Unhandeled Exception in 3.0.2 Spy

Post by odd » Tue May 24, 2011 9:14 am

Support Team wrote:Does this only happen on one machine or is this reproducible on other machines, too?
Cannot reproduce on other machines since we have only one professional license and its on terminal server.
But, problem repeats with different users.
Support Team wrote:So, if you just run Spy and track e.g. Windows Calculator the problem does not exist?
Yes, works great with calculator.

User avatar
odd
Posts: 17
Joined: Fri Mar 11, 2011 9:37 am

Re: Unhandeled Exception in 3.0.2 Spy

Post by odd » Tue May 24, 2011 9:27 am

Tried with trial licence on other (non server) machine. Spy is working correctly.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Unhandeled Exception in 3.0.2 Spy

Post by Support Team » Tue May 24, 2011 9:31 am

odd wrote:Tried with trial licence on other (non server) machine. Spy is working correctly.
We tested Ranorex Spy on Windows 2008 R2, too. It looks like a problem with that specific machine. Do you have all prerequisites for Ranorex installed on the server?
http://www.ranorex.com/support/user-gui ... ments.html
odd wrote:Yes, works great with calculator.
So Ranorex Spy only crashes when you track your specific application? Could you provide us a sample application that we could reproduce the problem with?

Regards,
Alex
Ranorex Team
.
Image

User avatar
odd
Posts: 17
Joined: Fri Mar 11, 2011 9:37 am

Re: Unhandeled Exception in 3.0.2 Spy

Post by odd » Tue May 24, 2011 10:18 am

Support Team wrote:We tested Ranorex Spy on Windows 2008 R2, too. It looks like a problem with that specific machine. Do you have all prerequisites for Ranorex installed on the server?
Yes, all that needed is installed. Previous version of ranorex worked fine.
Support Team wrote:So Ranorex Spy only crashes when you track your specific application? Could you provide us a sample application that we could reproduce the problem with?
Yes, exacntly. On our application under test. I'm discussing this with my superior right now.

I think i found the source of problem. When i removed .net 4 (some extended version which is installed with VS2010) Spy start working without errors. The problem is when i removing .net 4 VS does not working.

User avatar
odd
Posts: 17
Joined: Fri Mar 11, 2011 9:37 am

Re: Unhandeled Exception in 3.0.2 Spy

Post by odd » Tue May 24, 2011 11:03 am

After falling back to 3.0.1 Spy doent throw error, but i cant close it (do not reacting on close button) and crashes whed viewing repository options (when our apllication is launched, of course). At least i can save repository, or make export.

We can send you sample application and\or give access to terminal server where problem occures.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Unhandeled Exception in 3.0.2 Spy

Post by Support Team » Tue May 24, 2011 2:36 pm

Hi odd,

A sample application would be great to reproduce the issue. You can send it to [email protected] . If the app is too big, please contact also [email protected] and we will send you the access data to our ftp server. Then you can upload the application.

Thanks in advance.

Regards,
Peter
Ranorex Team
.
Image

User avatar
odd
Posts: 17
Joined: Fri Mar 11, 2011 9:37 am

Re: Unhandeled Exception in 3.0.2 Spy

Post by odd » Wed May 25, 2011 10:30 am

Hi Peter.

I have uploaded sample app to your ftp, file "Client.zip".

So, conditions are:
- Ranorex 3.0.2;
- Windows Server 2008 R2 (not sure if it's relevant) ;
- .Net framework 3.5 & 4 (extended version from VS2010 preferable);
- Started sample application (not important if it not connected to DB or something);

Spy, opened in such environment should throw exception. If it's not, I may provide access to our terminal server where issue is present.

User avatar
odd
Posts: 17
Joined: Fri Mar 11, 2011 9:37 am

Re: Unhandeled Exception in 3.0.2 Spy

Post by odd » Wed May 25, 2011 10:54 am

I think I found solution.

Just turned off .Net 4 in Ranorex.Spy.x86.exe.config

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <!-- <supportedRuntime version="v4.0"/> -->
    <supportedRuntime version="v2.0.50727"/>
  </startup>
  <runtime>
    <enforceFIPSPolicy enabled="false"/>
  </runtime>
</configuration>
Spy works fine now.

DanielS
Posts: 29
Joined: Fri Apr 29, 2011 10:39 am

Re: Unhandeled Exception in 3.0.2 Spy

Post by DanielS » Mon May 30, 2011 12:57 pm

Since i used ranorex 3.0.2, i get this exception sometimes too. It occurres sometimes when starting Ranorex Studio while my AUT is still running. Unfortunately i'm not able to reproduce this error. I'm using win7 64 Bit, my AUT is in .Net 3.5 and anycpu ( so 64 bit on my system).

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Unhandeled Exception in 3.0.2 Spy

Post by Support Team » Mon Jul 04, 2011 9:33 am

Could you please update to Ranorex version 3.0.3? We tried to fix that issue with 3.0.3 and could not reproduce it any more on our machines.
http://www.ranorex.com/download.html

Regards,
Alex
Ranorex Team
.
Image