IllegalStateException: Observer ... was not registered.
Closed this issue · 2 comments
Hi @jpardogo,
I've received 2 identical crash reports from a Sony Xperia M4 Aqua (E2303) running Android 5.0. The user was using my app (https://github.com/ExCiteS/Sapelli) which relies on your library. The crash happens in the library code see (stacktrace below), and while I can't rule out 100% it is not caused by my own code I'm inclined to think it isn't. Unfortunately I haven't been able to reproduce this crash myself and I don't know what exactly the user was doing at the time of the crashes.
I haven't found time to investigate this any further myself, but I may do so later.
In the meantime, I was wondering if you had some thoughts on this?
Fatal Exception: java.lang.IllegalStateException: Observer com.astuetz.PagerSlidingTabStrip$PagerAdapterObserver@27708c93 was not registered.
at android.database.Observable.unregisterObserver(Observable.java:69)
at android.support.v4.view.PagerAdapter.unregisterDataSetObserver(PagerAdapter.java:294)
at com.astuetz.PagerSlidingTabStrip.onDetachedFromWindow(PagerSlidingTabStrip.java:552)
at android.view.View.dispatchDetachedFromWindow(View.java:13529)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2838)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)
at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:2917)
at android.view.ViewRootImpl.doDie(ViewRootImpl.java:5418)
at android.view.ViewRootImpl.die(ViewRootImpl.java:5395)
at android.view.WindowManagerGlobal.removeViewLocked(WindowManagerGlobal.java:359)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:314)
at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:84)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3798)
at android.app.ActivityThread.access$1400(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1377)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5319)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1016)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
It's probably the way your are setting the adapter. It happened before in the issue #71 . if you show me your implementation, I may be able to find the problem