jpardogo / PagerSlidingTabStrip

An interactive indicator to navigate between the different pages of a ViewPager
2.19k stars 354 forks source link

crashes when close app #39

Closed almaz010891 closed 9 years ago

almaz010891 commented 9 years ago

12-11 10:25:22.940 10693-10693/com.alex.photolessons E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.alex.photolessons, PID: 10693 java.lang.IllegalStateException: Observer com.astuetz.PagerSlidingTabStrip$PagerAdapterObserver@3b31bb43 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:533) at android.view.View.dispatchDetachedFromWindow(View.java:13441) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2837) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2834) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2834) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2834) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2834) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2834) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2834) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2834) at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:2889) at android.view.ViewRootImpl.doDie(ViewRootImpl.java:5390) at android.view.ViewRootImpl.die(ViewRootImpl.java:5367) 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:3707) at android.app.ActivityThread.access$1400(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1332) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

almaz010891 commented 9 years ago

UPDATE: Android 5.0, library version 1.0.6

almaz010891 commented 9 years ago

Please fix this issue. The same crash when change activity orientation

jpardogo commented 9 years ago

I cannot reproduce this issue. Are you doing everything correctly?. What about this

If you run the example you will notice it works fine, so I don´t really know why it is happening to you.

almaz010891 commented 9 years ago

if I used 1.0.3 liblary version - all OK. I can record video via adb and send You. Bug only with 1.0.6 . Sorry for my English

2014-12-23 13:16 GMT+02:00 Javier Pardo de Santayana Gómez < notifications@github.com>:

I cannot reproduce this issue. Are you doing everything correctly. What about this http://stackoverflow.com/questions/18444264/unable-to-resume-an-activity-when-using-a-viewpager

— Reply to this email directly or view it on GitHub https://github.com/jpardogo/PagerSlidingTabStrip/issues/39#issuecomment-67941759 .

MizzleDK commented 9 years ago

I can't reproduce it either on the same OS.

almaz010891 commented 9 years ago

hm....Ok, thanks... May be problem in my code......but..... but 1.0.3 works correctly, if I change from 1.0.3 to 1.0.6 and rebuild project - i give this problem without any changes in my code

2014-12-23 13:21 GMT+02:00 Michell Bak notifications@github.com:

I can't reproduce it either on the same OS.

— Reply to this email directly or view it on GitHub https://github.com/jpardogo/PagerSlidingTabStrip/issues/39#issuecomment-67942003 .

MizzleDK commented 9 years ago

It could've been a bug in 1.0.3 that resulted in it not crashing when it should have.

almaz010891 commented 9 years ago

thanks, I will think for this problem :)

2014-12-23 13:26 GMT+02:00 Michell Bak notifications@github.com:

It could've been a bug in 1.0.3 that resolved in it not crashing when it should have.

— Reply to this email directly or view it on GitHub https://github.com/jpardogo/PagerSlidingTabStrip/issues/39#issuecomment-67942353 .

jpardogo commented 9 years ago

I close the issue. Feel free to comment back if you find out that it is actually a library problem and I will reopen it. Thanks.

1.0.3 works because PagerAdapterObserver was introduce in 1.0.4