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

TemplatedCell.UpdateSelectionColor() Object reference not set to an instance of an object error #20607

Closed
sencagri opened this issue Feb 15, 2024 · 5 comments
Labels
area-controls-listview ListView and TableView high It doesn't work at all, crashes or has a big impact. i/regression This issue described a confirmed regression on a currently supported version platform/iOS 🍎 s/needs-attention Issue has more information and needs another look t/bug Something isn't working

Comments

@sencagri
Copy link

sencagri commented Feb 15, 2024

Description

After updating 8.0.7 I get this error on only iOS platform, android is working fine.

14:08:14:823	[0:] An error occurred: 'Object reference not set to an instance of an object.'. Callstack: '   at Microsoft.Maui.Controls.Handlers.Items.TemplatedCell.UpdateSelectionColor()
14:08:14:823	   at Microsoft.Maui.Controls.Handlers.Items.TemplatedCell.set_Selected(Boolean value)
14:08:14:823	   at UIKit.UICollectionView.DequeueReusableCell(NSString reuseIdentifier, NSIndexPath indexPath) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/build/dotnet/ios/generated-sources/UIKit/UICollectionView.g.cs:line 232
14:08:14:823	   at UIKit.UICollectionView.DequeueReusableCell(String reuseIdentifier, NSIndexPath indexPath) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UICollectionView.cs:line 23
14:08:14:823	   at Microsoft.Maui.Controls.Handlers.Items.ItemsViewController`1[[Microsoft.Maui.Controls.ReorderableItemsView, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].GetCell(UICollectionView collectionView, NSIndexPath indexPath)
14:08:14:823	   at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 58
14:08:14:823	   at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
14:08:14:823	   at AktifBarkod.AktifPOS.Mobil.Program.Main(String[] args) in E:\AktifPOS\AktifBarkod.AktifPOS.Mobil\Platforms\iOS\Program.cs:line 13
14:08:14:823	   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
14:08:14:823	   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)'
14:08:15:213	The app has been terminated.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.7 SR2

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.6 SR1

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@sencagri sencagri added the t/bug Something isn't working label Feb 15, 2024
@jsuarezruiz jsuarezruiz added high It doesn't work at all, crashes or has a big impact. area-controls-listview ListView and TableView labels Feb 15, 2024
@PureWeen PureWeen added i/regression This issue described a confirmed regression on a currently supported version s/needs-repro Attach a solution or code which reproduces the issue labels Feb 15, 2024
@ghost
Copy link

ghost commented Feb 15, 2024

Hi @sencagri. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@sencagri
Copy link
Author

sencagri commented Feb 19, 2024

Is there any clue about the issue our project is fairly complex and I don't know where the problem is. Kinda hard to create a repro.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Feb 19, 2024
@PureWeen
Copy link
Member

@filipnavara thoughts?

Do you think this could be related to?
#14619

@PureWeen
Copy link
Member

PureWeen commented Feb 21, 2024

@filipnavara thoughts?

Do you think this could be related to? #14619

Never mind, your PR is going into SR3 not SR2

@sencagri if you test the nightly does that fix?

https://github.com/dotnet/maui/wiki/Nightly-Builds

@PureWeen
Copy link
Member

Duplicate of #20606

@PureWeen PureWeen marked this as a duplicate of #20606 Feb 22, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-listview ListView and TableView high It doesn't work at all, crashes or has a big impact. i/regression This issue described a confirmed regression on a currently supported version platform/iOS 🍎 s/needs-attention Issue has more information and needs another look t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants