Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Android] Fix SwipeView dispose issue #11279

Merged
merged 4 commits into from
Jul 20, 2020
Merged

[Android] Fix SwipeView dispose issue #11279

merged 4 commits into from
Jul 20, 2020

Conversation

jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Jul 2, 2020

Description of Change

Fix an issue using SwipeView with BindableLayout and removing items (dispose issue).

Issues Resolved

API Changes

None

Platforms Affected

  • Android

Behavioral/Visual Changes

None

Before/After Screenshots

Before

Crash

After

fix11262

Testing Procedure

Launch Core Gallery and navigate to the issue 11262. Swipe and remove an item from the list. Without errors, the test has passed.

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@samhouts samhouts added 4.7.0 regression on 4.7.0 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often i/regression labels Jul 8, 2020
@samhouts samhouts merged commit 31c2a22 into 4.7.0 Jul 20, 2020
@samhouts samhouts deleted the fix-11262 branch July 20, 2020 23:51
@samhouts samhouts modified the milestone: 4.7.0 Jul 21, 2020
@Impesoft
Copy link

Impesoft commented Jun 27, 2021

I think this bug is still present when using SwipeItems Mode=Execute
when not using execute mode I do not get any issue, but if I want to save the user of an extra click by enabling it,
I get the infamous: System.ObjectDisposedException: 'Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.SwipeViewRenderer'.'

@golddevelopment
Copy link

@Impesoft

I think this bug is still present when using SwipeItems Mode=Execute
when not using execute mode I do not get any issue, but if I want to save the user of an extra click by enabling it,
I get the infamous: System.ObjectDisposedException: 'Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.SwipeViewRenderer'.'

I also got the exception until I wrapped a
Device.BeginInvokeOnMainThread(() => {});
around the deletion code.

@caverna
Copy link

caverna commented Aug 14, 2022

@Impesoft

I think this bug is still present when using SwipeItems Mode=Execute
when not using execute mode I do not get any issue, but if I want to save the user of an extra click by enabling it,
I get the infamous: System.ObjectDisposedException: 'Cannot access a disposed object.
Object name: 'Xamarin.Forms.Platform.Android.SwipeViewRenderer'.'

I also got the exception until I wrapped a Device.BeginInvokeOnMainThread(() => {}); around the deletion code.

2022 and this single post saved my sanity!
I have been struggling with that for days!!!
thank you!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.7.0 regression on 4.7.0 a/bindablelayout a/swipeview i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often i/regression p/Android t/bug 🐛
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants