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

Putting ComboBox into BreadcrumbBar crashes the app #10116

Open
xperiandri opened this issue Oct 29, 2024 · 8 comments
Open

Putting ComboBox into BreadcrumbBar crashes the app #10116

xperiandri opened this issue Oct 29, 2024 · 8 comments

Comments

@xperiandri
Copy link

xperiandri commented Oct 29, 2024

Describe the bug

      <BreadcrumbBar ItemsSource="{x:Bind ViewModel.Path, Mode=OneWay}">
        <BreadcrumbBar.Template>
          <DataTemplate x:DataType="slf:FloorItemViewModel">
            <BreadcrumbBarItem Content="{Binding}">
              <BreadcrumbBarItem.ContentTemplate>
                <DataTemplate x:DataType="slf:FloorItemViewModel">
                  <ComboBox />

Putting a ComboBox in any form crashes the app.
But if you replace UI with a ComboBox later it works

Steps to reproduce the bug

  1. Create BeadcrumbBar as described above
  2. Run

Expected behavior

No crash

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002

Windows version

Windows 11 (24H2): Build 26100.2033

Additional context

No response

@xperiandri xperiandri added the bug Something isn't working label Oct 29, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Oct 29, 2024
@xperiandri
Copy link
Author

Workaround is

<DataTemplate x:DataType="slf:FloorItemViewModel">
  <Grid>
    <i:Interaction.Behaviors>
      <ic:EventTriggerBehavior EventName="Loaded">
        <ic:ChangePropertyAction TargetObject="{Binding ElementName=FloorsSelector}" PropertyName="Visibility" Value="Visible"/>
      </ic:EventTriggerBehavior>
    </i:Interaction.Behaviors>
    <ComboBox x:Name="FloorsSelector" x:DeferLoadStrategy="Lazy"
            ItemsSource="{Binding Items}"
            IsTextSearchEnabled="True"
            PlaceholderText="Select floor"
            SelectedValuePath="Name"
            SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
      <ComboBox.ItemTemplate>
        <DataTemplate x:DataType="domain:BuildingFloor">
          <TextBlock Text="{x:Bind Name}" />
        </DataTemplate>
      </ComboBox.ItemTemplate>
    </ComboBox>
  </Grid>
</DataTemplate>

x:DeferLoadStrategy="Lazy" + trigger

@karkarl karkarl added area-Binding area-Breadcrumb Regression and removed needs-triage Issue needs to be triaged by the area owners labels Oct 31, 2024
@evelynwu-msft
Copy link
Contributor

evelynwu-msft commented Nov 5, 2024

@xperiandri Could you provide a min repro project? I tried to create one from the snippet you provided but I must've missed something because it's not crashing.

@evelynwu-msft evelynwu-msft added the needs-author-feedback Asked author to supply more information. label Nov 5, 2024
@xperiandri
Copy link
Author

@evelynwu-msft I've tried to reproduce it on a minimal fresh project but indeed it does not reproduce.
But my app definitely crashes with it.
What else can I do?

@microsoft-github-policy-service microsoft-github-policy-service bot added needs-triage Issue needs to be triaged by the area owners and removed needs-author-feedback Asked author to supply more information. labels Nov 5, 2024
@evelynwu-msft
Copy link
Contributor

@xperiandri

  1. Enable mixed-mode debugging (only necessary if it's a C# app)
  2. Ensure that your debugger is configured to download symbols from the Microsoft symbol server.
  3. Set a C++ function breakpoint on Microsoft.UI.Xaml.dll!OnFailureEncountered
  4. Launch the app under the debugger

The callstack at the point where the breakpoint is hit should provide more information to help debug this.

@xperiandri
Copy link
Author

xperiandri commented Nov 6, 2024

It does not come to that breakpoint
This is what I see
Image
Image
Image
Image

@xperiandri
Copy link
Author

How to get access to the source code? I loaded symbols but no source code is available

@evelynwu-msft
Copy link
Contributor

Is Enable source server support checked in your debugging options?

@karkarl karkarl removed the needs-triage Issue needs to be triaged by the area owners label Nov 7, 2024
@xperiandri
Copy link
Author

Image
Crash happens here
But I cannot set a breakpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants