-
Notifications
You must be signed in to change notification settings - Fork 90
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
Unexpected problem when unmounting #82
Comments
I have a very similar Anvil issue after switching from Android SDK 23 to 25. When unmounting a RecyclerView, a NullPointerException is thrown. Because the RecyclerView was already detached from the window once and Anvil tries to detach it again. First stack trace:
Second stack trace (causing the exception):
Seems like Android itself takes care of removing the Anvil views and Anvil tries to do it a second time. Not sure what would be the cleanest solution here. |
I've got this error reported from an app in production and it seems that it tried to remove view more than once. Maybe a simple try/catch on L138 would solve with no side effects.
Fatal Exception: java.lang.IllegalArgumentException
The observer is null.
android.database.Observable.unregisterObserver (Observable.java:64)
android.widget.BaseAdapter.unregisterDataSetObserver (BaseAdapter.java:42)
android.widget.AbsListView.onDetachedFromWindow (AbsListView.java:2668)
android.view.View.dispatchDetachedFromWindow (View.java:12024)
android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:2612)
android.view.ViewGroup.dispatchDetachedFromWindow (ViewGroup.java:2610)
android.view.ViewGroup.removeViewsInternal (ViewGroup.java:3792)
android.view.ViewGroup.removeViews (ViewGroup.java:3674)
trikita.anvil.Anvil.unmount (Anvil.java:138)
The text was updated successfully, but these errors were encountered: