Popup Watchers causing NullReferenceExceptions

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

Popup Watchers causing NullReferenceExceptions

Post by krstcs » Wed Feb 15, 2017 2:35 pm

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 
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12173
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Popup Watchers causing NullReferenceExceptions

Post by Support Team » Thu Feb 16, 2017 10:03 am

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

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

Re: Popup Watchers causing NullReferenceExceptions

Post by krstcs » Thu Feb 16, 2017 3:13 pm

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.
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12173
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Popup Watchers causing NullReferenceExceptions

Post by Support Team » Fri Feb 17, 2017 1:15 pm

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