LineageGlueRule 'delphi_root_element' caused NullReferenceEx

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

LineageGlueRule 'delphi_root_element' caused NullReferenceEx

Post by odklizec » Thu Jul 12, 2018 7:18 am

Hi,

I noticed this error in our web-based test, which I never noticed before 8.2. It appears after WaitForDocumentLoaded invoke action. The test is started in IE11 and I'm sure that there are no Delphi apps involved in this test ;)
LineageGlueRule 'delphi_root_element' caused NullReferenceException on Execute. Object reference not set to an instance of an object.
Show/Hide Stacktrace
System.NullReferenceException: Object reference not set to an instance of an object. System.Collections.Generic.Dictionary`2.Insert(TKey key,TValue value,Boolean add) +0xfe System.Collections.Generic.Dictionary`2.set_Item(TKey key,TValue value) +0x0 Ranorex.Plugin.DelphiRootRule.GetProxy(GlueRuleExecutionState state) +0x110 Ranorex.Plugin.DelphiRootRule.Execute(GlueRuleExecutionState state) +0x74 Ranorex.Core.ElementEngine.ApplyGlueRules(Element element,GlueRuleExecutionStateImpl state,Boolean includeRemotes) +0x6a Called from: Ranorex.Core.ElementEngine.ApplyGlueRules(Element element,GlueRuleExecutionStateImpl state,Boolean includeRemotes) +0xc8 Ranorex.Core.ElementEngine.ApplyReplaceGlueRulesOnSingleRecentlyInsertedElement(Element parentElement,GlueRuleExecutionStateImpl state,GlueRuleExecutionStateImpl replaceState,Element recentlyInsertedElement) +0x45 Ranorex.Core.ElementEngine.ApplyReplaceGlueRulesOnRecentlyInserted(Element element,GlueRuleExecutionStateImpl state) +0x1f Ranorex.Core.ElementEngine.ApplyGlueRules(Element element,GlueRuleExecutionStateImpl state,Boolean includeRemotes) +0xfe Ranorex.Core.ElementEngine.ApplyGlueRules(Element element,Boolean includeRemotes) +0x17 Ranorex.Core.Element.GetChildren(CacheSession session) +0x54 Ranorex.Core.Element.get_Children() +0x7 Ranorex.Core.RxPath.collectAxis(LocationStep step,Axis optimizedAxis,Element self,IList`1 elements,Boolean quitOnFirstGoodNode) +0x47 Ranorex.Core.RxPath.ApplyInternal(RxPath path,Element startElement,Duration timeout,Boolean findSingle,CacheSession& usedCacheSession) +0x3d1 Ranorex.Core.RxPath.Apply(Element startElement,Duration timeout,Boolean findSingle,CacheSession& usedCacheSession) +0x6 Ranorex.Core.Element.TryFindInternal(RxPath path,Duration timeout,Boolean findSingle,IList`1& foundElements,CacheSession& usedCacheSession) +0x126 Ranorex.Core.Repository.RepoItemInfo.FindInternal(Boolean findSingle,Boolean throwException,Duration effectiveTimeoutOverride) +0x3e Ranorex.Core.Repository.RepoItemInfo+<>c__DisplayClass75_0`1.<Find>b__0() +0x0 Ranorex.Core.Testing.Services.NoMaintenanceModeService.HandleElementNotFound(Func`1 action,RepoItemInfo entry) +0x0 Ranorex.Core.Repository.RepoItemInfo.Find(Boolean findSingle,Boolean throwException,Duration effectiveTimeoutOverride) +0x33 Ranorex.Core.Repository.RepoItemInfo.CreateAdapter(Boolean throwException,Duration waitTimeout) +0x0 Ranorex.Core.Repository.RepoItemInfo.CreateAdapter(Boolean throwException) +0x0 OnDemandAut.OnDemandAutRepositoryFolders+DescartesDOMAppFolder.get_Self() c:\OnDemandTA\TestAutomation\OnDemandAut\OnDemandAutRepository.cs:line 681;21 OnDemandAut.CodeModules.Common.ReturnRefConfigurationFilePath(String customerID,String locationName,String actionFlag,String optionItem,Boolean saveNewRefFiles) c:\OnDemandTA\TestAutomation\OnDemandAut\CodeModules\Common.cs:line 1797;4 OnDemandAut.CodeModules.Common.SetCompareElementsWithCSV(RepoItemInfo repoElement,String locationName,String actionFlag,Boolean setElementFlag,String customerID,String optionItem) c:\OnDemandTA\TestAutomation\OnDemandAut\CodeModules\Common.cs:line 244;4 OnDemandAut.CodeModules.Common.CompareElementsWithRefCSV(RepoItemInfo curElementInfo,String locationName,String actionFlag,Boolean setElementFlag,String customerID) c:\OnDemandTA\TestAutomation\OnDemandAut\CodeModules\Common.cs:line 192;6 OnDemandAut.Recordings.Parameters_Validate.Ranorex.Core.Testing.ITestModule.Run() c:\OnDemandTA\TestAutomation\OnDemandAut\Recordings\Parameters_Validate.cs:line 125;13 Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext,Int32 iteration,Int32 iterationCount,Boolean skipIteration) +0x104 Ranorex.Core.Testing.TestModuleLeaf.RunWithRepeats(DataContext parentDataContext,ErrorBehavior errorBehavior) +0x21 Ranorex.Core.Testing.TestModuleLeaf.Run(DataContext parentDataContext,Boolean childSkip) +0x2f Ranorex.Core.Testing.ModuleGroupNode.Run(DataContext parentDataContext,Boolean childSkip,ModuleGroupLeaf runTargetLeaf) +0x2b2 Ranorex.Core.Testing.ModuleGroupLeaf.Run(DataContext parentDataContext,Boolean childSkip) +0x57 Ranorex.Core.Testing.TestCaseNode.RunChildren(IEnumerable`1 entries,TestResult overallResult,Boolean& childSkip,Boolean& tearDownPending) +0x2b Ranorex.Core.Testing.TestCaseNode.RunChildren(Boolean childSkip) +0x3f Ranorex.Core.Testing.TestCaseNode+<>c__DisplayClass86_0.<RunIteration>b__0(RetryInfo retry) +0x78 Ranorex.Core.Testing.Retry.DoRetry(Func`2 operationToRetry) +0x13 Ranorex.Core.Testing.Retry.Do(Func`2 operationToRetry) +0x10 Ranorex.Core.Testing.TestCaseNode.RunIteration(Boolean childSkip,ActivityExecType executeType,Int32 iteration,IDictionary`2 dataRowOrParams) +0x63 Ranorex.Core.Testing.TestCaseNode.RunWithIterations(Boolean childSkip,IterationExecType executeType) +0x8f Ranorex.Core.Testing.TestCaseNode.RunInternal(Boolean childSkip) +0x65 Ranorex.Core.Testing.TestCaseNode.Run(DataContext parentDataContext,Boolean childSkip) +0x0 Ranorex.Core.Testing.TestCaseNode.RunChildren(IEnumerable`1 entries,TestResult overallResult,Boolean& childSkip,Boolean& tearDownPending) +0x2b Ranorex.Core.Testing.TestCaseNode.RunChildren(Boolean childSkip) +0x3f Ranorex.Core.Testing.TestCaseNode+<>c__DisplayClass86_0.<RunIteration>b__0(RetryInfo retry) +0x78 Ranorex.Core.Testing.Retry.DoRetry(Func`2 operationToRetry) +0x13 Ranorex.Core.Testing.Retry.Do(Func`2 operationToRetry) +0x10 Ranorex.Core.Testing.TestCaseNode.RunIteration(Boolean childSkip,ActivityExecType executeType,Int32 iteration,IDictionary`2 dataRowOrParams) +0x63 Ranorex.Core.Testing.TestCaseNode.RunWithIterations(Boolean childSkip,IterationExecType executeType) +0x8f Ranorex.Core.Testing.TestCaseNode.RunInternal(Boolean childSkip) +0x65 Ranorex.Core.Testing.TestCaseNode.Run(DataContext parentDataContext,Boolean childSkip) +0x0 Ranorex.Core.Testing.TestSuite.Run(String runConfigName,String runLabel,Dictionary`2 parameters) +0x13f Ranorex.Core.Testing.TestSuiteRunner.TryRunTestSuite(RunParams rp,TestSuite testSuite) +0x128 Ranorex.Core.Testing.TestSuiteRunner+<>c__DisplayClass13_1.<RunInternal>b__5() +0x0 Ranorex.Common.Types.OptCombinators.UnwrapOrElse(Opt`1 self,Func`1 generator) +0x9 Ranorex.Core.Testing.TestSuiteRunner.RunInternal(Type containerType,String[] testSuiteXmls,RunParams[] rps) +0x6f0 Ranorex.Core.Testing.TestSuiteRunner.RunInternal(Type containerType,String[] testSuiteXmls,RunParams rp) +0x8 Ranorex.Core.Testing.TestSuiteRunner.RunInternal(Type containerType,String testSuiteXml,RunParams rp) +0x7 Ranorex.Core.Testing.TestSuiteRunner.Run(Type containerType,String cmdLineArgs,String testSuiteXml) +0x134 Ranorex.Core.Testing.TestSuiteRunner.Run(Type containerType,String cmdLineArgs) +0x0 OnDemandAut.Program.Main(String[] args) c:\OnDemandTA\TestAutomation\OnDemandAut\Program.cs:line 58;17 System.RuntimeMethodHandle.InvokeMethod(Object target,Object[] arguments,Signature sig,Boolean constructor) +0xffffffff System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,Object[] parameters,Object[] arguments) +0x16 System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object[] parameters,CultureInfo culture) +0x7a System.Reflection.MethodBase.Invoke(Object obj,Object[] parameters) +0x6 Ranorex.Core.Resolver.MainInvoker.Invoke(Assembly callerAssembly,String startUpObject,String[] args) +0x62 __RxMain.__RxProgram.Main(String[] args) c:\OnDemandTA\TestAutomation\OnDemandAut\obj\Debug\__RxPrograms.g.cs:line 19;13
PS: whitelisting IE process helped with this error! It seems the error appeared because of running FreeCommander (Delphi-based app) running in the background ;)
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

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

Re: LineageGlueRule 'delphi_root_element' caused NullReferenceEx

Post by Support Team » Wed Jul 18, 2018 11:35 am

Hi odklizec,

I was able to reproduce the issue/warning caused by FreeCommander. Our development could already provide a fix, which most likely will be delivered with our next upcoming release.

Thank you for your cooperation.

Sincerely,
Robert
.
Image