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 attempts to set its width to an absurdly small number, excepts #1020

Closed
DHowett-MSFT opened this issue Jul 9, 2019 · 6 comments
Closed
Assignees
Labels
area-TabView bug Something isn't working team-Controls Issue for the Controls team

Comments

@DHowett-MSFT
Copy link

DHowett-MSFT commented Jul 9, 2019

Describe the bug

double widthTaken = 0.0;
if (auto leftContentColumn = m_leftContentColumn.get())
{
widthTaken += leftContentColumn.ActualWidth();
}
if (auto addButtonColumn = m_addButtonColumn.get())
{
widthTaken += addButtonColumn.ActualWidth();
}
if (auto rightContentColumn = m_rightContentColumn.get())
{
widthTaken += rightContentColumn.ActualWidth();
}

Stepping through these three conditionals during Windows Terminal startup (MUX package version 2.2.190702001-prerelease) shows that each column is "2147000000 pixels wide". When we attempt to derive an availableWidth from the width taken and set it, regardless of the TabWidthMode, we get an "invalid argument" HRESULT.

  Name Value Type
  availableWidth -6442450453.0000000 double
  widthTaken 6442450944.0000000 double

Steps to reproduce the bug
This reproduces in a local dev build of Windows Terminal. I'm not sure how to reproduce it elsewhere.

Expected behavior
Doesn't crash.

Version Info

NuGet package version:
2.2.190702001-prerelease

Additional context
We're not inserting content into any of the TabView's left/add/right columns.

Xaml islands? We've got a window with xaml content in it, so I believe that it's already laid itself out correctly (ActualWidth is 491.00 on line 330 where availableWidth is calculated.)

@jevansaks
Copy link
Member

Thanks, @DHowett-MSFT , can you share a branch/commitSha to check out for a build of terminal that repros this? That would help us debug locally.

I'm assigning to @teaP -- she'll be back on wednesday.

@jevansaks jevansaks added area-TabView bug Something isn't working labels Jul 9, 2019
@DHowett-MSFT
Copy link
Author

Sure: microsoft/terminal@cc45a50c, branch dev/duhowett/nuget_updates

Incidentally, would the change from is-a ListView to has-a ListView changing the return type of Items from IObservableVector to IVector warrant me filing another issue? Relevant here.

@jevansaks
Copy link
Member

jevansaks commented Jul 9, 2019

Incidentally, would the change from is-a ListView to has-a ListView changing the return type of Items from IObservableVector to IVector warrant me filing another issue? Relevant here.

Yes, if only so that we don't lose track of it. It should be straightforward to change it, I doubt it was intentional.

@DHowett-MSFT
Copy link
Author

Done; #1021. Thanks!

@DHowett-MSFT
Copy link
Author

I'm not seeing this any more.

@teaP
Copy link
Contributor

teaP commented Sep 23, 2019

A lot has changed since this bug was filed so if you're not seeing it anymore -- awesome. Let me know if it comes back!

@teaP teaP closed this as completed Sep 23, 2019
@jevansaks jevansaks added the team-Controls Issue for the Controls team label Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TabView bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

3 participants