Skip to content
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

TabView: "Element is already the child of another element" thrown when a TabViewItem is switched to #1262

Closed
lukeblevins opened this issue Sep 2, 2019 · 5 comments
Labels
area-TreeView bug Something isn't working duplicate This issue or pull request already exists

Comments

@lukeblevins
Copy link
Contributor

Describe the bug
I migrated my project over to the WinUI version of TabView, but noticed that clicking a different TabViewItem will crash the app with the error: Element is already the child of another element. This bug occurs only when running with a debugger in Visual Studio.

Steps to reproduce the bug

  1. Create a project with a WinUI TabView
  2. Run Project with debugger
  3. Add Multiple TabViewItems to the control
  4. Click one of the unselected items

Expected behavior
Clicking an item should simply display its content. The crash and error is unexpected because it only occurs when running the app with a debugger.

Screenshots

image
image

Version Info

NuGet package version:
Microsoft.UI.Xaml 2.2.190830001

Windows 10 version Saw the problem?
Insider Build (18362.10015) Yes
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT

Additional context
The problematic lines of code may be related to line 222 of TabView.cpp

@jevansaks
Copy link
Member

Thanks for reporting! Do you have a repro app you can share?

@jevansaks jevansaks added area-TreeView bug Something isn't working labels Sep 2, 2019
@msft-github-bot msft-github-bot added the needs-assignee-attention Assignee needs to follow-up or investigate this issue label Sep 2, 2019
@lukeblevins
Copy link
Contributor Author

@jevansaks Unfortunately, I can't reproduce this weird bug in another project. Confusing!

@eugenegff
Copy link
Contributor

Seems that it is duplicate of #1245

@lukeblevins
Copy link
Contributor Author

@eugenegff Agreed.

@jevansaks jevansaks added the duplicate This issue or pull request already exists label Sep 3, 2019
@jevansaks
Copy link
Member

Thanks! I'll close it and we can use #1245 to track.

@msft-github-bot msft-github-bot removed the needs-assignee-attention Assignee needs to follow-up or investigate this issue label Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TreeView bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants