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

Updating the CanExecute command property for a disposed MaterialButton causes a crash #35

Closed
michaelkollmann opened this issue Dec 18, 2018 · 3 comments
Labels
bug Something isn't working more info needed

Comments

@michaelkollmann
Copy link

Describe the bug
When updating the CanExecute property for an already disposed MaterialButton a crash occours.
This issue does not exist when using the regular Xamarin.Forms Button.

To Reproduce
Steps to reproduce the behavior:

  1. My application opens a modal dialog page
  2. In this dialog I click a "Save" button which closes the dialog
  3. To prevent clicking the button twice the command sets the CanExecute property to false while the command is being executed
  4. Now the dialog has been closed and is starting to be disposed. The command completes and the CanExecute property changes back from false to true.
  5. Now the application crashes with the following error:

System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Android.Support.V7.Widget.AppCompatButton'.

I'm using the latest XF.Material library, version 1.3.0.2. All my Xamarin.Android.* libraries are version 28.0.0

Expected behavior
The application does not crash.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • Device: Xiaomi Red mi 2
  • OS: Android 8.1
@contrix09
Copy link

Will look into this.

@contrix09 contrix09 self-assigned this Dec 19, 2018
@contrix09 contrix09 added the bug Something isn't working label Dec 19, 2018
@contrix09
Copy link

contrix09 commented Jan 8, 2019

I can't seem to replicate this. What do you use to show the modal page?

@yankarinRG
Copy link

Still persists as of 1.6.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more info needed
Projects
None yet
Development

No branches or pull requests

2 participants