-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check for UIObject circles resulting in infinite loops #3516
Add check for UIObject circles resulting in infinite loops #3516
Conversation
@ejserna as FYI |
This looks like it might fix the link from child to immediate parent but not if there is a loop across say child and grandparent ? |
Yes, we can only circumvent direct parent/child relations, a loop across multiple items can't be found. The issue is that to allow any depth of items would require us to store all items previously visited and looking if the item was found. I tried that and even starting the app with that takes a long time as app startup already contains over a hundred items. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
ok. This seems like a reasonable fix for the immediate problem at hand. |
It seems that the changes broke the RS2/RS3 interaction tests entirely, though I am not sure what exactly the issue is. According to the logs, this is about passing null where it shouldn't be null. An example log can be downloaded here. |
I'm inclined to say that the test failure was CI related, not because of this PR. PR #3498 also encountered an issue with WUXC.dll crashing in release/x86. It's quite strange that both CI runs failed on release/86 with WUXC issues. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
I think the issue is that we prematurely break out of the for loop and as such, the down level, some elements can not be found. Updated the logic to only break when we encounter an item 10 times in a row. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Anything missing in this PR or can we merge this? |
Description
When the EventsSource property of an element is set to its parent, the test framework gets in an infnite loop returning the same element over and over again resulting in finding elements not terminating.
This PR adds a check if the last processed descendant is equal to the current descendant to detect whether we are in an infinite loop and break if that is the case.
Motivation and Context
Closes #3491
How Has This Been Tested?
Here is the test code:
C#
XAML
Interaction test
Screenshots (if appropriate):