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

Fix NRE when RecycleElement is on and list is scrolled quickly on Android #856

merged 1 commit into from Apr 6, 2017


None yet
4 participants

hartez commented Apr 4, 2017

Description of Change

Removes an unnecessary optimization in BaseCellView which can, under certain circumstances, cause a NullReferenceException in the ListViewAdapter when the list is scrolled quickly enough.

The NRE occurs in GetView when the adapter attempts to get the Element from the cell; if the previous override of OnDetachedFromWindow() has already been called, the Element will return null and the application will crash.

No UI tests, it's a race condition and difficult to reliably reproduce.

Bugs Fixed

API Changes


Behavioral Changes


PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@samhouts samhouts merged commit 9c57db0 into master Apr 6, 2017

3 checks passed

Android-UITests-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 : Tests passe…
OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: OSX Debug : Running
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: Windows Debug : Tests passed: 3755, ignored: 10

@samhouts samhouts deleted the recycle-element-nre branch Apr 6, 2017

@samhouts samhouts added D-15.4 and removed cla-not-required labels Oct 10, 2017

@samhouts samhouts added this to the 2.3.5 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment