最近发现crash日志中出现大量android.view.AbsSavedState$1 cannot be cast to android.widget.HorizontalScrollView$SavedState。然而crash的堆栈中寻不到app的代码行,均未sdk下的,故到目前为止未能查到可能会导致该异常的代码点。而且在调试过程中发现,正常使用app基本不会导致该异常,只有在app遭遇其他异常crash之后才会出现该crash。
请问是否有人遇到过?
java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.HorizontalScrollView$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2359)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2422)
at android.app.ActivityThread.access$800(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5327)
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:1124)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:808)
Caused by: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.HorizontalScrollView$SavedState
at android.widget.HorizontalScrollView.onRestoreInstanceState(HorizontalScrollView.java:1676)
at android.view.View.dispatchRestoreInstanceState(View.java:13812)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2888)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.View.restoreHierarchyState(View.java:13790)
at android.support.v4.app.Fragment.restoreViewState(Fragment.java)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManagerImpl.java)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
at android.app.Activity.performStart(Activity.java:6057)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2312)
... 10 more
java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.HorizontalScrollView$SavedState
at android.widget.HorizontalScrollView.onRestoreInstanceState(HorizontalScrollView.java:1676)
at android.view.View.dispatchRestoreInstanceState(View.java:13812)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2888)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2894)
at android.view.View.restoreHierarchyState(View.java:13790)
at android.support.v4.app.Fragment.restoreViewState(Fragment.java)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManagerImpl.java)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
at android.app.Activity.performStart(Activity.java:6057)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2312)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2422)
at android.app.ActivityThread.access$800(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5327)
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:1124)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:808)