Page 1 of 1

Popup Watchers causing NullReferenceExceptions

Posted: Wed Feb 15, 2017 2:35 pm
by krstcs
Ranorex 6.2.1
Windows 10 1607

I am getting the following debug message (and some warnings) if I have ANY popup watchers active. If I turn them off these disappear, and the warnings go away.

Code: Select all

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 Ranorex.Plugin.WpfRoleMap.GetRoleMapFor(Nullable`1 tbc) +0xc6 Ranorex.Plugin.WpfRoleMap.GetRole(TreeBuildConfiguration tbc,String[] typeLineage) +0x6 Ranorex.Plugin.WpfFlavorElement..ctor(WpfRemoteObject proxy,Win32FlavorElement containingElement,WpfFlavorElement apparentParent,IWpfElementStrategy strategy) +0x53 Ranorex.Plugin.WpfFlavorElement..ctor(WpfObjectAutomation remote,Win32FlavorElement containingElement,WpfFlavorElement apparentParent,IWpfElementStrategy strategy) +0x7 Ranorex.Plugin.WpfRootRule.AddWpfNative(GlueRuleExecutionState state) +0xc5 Ranorex.Plugin.WpfRootRule.Execute(GlueRuleExecutionState state) +0x35 Ranorex.Core.ElementEngine.ApplyGlueRules(Element element,GlueRuleExecutionStateImpl state) +0x5c 

Re: Popup Watchers causing NullReferenceExceptions

Posted: Thu Feb 16, 2017 10:03 am
by Support Team
Hi krstcs,

Unfortunately, there were no similar issues reported until now. Furthermore, we aren't able to reproduce the mentioned behavior while running pop-up watchers against demo WPF applications. I guess you also tried to use the pop-up watcher for your WPF application? If yes, is the issue also reproducible with other (WPF) applications on your machine?

Looking forward to hearing from you.

Sincerely,
Robert

Re: Popup Watchers causing NullReferenceExceptions

Posted: Thu Feb 16, 2017 3:13 pm
by krstcs
My apologies, I should have said that I'm running against a Java application. There are no WPF applications open at the time of the test run, which is one of the reasons I found it interesting.

Re: Popup Watchers causing NullReferenceExceptions

Posted: Fri Feb 17, 2017 1:15 pm
by Support Team
Thanks for the additional info.

Unfortuantely, the issue does also not occur when running against a Java demo app on our machines. Any chance, that we get your AUT or that you could try to check if that also happens for other Java AUTs?

Sincerely,
Robert