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

[Android]Dispose check on FastButtonRenderer to prevent crash #975

Merged
merged 1 commit into from Jun 12, 2017

Conversation

Projects
None yet
4 participants
@bentmar
Contributor

bentmar commented Jun 7, 2017

Check if buttonrenderer is disposed when making changes

Description of Change

Check if disposed on elementChanged

Bugs Fixed

Prevent crashes when making changes to a disposed renderer
"System.ObjectDisposedException: Cannot access a disposed object."

API Changes

None

Behavioral Changes

None

Dispose check on ButtonRenderer
Check if buttonrenderer is disposed when making changes
@bentmar

This comment has been minimized.

Show comment
Hide comment
@bentmar

bentmar Jun 7, 2017

Contributor

Ive made common dispose checks to other fastrenderers. It feels like this is the "easy" way to fix this, when a renderer gets disposed how come it still receives elementChanged calls?

Contributor

bentmar commented Jun 7, 2017

Ive made common dispose checks to other fastrenderers. It feels like this is the "easy" way to fix this, when a renderer gets disposed how come it still receives elementChanged calls?

@rmarinho rmarinho merged commit d9cf955 into xamarin:master Jun 12, 2017

rmarinho added a commit that referenced this pull request Jun 21, 2017

Dispose check on ButtonRenderer (#975)
Check if buttonrenderer is disposed when making changes

jimmgarrido added a commit to jimmgarrido/Xamarin.Forms that referenced this pull request Jun 21, 2017

Dispose check on ButtonRenderer (#975)
Check if buttonrenderer is disposed when making changes

assemhakmeh added a commit to assemhakmeh/Xamarin.Forms that referenced this pull request Jul 28, 2017

Merge branch '2.3.5' into ios-fastrenderers
* 2.3.5:
  [UWP] Fixes for usage of XF with .net native toolchain (#1024)
  [UWP] Make sure to update HitTestVisible when IsEnable changes (#1015)
  [Android] Dispose check before setting properties on Button (#1013)
  Add missing member variable to FormsApplicationActivity
  Fix NRE when background color of button set in FormsApplicationActivity (#1010)
  Fix border on android buttons  (#941)
  [iOS] ListView with UnevenRows and Cell Heights will no longer be slow to load (#994)
  Set the Id field for Android Views created by Forms #1004
  Fix build
  Fix possible crash on API 21+ at launch when using Holo theme and FormsApplicationActivity (#961)
  [Android] Remove the ". " on empty labels (Accessibility) on Fastrenderers (#915)
  Remove debug outputs (#1008)
  Add check for instance of UITableView (#885)
  [XamlC] fix release builds of Xaml Unit Tests
  Dispose check on ButtonRenderer (#975)
  [previewer] make sure we do not crash even if the previewer doesn't s… (#946)
  [XamlC] fix build
  Remove VisualElement finalizer (#918)
  [XamlC] process symbols if DebugType is set (#925)

@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