Ranorex Constraint With Visual Studio 2017

Ask general questions here.
Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Ranorex Constraint With Visual Studio 2017

Post by Hondo » Wed Jun 06, 2018 1:59 am

This issue was brought up on another thread here https://www.ranorex.com/forum/ranorex-s ... dio#p48802
But in context with Windows 10.

I too have experienced extreme performance problems with Ranorex 8.1.1 on Windows 10 w/ Visual Studio 2017.

Yesterday had cause to uninstall VS2017 from my Win10 Desktop and decided to use the opportunity for a performance test of Ranorex.

1. Uninstalled both VS2017 and Ranorex 8.1.1
Cleared the slate. Started over.

2. Re-Installed Ranorex 8.1.1
Then tested. Performance was GREAT. Ahhhh, much better.
Visual C++ 2015 existed as an installed component (in Programs & Features)

3. Re-installed VS2017
Ranorex 8.1.1 immediately went back to sluggish, crappy performance.
Visual C++ 2015 was removed and supplanted with Visual C++ 2017.

4. Un-installed Ranorex 8.1.1 and then Re-Installed
Got these messages from the Ranorex installer.
ins1.PNG
Clicked the Install button which advanced to...
ins1.PNG (7.5 KiB) Viewed 526 times
ins2.PNG
So Visual C++ 2014 didn't install and it rolled to Visual C++ 2015.. Fine that's what I was trying to get installed again.
Clicked the Install button and advanced to..
ins2.PNG (27.28 KiB) Viewed 526 times
ins3.PNG
Install failed because the Visual C++ 2015 has been superseded by Visual C++ 2017. => They don't live together on Windows 10.
ins3.PNG (27 KiB) Viewed 526 times
Now, can still run Ranorex 8.1.1 but the performance is sluggish and crappy. :x

Is there a way to tell Ranorex to use the assemblies in Visual C++ 2017?
Because it appears it's either using them indirectly or rolling back to a much earlier version.

Hope to hear from you soon.
Thanks.

ahoisl
Certified Professional
Certified Professional
Posts: 125
Joined: Fri Sep 07, 2007 8:16 am

Re: Ranorex Constraint With Visual Studio 2017

Post by ahoisl » Wed Jun 06, 2018 8:33 am

Hondo wrote:I too have experienced extreme performance problems with Ranorex 8.1.1 on Windows 10 w/ Visual Studio 2017.
Can you please elaborate a bit more what kind of performance impact you're experiencing? E.g. while automating, tracking, recording, creating repository items, working with the code editor in Studio, ...

We also use Visual Studio 2017 (together with other VS versions installed in parallel), but don't experience any issues. Additionally, the Ranorex setup does not (and should not) trigger the C++ 14 Redistributable installation when starting on a machine with VS 2017 installed.

Are you sure that you are on the latest VS 2017 version? We use V15.7.3 internally.

Regards,
Alex
Ranorex Team

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Ranorex Constraint With Visual Studio 2017

Post by Hondo » Wed Jun 06, 2018 5:35 pm

ahoisl wrote:
Hondo wrote:I too have experienced extreme performance problems with Ranorex 8.1.1 on Windows 10 w/ Visual Studio 2017.
Can you please elaborate a bit more what kind of performance impact you're experiencing? E.g. while automating, tracking, recording, creating repository items, working with the code editor in Studio, ...
All of the above plus more.
Add loading a script
execution of the script
Object location during script execution
Creating & Editing repository items can be painfully slow. Oh the pain...
Renaming a module in the Module Browser.

ahoisl wrote: We also use Visual Studio 2017 (together with other VS versions installed in parallel), but don't experience any issues. Additionally, the Ranorex setup does not (and should not) trigger the C++ 14 Redistributable installation when starting on a machine with VS 2017 installed.

Are you sure that you are on the latest VS 2017 version? We use V15.7.3 internally.

Regards,
Alex
Ranorex Team
Yes. v15.7.3 updated thru the Visual Studio installer. All the latest greatest as of yesterday.
ins4.PNG
ins4.PNG (13.81 KiB) Viewed 501 times
Obviously the C++ 2014 install got triggered on my system. Sort of..
Tripped it, skipped it and flipped it to 2015 then blew chunks because 2017 was installed.

Here's the list of C++ redistributables installed on my system.
ins5.PNG
ins5.PNG (27.86 KiB) Viewed 501 times
When it was just C++ 2015, Ranorex was very happy.
It appears Ranorex needs to get to know C++ 2017.

Just launched Ranorex and notices there's a 8.1.2 update.
Did you fix it?

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Ranorex Constraint With Visual Studio 2017

Post by Hondo » Wed Jun 06, 2018 5:50 pm

Just ran the 8.1.2 installer => went thru the same C++ 2014 > C++ 2015 fail due to C++ 2017 kerfuffle.

Any other solutions?
Do you know of a way to force the install of C++ 2015?

ahoisl
Certified Professional
Certified Professional
Posts: 125
Joined: Fri Sep 07, 2007 8:16 am

Re: Ranorex Constraint With Visual Studio 2017

Post by ahoisl » Wed Jun 06, 2018 10:37 pm

Hondo wrote:Any other solutions?
Do you know of a way to force the install of C++ 2015?
You can try to uninstall the C++ 2017 redistributables (both x86 and x64) and then run the Ranorex setup again to install the C++ 2015 variant. If you need to revert afterwards, you can simply run the Visual Studio setup again (just tested that on my machine).

Theoretically, it does not matter if you use C++ 2015 or 2017, they should be backwards compatible (same major version number). So both Ranorex and Visual Studio should work with either of them.
Hondo wrote:Just launched Ranorex and notices there's a 8.1.2 update.
Did you fix it?
No, sorry, we did not. Before fixing the problem, we need to reproduce it first...

Regards,
Alex
Ranorex Team

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Ranorex Constraint With Visual Studio 2017

Post by Hondo » Wed Jun 06, 2018 10:55 pm

Does your VS 2017 supplant C++ 2015 with C++ 2017?
You end up with just C++ 2017 on your system?

ahoisl
Certified Professional
Certified Professional
Posts: 125
Joined: Fri Sep 07, 2007 8:16 am

Re: Ranorex Constraint With Visual Studio 2017

Post by ahoisl » Thu Jun 07, 2018 7:44 am

Hondo wrote:Does your VS 2017 supplant C++ 2015 with C++ 2017?
You end up with just C++ 2017 on your system?
Yes. And we now tried to reproduce your problem both on Windows 7 and 10, but on both systems the Ranorex setup does not complain about the C++ redists already being installed (it just skips the setup) and we did not realize and performance degradation.

Have you tried removing the C++ 2017 redist and install the one from the Ranorex setup instead?
We just want to make sure that this is really the problem and not something else from the Visual Studio setup.

Regards,
Alex
Ranorex Team

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Ranorex Constraint With Visual Studio 2017

Post by Hondo » Thu Jun 07, 2018 5:49 pm

ahoisl wrote:Yes. And we now tried to reproduce your problem both on Windows 7 and 10, but on both systems the Ranorex setup does not complain about the C++ redists already being installed (it just skips the setup) and we did not realize and performance degradation.

Have you tried removing the C++ 2017 redist and install the one from the Ranorex setup instead?
We just want to make sure that this is really the problem and not something else from the Visual Studio setup.

Regards,
Alex
Ranorex Team
Yea. sadly no love.

ahoisl
Certified Professional
Certified Professional
Posts: 125
Joined: Fri Sep 07, 2007 8:16 am

Re: Ranorex Constraint With Visual Studio 2017

Post by ahoisl » Thu Jun 07, 2018 9:25 pm

Hondo wrote:Yea. sadly no love.
What does this mean?
Were you able to install the C++ 2015 Redists? And did that help with performance?

As we cannot reproduce the issue right now, answering those questions will help us to narrow down the cause. Thank you!

Regards,
Alex
Ranorex Team

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Ranorex Constraint With Visual Studio 2017

Post by Hondo » Thu Jun 21, 2018 6:23 pm

Getting back to this..

Our products have evolved to using Visual Studio 2017, .NET 4.7.1 and MS C++ 2017

If I uninstall .NET 4.7.1 and MS C++ 2017.. YES I can install the Ranorex preReq version of C++ 2015 and Ranorex performance increases / returns to normal (on my Win10 desktop).
Otherwise, C++ 2015 will NOT install in the presence of C++ 2017

I have installed C++ 2015.3 using the Visual Studio Installer along with C++ 2017, but that didn't help Ranorex performance.

I'm literally in a pickle between a dev setup and a Ranorex setup to keep Ranorex performance normal.
Under the dev setup Ranorex performance is bad (details as outlined above).

Saying it doesn't happen on your system isn't helping us.
Please understand that this problem is making us consider other tools.

ahoisl
Certified Professional
Certified Professional
Posts: 125
Joined: Fri Sep 07, 2007 8:16 am

Re: Ranorex Constraint With Visual Studio 2017

Post by ahoisl » Thu Jun 21, 2018 9:27 pm

Hondo wrote:Under the dev setup Ranorex performance is bad (details as outlined above).
Is this true for every dev machine you run Ranorex on or just a single one?
Hondo wrote:Saying it doesn't happen on your system isn't helping us.
Believe me, I'm not trying to downplay the issue - I'm trying to analyze it. And as we cannot reproduce it with the same setup and we haven't heard about such a problem from anyone else before, I have to guess for causes and solutions :?

Do you get any warning messages, technology limitations or other error popups when using Ranorex?
Are there any suspicious error messages in the Windows Event Viewer?
Can you provide us with Ranorex log files of Studio or Spy after you experience the issue? (You can find the log files under "%userprofile%\documents\Ranorex\Logs".)

If you cannot provide the log files e.g. for policy reasons, you can also contact Ranorex support and arrange a web session to replicate and try to fix the problem. This is probably a more interactive and quicker alternative than writing back and forth in the forum - just make sure to mention this thread and that you already were in contact with me :D

Regards,
Alex
Ranorex Team

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Ranorex Constraint With Visual Studio 2017

Post by Hondo » Fri Jun 22, 2018 1:14 am

ahoisl wrote:Is this true for every dev machine you run Ranorex on or just a single one?
Only have a 2 seat floating license. Used almost exclusively by two systems.
Win10 Dev Desktop
Win7 Workstation
ahoisl wrote:Do you get any warning messages, technology limitations or other error popups when using Ranorex?
No.
ahoisl wrote:Are there any suspicious error messages in the Windows Event Viewer?
No.
ahoisl wrote:Can you provide us with Ranorex log files of Studio or Spy after you experience the issue? (You can find the log files under "%userprofile%\documents\Ranorex\Logs".)
You mean like these!? :shock:

2018-06-21 15:55:59.042|ERROR|Ranorex.Plugin.FirefoxWebFlavor|Failed to create Firefox DOMs: System.Runtime.Remoting.RemotingException: Failed to connect to an IPC Port: The system cannot find the file specified.

Server stack trace:
at System.Runtime.Remoting.Channels.Ipc.IpcPort.Connect(String portName, Boolean secure, TokenImpersonationLevel impersonationLevel, Int32 timeout)
at System.Runtime.Remoting.Channels.Ipc.ConnectionCache.GetConnection(String portName, Boolean secure, TokenImpersonationLevel level, Int32 timeout)
at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Ranorex.Core.IpcRemotingService.IPingable.Ping()
at Ranorex.Core.IpcRemotingService.GetClientInterface(String serverChannelName, String implTypeName, Boolean global, Type type)
at Ranorex.Core.IpcRemotingService.GetClientInterface[T](String serverChannelName, String implTypeName, Boolean global)
at Ranorex.Plugin.FirefoxIpc.FirefoxDom.GetFirefoxClientInterface(Int32 processId)
at Ranorex.Plugin.FirefoxDomManager.GetFirefoxClientInterface(Int32 processId)
at Ranorex.Plugin.FirefoxWebFlavor.CreateFirefoxDoms(IntPtr hwnd, IList`1 flavorElements)

What's up with the Plugin.FireFoxWebFlavor? Is it trying to phone home? What is it doing?
I'm in WPF land. We don't need no FireFox stuff.

2018-06-21 16:22:26.113|ERROR|Ranorex.Studio|SharpSvn.SvnWorkingCopyPathNotFoundException: The node 'C:\SVN\Automation\Ranorex8\release_0.2.5\tempTempTest' was not found.
at SharpSvn.SvnClientArgs.HandleResult(SvnClientContext client, SvnException error, Object targets)
at SharpSvn.SvnClientArgs.HandleResult(SvnClientContext client, svn_error_t* error, Object targets)
at SharpSvn.SvnClient.Status(String path, SvnStatusArgs args, EventHandler`1 statusHandler)
at ICSharpCode.Svn.SvnClientWrapper.SingleStatus(String filename, Boolean useCachedData)


We do use SVN, but the Automation scripts are being managed outside of Ranorex Studio (not using the built in Source Control feature).
"The node" it can't find does in fact exist.

I found many instances of these errors in the RanorexStudio.log
ahoisl wrote:This is probably a more interactive and quicker alternative than writing back and forth in the forum..
I really prefer the Forum so that it might help someone else down the road. It's infuriating to me when I find a post that applies to my exact situation only to discover you guys took it off line and didn't follow up posting the solution.

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Ranorex Constraint With Visual Studio 2017

Post by Hondo » Fri Jun 22, 2018 6:45 pm

Major Hang this morning from Ranorex. It got stuck in a bad loop trying to display the error.. I clicked the 'Send Report' button.
Had to use TaskManager to close Ranorex.

The program RanorexStudio.exe version 8.1.2.0 stopped interacting with Windows and was closed. To see if more information about the problem is available, check the problem history in the Security and Maintenance control panel.
Process ID: 3b20
Start Time: 01d409ae059889ba
Termination Time: 4294967295
Application Path: C:\Program Files (x86)\Ranorex 8.1\Bin\RanorexStudio.exe
Report Id: 4c4c899e-acaa-4431-8642-1567b40dbec6
Faulting package full name:
Faulting package-relative application ID:

<><><>
I'm gonna role back to the Ranorex config without all the latest VS 2017 stuff.

ahoisl
Certified Professional
Certified Professional
Posts: 125
Joined: Fri Sep 07, 2007 8:16 am

Re: Ranorex Constraint With Visual Studio 2017

Post by ahoisl » Sun Jun 24, 2018 9:24 pm

Hondo wrote:I really prefer the Forum so that it might help someone else down the road. It's infuriating to me when I find a post that applies to my exact situation only to discover you guys took it off line and didn't follow up posting the solution.
As you prefer, I also like the forum more, but that means it might take a day in between answers due to our (apparent) time difference. I would definitely update this thread even we found a solution "offline"...
Hondo wrote:What's up with the Plugin.FireFoxWebFlavor? Is it trying to phone home? What is it doing?
I'm in WPF land. We don't need no FireFox stuff.
No, the FireFoxWebFlavor does not try to phone home, IPC channels are limited to local communication only :D
That error means that you probably have Firefox open, but do not have the Ranorex Firefox extension installed that is required to automate (and communicate with) Firefox. Either close Firefox, install the Ranorex Firefox extension, or add "firefox" to the "Black-listed process names" setting of the Win32 plugin to get rid of that error message.
Capture.PNG
Capture.PNG (8.86 KiB) Viewed 385 times
Hondo wrote:We do use SVN, but the Automation scripts are being managed outside of Ranorex Studio (not using the built in Source Control feature).
"The node" it can't find does in fact exist.
This could actually cause a performance degradation when working withing Ranorex Studio, but usually not for automation. You could try to completely disable the RanorexStudio source control support by deleting following folder:
"<Ranorex Install Folder>\Addins\SourcControl"

