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

XamlC compiler null-refs when encountering a binding to an array access #10396

Closed
333fred opened this issue Sep 29, 2022 · 4 comments · Fixed by #15944
Closed

XamlC compiler null-refs when encountering a binding to an array access #10396

333fred opened this issue Sep 29, 2022 · 4 comments · Fixed by #15944
Assignees
Labels
area-xaml XAML, CSS, Triggers, Behaviors fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@333fred
Copy link
Member

333fred commented Sep 29, 2022

Description

When I have a ViewModel binding to an array backing property, I'm seeing the XamlC compiler null ref.

Steps to Reproduce

  1. Clone https://github.com/333fred/maui-layout-bugs.
  2. Comment https://github.com/333fred/maui-layout-bugs/blob/main/Test/MainPage.xaml.cs#L21 and uncomment https://github.com/333fred/maui-layout-bugs/blob/main/Test/MainPage.xaml.cs#L23
  3. Attempt to build the solution.

Link to public reproduction project repository

https://github.com/333fred/maui-layout-bugs

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)

Affected platform versions

.NET 7 RC 1

Did you find any workaround?

Use a List instead, as on line 21.

Relevant log output

No response

@333fred 333fred added the t/bug Something isn't working label Sep 29, 2022
@rachelkang rachelkang added the area-xaml XAML, CSS, Triggers, Behaviors label Sep 29, 2022
@rachelkang
Copy link
Member

@StephaneDelcroix what do you think?

@rachelkang rachelkang added this to the Backlog milestone Sep 29, 2022
@ghost
Copy link

ghost commented Sep 29, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels May 26, 2023
@XamlTest
Copy link
Collaborator

Verified this on Visual Studio Enterprise 17.7.0 Preview 1.0. Repro on Windows 11 and Android with provided Project: Test.zip

image

@StephaneDelcroix StephaneDelcroix self-assigned this Jun 21, 2023
@StephaneDelcroix
Copy link
Contributor

StephaneDelcroix commented Jun 30, 2023

we look for the indexer instead of doing ldelem for System.Array, this is why it fails

@samhouts samhouts modified the milestones: Backlog, .NET 8 Jul 25, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! label Aug 8, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-xaml XAML, CSS, Triggers, Behaviors fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants