Win32Exception When running tests

Class library usage, coding and language questions.
annavamsi
Posts: 18
Joined: Wed Sep 14, 2016 10:55 pm

Win32Exception When running tests

Post by annavamsi » Wed Sep 14, 2016 11:05 pm

Hi,

while running our ranorex tests we are getting an exception which is being thrown from the application under test but the same thing is not happening when i do it manually.
The machine has 16GB RAM.

Type : System.ComponentModel.Win32Exception, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The parameter is incorrect
Context Messages:
Unhandled exception caught in process .......
Data: :
Source : WindowsBase
NativeErrorCode: 87
ErrorCode : -2147467259
TargetSite : Int32 GetWindowText(System.Runtime.InteropServices.HandleRef, System.Text.StringBuilder, Int32)
Stack Trace : at MS.Win32.UnsafeNativeMethods.GetWindowText(HandleRef hWnd, StringBuilder lpString, Int32 nMaxCount)
at System.Windows.Automation.Peers.WindowAutomationPeer.GetNameCore()
at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
at System.Windows.ContextLayoutManager.fireAutomationEvents()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Regards,
Vamsi

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Win32Exception When running tests

Post by krstcs » Thu Sep 15, 2016 1:34 pm

First, please always include the following when raising in issue on the forums:

Full Ranorex version (current supported versions are 6.1.0 or 6.0.2)
Windows version
Technology of AUT (Web, Java, .NET, WPF, Flash/Flex, etc.)


Second, there isn't anything specifically Ranorex related in that stack trace, just a couple of references to MS Windows Automation Peers object. This could be a case where your AUT has a bug that is only brought forward when Ranorex is manipulating the UI. Do you get the same thing when you use Ranorex Spy on your AUT? Have you tried Microsoft's Spy tool?
Shortcuts usually aren't...

annavamsi
Posts: 18
Joined: Wed Sep 14, 2016 10:55 pm

Re: Win32Exception When running tests

Post by annavamsi » Thu Sep 15, 2016 4:31 pm

Ranorex Version 5.4.4
AUT: WPF and WCF

I dont get the issue when i use Ranorex Spy only when i run the tests i am facing this issue.

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

Re: Win32Exception When running tests

Post by Support Team » Mon Sep 19, 2016 1:00 pm

Hi Vamsi,

Thank you for reporting this issue. Unfortunately, Ranorex 5.x is not supported anymore and we have already released Ranorex 6.0.2 and Ranorex 6.1.

Please update Ranorex to one of these versions and check if the problem still occurs.

Thank you for your understanding.

Regards,
Markus (S)
.
Image

annavamsi
Posts: 18
Joined: Wed Sep 14, 2016 10:55 pm

Re: Win32Exception When running tests

Post by annavamsi » Wed Oct 26, 2016 10:00 pm

As suggested i have tried with both ranorex 6.0.1 and 6.1 I continue to get the exception.

Note that it not only happens when i run the tests but also when i use spy.

Regards,
Vamsi

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3908
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Win32Exception When running tests

Post by odklizec » Thu Oct 27, 2016 7:29 am

Hi,

What version of Windows do you use? Have you tried to reinstall .Net libs? What version of .Net do you use anyway?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

annavamsi
Posts: 18
Joined: Wed Sep 14, 2016 10:55 pm

Re: Win32Exception When running tests

Post by annavamsi » Fri Jan 20, 2017 6:52 am

Windows 10
.NET 4.5

Sorry for the delay in reply.

Regards,
Vamsi

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

Re: Win32Exception When running tests

Post by Support Team » Tue Jan 24, 2017 7:50 am

Hi Vamsi,
Thank you for the additional information.
I'm afraid we need to analyze this problem directly within our controlled environment. Please do let me know if you could send us your application under test.

Thank you in advance.

Regards,
Markus (S)
.
Image