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

[Bug] SwipeView crash with NullReferenceException #10679

Closed
koddek opened this issue May 13, 2020 · 3 comments
Closed

[Bug] SwipeView crash with NullReferenceException #10679

koddek opened this issue May 13, 2020 · 3 comments
Assignees
Labels
a/navigation a/swipeview e/2 🕑 2 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛

Comments

@koddek
Copy link

koddek commented May 13, 2020

Description

When using swipeview to swipe navigate to another page, if I remove or pop a page from the stack, the app always crashes with the same error.

Steps to Reproduce

  1. Run the provided demo.
  2. Click the button on the homepage to go to Page 1.
  3. Swipe Left or Right to go to Page 2.
  4. The error is thrown here

Expected Behavior

Page 2 is displayed and page 1 was popped out of the navigation stack with no errors.

Actual Behavior

Throws error: "System.NullReferenceException: Object reference not set to an instance of an object"

AppCenter Trace

SwipeViewRenderer.UpdateIsOpen (System.Boolean isOpen)
SwipeViewRenderer.DisposeSwipeItems ()
SwipeViewRenderer.<ResetSwipe>b__71_0 ()
Runnable.Run ()
IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this)
(wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.47(intptr,intptr)

Basic Information

Visual Studio 2019
Xamarin.Forms v4.6

Reproduction Link

SwipeViewDemo.zip

@koddek koddek added s/unverified New report that has yet to be verified t/bug 🐛 labels May 13, 2020
@pauldipietro pauldipietro added this to New in Triage May 13, 2020
@jsuarezruiz jsuarezruiz self-assigned this May 13, 2020
@jsuarezruiz jsuarezruiz added a/swipeview p/Android a/navigation e/2 🕑 2 and removed s/unverified New report that has yet to be verified labels May 13, 2020
@jsuarezruiz jsuarezruiz added this to Backlog in SwipeView via automation May 13, 2020
@jsuarezruiz jsuarezruiz moved this from New to Ready For Work in Triage May 13, 2020
@jsuarezruiz jsuarezruiz moved this from Backlog to In Progress in SwipeView May 13, 2020
@haavamoa
Copy link

I experienced the same bug when deleting the item in the list while the SwipeView is open and are animating back to closed.

One work around until #10682 is merged is to set : SwipeBehaviorOnInvoked="RemainOpen" for the SwipeItems.

@samhouts samhouts removed this from Ready For Work in Triage May 28, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label May 28, 2020
@samhouts samhouts added the i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often label Jun 8, 2020
@samhouts samhouts added this to In Progress in v4.6.0 Jun 20, 2020
@samhouts samhouts removed this from In Progress in v4.6.0 Jun 25, 2020
@samhouts samhouts added this to In Progress in 4.7.0 Jun 25, 2020
@ederbond
Copy link
Contributor

ederbond commented Jun 29, 2020

The fix on this PR 3a2826c was already merged into main branch, however it was not merged into 4.7.0 branch yet.
Waiting for the xamarin team @samhouts @davidortinau @rmarinho @pauldipietro @jsuarezruiz to release it into the next stable release.

@ederbond
Copy link
Contributor

ederbond commented Jul 2, 2020

Just submitted the same fix for iOS #11292

@samhouts samhouts moved this from In Progress to Done in 4.7.0 Jul 8, 2020
@samhouts samhouts removed this from Done in 4.7.0 Jul 8, 2020
@samhouts samhouts added this to In Progress in 4.7.0 Jul 8, 2020
@samhouts samhouts moved this from In Progress to Done in 4.7.0 Jul 8, 2020
SwipeView automation moved this from In Progress to Done Jul 13, 2020
@samhouts samhouts added this to In Progress in vCurrent (4.8.0) Jul 30, 2020
@samhouts samhouts moved this from Done to In Progress in SwipeView Jul 30, 2020
@samhouts samhouts removed this from In Progress in vCurrent (4.8.0) Aug 4, 2020
@samhouts samhouts added this to In Progress in vNext+1 (5.0.0) Aug 11, 2020
@samhouts samhouts moved this from In Progress to Done in vNext+1 (5.0.0) Aug 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/navigation a/swipeview e/2 🕑 2 i/high Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often in-progress This issue has an associated pull request that may resolve it! p/Android t/bug 🐛
Projects
SwipeView
  
In Progress
Development

No branches or pull requests

5 participants