Page 1 of 1

It seems there is some issue with TryfindSingle() function

Posted: Thu Sep 11, 2014 3:49 am
by oliverhu
My automation program TVSUAuto.exe stop working with try to find one button intermittently.Once it happens, I can find "Application Error" and ".net framework error" in windows event viewer.Can someone help me figure out what's the problem.

---------------------------------------Application Error--------------------------------------------------------------------
Application: TVSUAuto.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code e0434352, exception address 000007F9FBF189CC
Stack:
at <Module>.SendMessageTimeoutW(HWND__*, UInt32, UInt64, Int64, UInt32, UInt32, UInt64*)
at <Module>.SendMessageTimeoutW(HWND__*, UInt32, UInt64, Int64, UInt32, UInt32, UInt64*)
at Ranorex.Plugin.WpfWindowFlavorElement.EnsureNotBlocking()
at Ranorex.Plugin.WpfFlavorElement.get_UiElement()
at Ranorex.Plugin.WpfFlavorElement.get_ElementRectangle()
at Ranorex.Plugin.WinApp.WinAppEdgeFlavorElement.CalculateName()
at Ranorex.Plugin.WinApp.WinAppEdgeFlavorElement..ctor(System.Windows.Automation.AutomationElement, Ranorex.Plugin.Win32FlavorElement)
at Ranorex.Plugin.WinApp.WinAppEdgeFlavorElement.Create(System.Windows.Automation.AutomationElement, Ranorex.Plugin.Win32FlavorElement, System.String, Ranorex.Plugin.WinApp.ImmersiveWindowFlavorElement ByRef)
at Ranorex.Plugin.WinApp.WinAppFlavorElement.Create(Ranorex.Plugin.Win32FlavorElement, IntPtr, System.String, Ranorex.Plugin.WinApp.ImmersiveWindowFlavorElement ByRef)
at Ranorex.Plugin.WpfFlavorElement.FromWin32FlavorElement(Ranorex.Plugin.Win32FlavorElement, Ranorex.Plugin.WpfWindowFlavorElement ByRef)
at Ranorex.Plugin.WpfFlavorElement.GetReplacement(Ranorex.Core.Element, Ranorex.Plugin.WpfFlavorElement ByRef)
at Ranorex.Plugin.WpfWindowRule.ExecuteWpf(Ranorex.Core.GlueRuleExecutionState)
at Ranorex.Core.ElementEngine.ApplyGlueRules(Ranorex.Core.Element, Ranorex.Core.GlueRuleExecutionState)
at Ranorex.Core.ElementEngine.ApplyGlueRules(Ranorex.Core.Element, Ranorex.Core.GlueRuleExecutionState)
at Ranorex.Core.ElementEngine.ApplyGlueRules(Ranorex.Core.Element)
at Ranorex.Core.Element.GetChildren(Ranorex.Core.CacheSession)
at Ranorex.Core.RxPath.collectAxis(Ranorex.Core.Path.LocationStep, Ranorex.Core.Path.Axis, Ranorex.Core.Element, System.Collections.Generic.IList`1<Ranorex.Core.Element>, Boolean)
at Ranorex.Core.RxPath.ApplyInternal(Ranorex.Core.RxPath, Ranorex.Core.Element, Ranorex.Duration, Boolean)
at Ranorex.Core.Element.TryFindInternal(Ranorex.Core.RxPath, Ranorex.Duration, Boolean, System.Collections.Generic.IList`1<Ranorex.Core.Element> ByRef)
at Ranorex.Core.Element.TryFindSingleInternal(Ranorex.Core.RxPath, Ranorex.Duration, Ranorex.Core.Element ByRef)
at Ranorex.Core.Element.TryFindSingle(Ranorex.Core.RxPath, Ranorex.Duration, Ranorex.Core.Element ByRef)
at Ranorex.Adapter.TryFindSingle[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](Ranorex.Core.RxPath, Ranorex.Duration, System.__Canon ByRef)
at TVSUAuto.TestSteps.checkInstall(TVSUAuto.PackageCombo)
at TVSUAuto.Recording1.beginTest(TVSUAuto.PackageCombo)
at TVSUAuto.Recording1.Init()
at TVSUAuto.Recording1.Ranorex.Core.Testing.ITestModule.Run()
at Ranorex.Core.Testing.TestSuiteModule.RunInternal(Ranorex.Core.Data.DataContext)
at Ranorex.Core.Testing.TestSuiteModule.RunWithRepeats(Ranorex.Core.Data.DataContext, Ranorex.Core.Testing.ErrorBehavior)
at Ranorex.Core.Testing.TestSuiteModule.Run(Ranorex.Core.Data.DataContext, Boolean)
at Ranorex.Core.Testing.TestCase.RunChildren(System.Collections.Generic.IList`1<Ranorex.Core.Testing.TestSuiteEntry>, Ranorex.Core.Testing.TestResult, Boolean ByRef, Boolean ByRef)
at Ranorex.Core.Testing.TestCase.RunChildren(Ranorex.Core.Testing.TestResult, Boolean ByRef, Boolean)
at Ranorex.Core.Testing.TestCase.Run(Ranorex.Core.Data.DataContext, Boolean)
at Ranorex.Core.Testing.TestSuite.Run(System.String, System.String, System.Collections.Generic.Dictionary`2<System.String,System.String>)
at Ranorex.Core.Testing.TestSuiteRunner.RunInternal(System.Type, System.String, Ranorex.Core.Testing.RunParams)
at TVSUAuto.Program.Main(System.String[])
-----------------------------------------

Re: It seems there is some issue with TryfindSingle() function

Posted: Mon Sep 15, 2014 1:56 pm
by Support Team
Hi oliverhu,

Unfortunately I was not able to reproduce this error.
May I ask you to provide additional information? Therefore, please answer the questions below:
  • Which version of Ranorex are you currently using?
  • Is it possible to post the code which contains the TryFindSingle()-method?
  • Alternatively, can you create a sample in which this error occurs?
This will help us to analyze the issue in more detail on our side.

Regards,
Markus (S)