Ranorex crashing Visual Studio 2010

Bug reports.
jlowder
Posts: 55
Joined: Wed Dec 30, 2009 2:56 pm

Ranorex crashing Visual Studio 2010

Post by jlowder » Fri Nov 11, 2011 3:59 pm

I've imported Ranorex.core into my Visual Studio project.

I'm running into situations where debugging tests causes Visual Studio to restart. A very simple code selection that causes this is (using NUnit framework):

Code: Select all

[Test]
        public void DialogTest()
        {
            var myHelper = new HelperMethods();
            myHelper.CloseDialogs();

        }

Code: Select all

using Ranorex;

namespace NextGen.HelperClasses
{
    class HelperMethods
    {
        public void CloseDialogs()
        {
            var myGenericForm = Host.Local.FindSingle<Form>("/form[@active='True']");
        }
    }
}
The intent of the test was to find the currently active dialog and see how I could go about closing it. This isn't the only time Visual Studio restarts, but this one is very consistent. If I put a break point in the CloseDialogs method to see what the value of myGenericForm is and then start the test in Debug mode (I have ReSharper installed to do this) the code gets to my CloseDialogs method, waits a couple seconds and then restarts VisualStudio.

Is there a solution to this problem? We're close to purchasing and I don't want this to throw a wrench in things. I'm hoping there is just a config issue I need to deal with to correct this problem.

Thanks,

Jason

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

Re: Ranorex crashing Visual Studio 2010

Post by Support Team » Fri Nov 11, 2011 7:31 pm

jlowder wrote:Is there a solution to this problem?
We have not heard of such an issue before and we are ourselves using Visual Studio 2010 a lot, so that's kind of weird... Are you experiencing this restarts with Ranorex code only and only in combination with NUnit?

Could you please post following information:
  • Ranorex version
  • Visual Studio exact version number
  • NUnit version
  • do you experience that problem on a single machine only or on multiple machine?
Regards,
Alex
Ranorex Team
.
Image

jlowder
Posts: 55
Joined: Wed Dec 30, 2009 2:56 pm

Re: Ranorex crashing Visual Studio 2010

Post by jlowder » Fri Nov 11, 2011 9:22 pm

Yes, I'm only writing tests with Ranorex utilizing NUnit.

Ranorex version: Eval 3.1.1.14266, .Net Runtime Version 4.0.30319.239
Visual Studio: 10.0.30319.1
ReSharper: 6.0.2202.688 (eval)
NUnit: 2.5.10.11092 (from ReSharper install). This is the Nunit.framework.dll

Currently this is being run on an HP laptop, but I have a desktop on order that I want to switch to.

I'm running under Windows 7.

Also, this restarting behavior occurs if I press Alt-F5 to cancel the Debug Run while it's trying to execute the get form line.

Jason

jlowder
Posts: 55
Joined: Wed Dec 30, 2009 2:56 pm

Re: Ranorex crashing Visual Studio 2010

Post by jlowder » Mon Nov 14, 2011 6:49 pm

One other point - I guess the example was irrelevant. Any time I go into debug mode and attempt to stop debugging or lately even finish a debug run, Visual Studio restarts.

Jason

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

Re: Ranorex crashing Visual Studio 2010

Post by Support Team » Mon Nov 14, 2011 7:08 pm

Just to confirm:
Debugging non-Ranorex code works without causing Visual Studio to crash?
Does debugging Ranorex code without NUnit crash Visual Studio?
Does this only happen on one machine?

As mentioned before, we have not heard of such an issue before and we could not reproduce that problem either. However, we use Visual Studio 2010 SP1, since IMHO the RTM release was rather unstable. You might want to update to Visual Studio 2010 SP1.

Regards,
Alex
Ranorex Team
.
Image

jlowder
Posts: 55
Joined: Wed Dec 30, 2009 2:56 pm

Re: Ranorex crashing Visual Studio 2010

Post by jlowder » Tue Nov 15, 2011 4:40 pm

Hi Alex,

After doing some more research it looks like it may be Resharpers implementation of NUnit, or the way I have it configured. I've some similar complaints on other posts related to this, all referencing the same behavior.

If anything else comes up that points me back to Ranorex, I'll let you know.

Thanks,

Jason

jlowder
Posts: 55
Joined: Wed Dec 30, 2009 2:56 pm

Re: Ranorex crashing Visual Studio 2010

Post by jlowder » Tue Nov 15, 2011 4:59 pm

Alex,

In case this comes up again, the fix was to go into my project properties/Debug tab and uncheck "Enable unmanaged code debugging".

Thanks,

Jason