And now let's dig into the issue a little bit more by trying to get as much information as possible (we would usually do this one by one in a remote session):
  • Do you have any Anti-Virus program running? Please, try to (completely) disable that
  • Could you produce and send us two snapshots of your AUT, one when automation is performing slowly (with VS 2017 installed) and one when it's working alright?
  • Can you try to disable some Ranorex plugins and see which plugin actually causes the issue? If you can reproduce the issue with Ranorex Spy, disabling a plugin is easy: open Spy -> click the Ranorex Studio icon in the upper right corner -> right click a plugin in the list of plugins and choose "Disable temporarily". After that click on the "Browse endpoint" button in Spy's element tree to make sure that plugins are refreshed and try if that makes a performance impact
  • The problem could also be caused by interaction with some process that is not the AUT. Either try closing all open applications (except for the AUT and Ranorex) when automating or download the Ranorex 8.2 beta1 which adds a process whitelisting feature allowing you to select the processes Ranorex should interact with
Hondo wrote:Major Hang this morning from Ranorex. It got stuck in a bad loop trying to display the error.. I clicked the 'Send Report' button.
I had a look at that bug report, an "Invalid Window Handle" exception stemming directly from the WPF code. I can only imagine this to be connected to the other weird issue, both having to do with C++ interaction...

One thing to add: We will try to get rid of the Visual C++ setups with Ranorex 8.3 and include the required C++ DLLs directly into the Ranorex setup. Not sure if that will make a difference for your problem, but if you want to try out that change as soon as we implemented it, make sure to join our Beta program:
https://www.ranorex.com/beta-program/

I hope we get a little bit further with your answers to my question. Thank you for your cooperation!

Regards,
Alex
Ranorex Team

Hondo
Posts: 43
Joined: Thu Nov 03, 2016 12:03 am

Re: Ranorex Constraint With Visual Studio 2017

Post by Hondo » Mon Jun 25, 2018 7:45 pm

ahoisl wrote:Either close Firefox, install the Ranorex Firefox extension, or add "firefox" to the "Black-listed process names" setting of the Win32 plugin to get rid of that error message.
See how your are? Force me into stuff I don't use or care about.
K', you win.

Opted for installing the Extension. Done.
Dragged the .xpi file into firefox.. seemed to install OK.
ahoisl wrote:This could actually cause a performance degradation when working withing Ranorex Studio, but usually not for automation. You could try to completely disable the RanorexStudio source control support by deleting following folder:
"<Ranorex Install Folder>\Addins\SourcControl"
Deleted the entire SourceControl folder as recommended. Done.

* Anti-Virus => Yes. But has both Visual Studio and Ranorex white-listed. Is managed by IT.
* AUT snapshot => No! Can't send you one.
* Disable Ranorex Plugins => I will try. Note that running the Spy by launching it from Ranorex Studio seems to be one of the performance pinch points. Have much better luck launching it from the desktop icon "Run As Administrator". Yes, always launch Ranorex Studio "Run As Administrator" too.
* Close all other Apps. => Tried that already. All the evidence implicates the .NET 4.7.1 and C++ 2017 stuff.
ahoisl wrote:make sure to join our Beta program:
Hmmm.. Maybe.

I have to roll forward to .NET 4.7.1 and C++ 2017 again and do a new build.
Will let you know if any of the changes already made have had an impact.

Thanks!