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

Exception not thrown when pass wrong index values in INotifiyCollectionChanged in Android #26941

Open
nivetha-nagalingam opened this issue Jan 3, 2025 · 1 comment
Labels
area-controls-listview ListView and TableView platform/android 🤖 t/bug Something isn't working
Milestone

Comments

@nivetha-nagalingam
Copy link
Contributor

nivetha-nagalingam commented Jan 3, 2025

Description

When performing multi-item collection operations (AddRange) in a MAUI application using an ObservableCollection, there is inconsistent behavior on Android platforms.
On the other platforms, attempting to add multiple items triggers the expected ArgumentException and updates the UI label to "Success". However, on Android, the operation proceeds without throwing the exception, adds the items to the collection, and fails to update the UI label.
Reference Issue: xamarin/Xamarin.Forms#948
Note: While fixing this issue enable the following UITest in HostApp: Bugzilla56771

Screen.Recording.2025-01-02.at.10.56.58.PM.mov

Steps to Reproduce

  1. Run the below application.
  2. Bugzilla56771Exception.cs.zip
  3. Click the "Add 2" button.
  4. Observe that the label does not change to "Success" and items are added
    Expected Behavior
    1. When clicking the "Add 2" button:
    2. An ArgumentException should be thrown
    3. The label text should be updated to "Success"
    Actual Behavior on Android
    1. When clicking the "Add 2" button:
    2. No ArgumentException is thrown
    3. The label text remains unchanged
    4. The items are added to the collection

Link to public reproduction project repository

No response

Version with bug

9.0.21 SR2.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

No response

Relevant log output

@nivetha-nagalingam nivetha-nagalingam added the t/bug Something isn't working label Jan 3, 2025
@vishnumenon2684 vishnumenon2684 added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 3, 2025
@vishnumenon2684 vishnumenon2684 self-assigned this Jan 3, 2025
@mattleibow mattleibow added this to the Backlog milestone Jan 4, 2025
@mattleibow
Copy link
Member

mattleibow commented Jan 4, 2025

I looked at the code, and I see ListView. It would be interesting to see what happens with CollectionView with this operation.

@vishnumenon2684 vishnumenon2684 removed the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 7, 2025
@vishnumenon2684 vishnumenon2684 removed their assignment Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-listview ListView and TableView platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants