Status Update
Comments
al...@android.com <al...@android.com>
am...@gmail.com <am...@gmail.com> #2
what Application are you trying to reproduce the issue. I tried rotating the device for couple of times, Issue not seen. Also provide Device you are using to reproduce the issue
em...@evozi.com <em...@evozi.com> #3
Any Android 2.3.x, really. The application is a Beta version of an unreleased app.
This issie initially appeared on a Samsung Galaxy Ace with 2.3.3, but after testing it in an Android emulator, it also appeared. The dificulty to reproduce this is because it only seems to happen after a crash of the app (either by OOM or some other bug), and we Android tries to recreate the app, it crashes again with the "ClassNotFoundException when unmarshalling".
Also, we're having another crash similar to this, but in AppBarLayout.Behaviour:
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{cm.aptoide.pt.dev/cm.aptoide.pt.AppViewActivity }: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.design.widget.AppBarLayout$Behavior$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1658)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3735)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.design.widget.AppBarLayout$Behavior$SavedState
at android.os.Parcel.readParcelable(Parcel.java:1958)
at android.os.Parcel.readParcelableArray(Parcel.java:1997)
at android.support.design.widget.CoordinatorLayout$SavedState.<init>(CoordinatorLayout.java:2604)
at android.support.design.widget.CoordinatorLayout$SavedState$1.createFromParcel(CoordinatorLayout.java:2639)
at android.support.design.widget.CoordinatorLayout$SavedState$1.createFromParcel(CoordinatorLayout.java:2636)
at android.support.v4.os.ParcelableCompat$CompatCreator.createFromParcel(ParcelableCompat.java:51)
at android.os.Parcel.readParcelable(Parcel.java:1981)
at android.os.Parcel.readValue(Parcel.java:1846)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2112)
at android.os.Parcel.readSparseArray(Parcel.java:1568)
at android.os.Parcel.readValue(Parcel.java:1903)
at android.os.Parcel.readMapInternal(Parcel.java:2083)
at android.os.Bundle.unparcel(Bundle.java:208)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1175)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1517)
at android.app.Activity.onRestoreInstanceState(Activity.java:844)
at android.app.Activity.performRestoreInstanceState(Activity.java:816)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1096)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1636)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3735)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662)
at dalvik.system.NativeStart.main(NativeStart.java)
Thanks in advance.
This issie initially appeared on a Samsung Galaxy Ace with 2.3.3, but after testing it in an Android emulator, it also appeared. The dificulty to reproduce this is because it only seems to happen after a crash of the app (either by OOM or some other bug), and we Android tries to recreate the app, it crashes again with the "ClassNotFoundException when unmarshalling".
Also, we're having another crash similar to this, but in AppBarLayout.Behaviour:
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1658)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3735)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.design.widget.AppBarLayout$Behavior$SavedState
at android.os.Parcel.readParcelable(Parcel.java:1958)
at android.os.Parcel.readParcelableArray(Parcel.java:1997)
at android.support.design.widget.CoordinatorLayout$SavedState.<init>(CoordinatorLayout.java:2604)
at android.support.design.widget.CoordinatorLayout$SavedState$1.createFromParcel(CoordinatorLayout.java:2639)
at android.support.design.widget.CoordinatorLayout$SavedState$1.createFromParcel(CoordinatorLayout.java:2636)
at android.support.v4.os.ParcelableCompat$CompatCreator.createFromParcel(ParcelableCompat.java:51)
at android.os.Parcel.readParcelable(Parcel.java:1981)
at android.os.Parcel.readValue(Parcel.java:1846)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2112)
at android.os.Parcel.readSparseArray(Parcel.java:1568)
at android.os.Parcel.readValue(Parcel.java:1903)
at android.os.Parcel.readMapInternal(Parcel.java:2083)
at android.os.Bundle.unparcel(Bundle.java:208)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1175)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1517)
at android.app.Activity.onRestoreInstanceState(Activity.java:844)
at android.app.Activity.performRestoreInstanceState(Activity.java:816)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1096)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1636)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1674)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3735)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662)
at dalvik.system.NativeStart.main(NativeStart.java)
Thanks in advance.
em...@evozi.com <em...@evozi.com> #4
Hi Please provide the sample project to reproduce the issue, Also our eng teams are not prioritizing changes on earlier releases.
ne...@gmail.com <ne...@gmail.com> #5
au...@google.com <au...@google.com> #6
Android 2.3.3 - 2.3.7
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rusdelphi.wifipassword/com.rusdelphi.wifipassword.MainActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.design.widget.AppBarLayout$Behavior$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1735)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1754)
at android.app.ActivityThread.access$1500(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1000)
at android.os.Handler.dispatchMessage(Handler.java:130)
at android.os.Looper.loop(SourceFile:351)
at android.app.ActivityThread.main(ActivityThread.java:3821)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:538)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:969)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:727)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.design.widget.AppBarLayout$Behavior$SavedState
at android.os.Parcel.readParcelable(Parcel.java:1989)
at android.os.Parcel.readParcelableArray(Parcel.java:2028)
at android.support.design.widget.CoordinatorLayout$SavedState.<init>(Unknown Source)
at android.support.design.widget.CoordinatorLayout$SavedState$1.createFromParcel(Unknown Source)
at android.support.design.widget.CoordinatorLayout$SavedState$1.createFromParcel(Unknown Source)
at android.support.v4.e.d.createFromParcel(Unknown Source)
at android.os.Parcel.readParcelable(Parcel.java:2012)
at android.os.Parcel.readValue(Parcel.java:1877)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2143)
at android.os.Parcel.readSparseArray(Parcel.java:1599)
at android.os.Parcel.readValue(Parcel.java:1934)
at android.os.Parcel.readMapInternal(Parcel.java:2114)
at android.os.Bundle.unparcel(Bundle.java:239)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1198)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1538)
at android.app.Activity.onRestoreInstanceState(Activity.java:880)
at android.app.Activity.performRestoreInstanceState(Activity.java:852)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1132)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1713)
... 11 more
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rusdelphi.wifipassword/com.rusdelphi.wifipassword.MainActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.design.widget.AppBarLayout$Behavior$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1735)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1754)
at android.app.ActivityThread.access$1500(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1000)
at android.os.Handler.dispatchMessage(Handler.java:130)
at android.os.Looper.loop(SourceFile:351)
at android.app.ActivityThread.main(ActivityThread.java:3821)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:538)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:969)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:727)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.design.widget.AppBarLayout$Behavior$SavedState
at android.os.Parcel.readParcelable(Parcel.java:1989)
at android.os.Parcel.readParcelableArray(Parcel.java:2028)
at android.support.design.widget.CoordinatorLayout$SavedState.<init>(Unknown Source)
at android.support.design.widget.CoordinatorLayout$SavedState$1.createFromParcel(Unknown Source)
at android.support.design.widget.CoordinatorLayout$SavedState$1.createFromParcel(Unknown Source)
at android.support.v4.e.d.createFromParcel(Unknown Source)
at android.os.Parcel.readParcelable(Parcel.java:2012)
at android.os.Parcel.readValue(Parcel.java:1877)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2143)
at android.os.Parcel.readSparseArray(Parcel.java:1599)
at android.os.Parcel.readValue(Parcel.java:1934)
at android.os.Parcel.readMapInternal(Parcel.java:2114)
at android.os.Bundle.unparcel(Bundle.java:239)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1198)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1538)
at android.app.Activity.onRestoreInstanceState(Activity.java:880)
at android.app.Activity.performRestoreInstanceState(Activity.java:852)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1132)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1713)
... 11 more
au...@google.com <au...@google.com> #7
Layout
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android "
xmlns:app="http://schemas.android.com/apk/res-auto "
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<RelativeLayout
android:id="@+id/MainView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark" />
<LinearLayout
android:id="@+id/ad_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center|bottom"
android:orientation="vertical" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark"
app:tabGravity="fill" />
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/fab_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:onClick="onAddButtonClick"
android:src="@drawable/ic_add_black_24dp"
android:visibility="invisible"
app:layout_behavior="com.rusdelphi.wifipassword.FABScrollBehavior" />
</RelativeLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:menu="@menu/drawer_view" />
</android.support.v4.widget.DrawerLayout>
<android.support.v4.widget.DrawerLayout xmlns:android="
xmlns:app="
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<RelativeLayout
android:id="@+id/MainView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark" />
<LinearLayout
android:id="@+id/ad_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center|bottom"
android:orientation="vertical" />
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark"
app:tabGravity="fill" />
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_margin="@dimen/fab_margin"
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:onClick="onAddButtonClick"
android:src="@drawable/ic_add_black_24dp"
android:visibility="invisible"
app:layout_behavior="com.rusdelphi.wifipassword.FABScrollBehavior" />
</RelativeLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:menu="@menu/drawer_view" />
</android.support.v4.widget.DrawerLayout>
ra...@ceptmysore.net <ra...@ceptmysore.net> #8
This is our #1 crash in crashlytics. Same behavior and types of crashes.
[Deleted User] <[Deleted User]> #9
Happens on HoneyComb too.
Another stacktrace, in case it could bring some more info:
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.videolan.vlc/org.videolan.vlc.gui.MainActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v7.widget.RecyclerView$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1696)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716)
at android.app.ActivityThread.access$1500(ActivityThread.java:124)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
at Android.MODEL(MB855)
at Android.VERSION(2.3.5)
at Android.FINGERPRINT(sprint/moto_sunfire/sunfire:2.3.5/4.5.1A-1_SUN-254_13/CM:user/release-keys)
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v7.widget.RecyclerView$SavedState
at android.os.Parcel.readParcelable(Parcel.java:1958)
at android.os.Parcel.readValue(Parcel.java:1846)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2112)
at android.os.Parcel.readSparseArray(Parcel.java:1568)
at android.os.Parcel.readValue(Parcel.java:1903)
at android.os.Parcel.readMapInternal(Parcel.java:2083)
at android.os.Bundle.unparcel(Bundle.java:208)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167)
at android.support.design.internal.NavigationMenuPresenter.onRestoreInstanceState(NavigationMenuPresenter.java:175)
at android.support.v7.view.menu.MenuBuilder.dispatchRestoreInstanceState(MenuBuilder.java:349)
at android.support.v7.view.menu.MenuBuilder.restorePresenterStates(MenuBuilder.java:361)
at android.support.design.widget.NavigationView.onRestoreInstanceState(NavigationView.java:191)
at android.view.View.dispatchRestoreInstanceState(View.java:6278)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1211)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.View.restoreHierarchyState(View.java:6257)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1724)
at android.app.Activity.onRestoreInstanceState(Activity.java:868)
at android.app.Activity.performRestoreInstanceState(Activity.java:840)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1096)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1674)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716)
at android.app.ActivityThread.access$1500(ActivityThread.java:124)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Another stacktrace, in case it could bring some more info:
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.videolan.vlc/org.videolan.vlc.gui.MainActivity}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v7.widget.RecyclerView$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1696)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716)
at android.app.ActivityThread.access$1500(ActivityThread.java:124)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
at Android.MODEL(MB855)
at Android.VERSION(2.3.5)
at Android.FINGERPRINT(sprint/moto_sunfire/sunfire:2.3.5/4.5.1A-1_SUN-254_13/CM:user/release-keys)
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v7.widget.RecyclerView$SavedState
at android.os.Parcel.readParcelable(Parcel.java:1958)
at android.os.Parcel.readValue(Parcel.java:1846)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2112)
at android.os.Parcel.readSparseArray(Parcel.java:1568)
at android.os.Parcel.readValue(Parcel.java:1903)
at android.os.Parcel.readMapInternal(Parcel.java:2083)
at android.os.Bundle.unparcel(Bundle.java:208)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167)
at android.support.design.internal.NavigationMenuPresenter.onRestoreInstanceState(NavigationMenuPresenter.java:175)
at android.support.v7.view.menu.MenuBuilder.dispatchRestoreInstanceState(MenuBuilder.java:349)
at android.support.v7.view.menu.MenuBuilder.restorePresenterStates(MenuBuilder.java:361)
at android.support.design.widget.NavigationView.onRestoreInstanceState(NavigationView.java:191)
at android.view.View.dispatchRestoreInstanceState(View.java:6278)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1211)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.View.restoreHierarchyState(View.java:6257)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1724)
at android.app.Activity.onRestoreInstanceState(Activity.java:868)
at android.app.Activity.performRestoreInstanceState(Activity.java:840)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1096)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1674)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716)
at android.app.ActivityThread.access$1500(ActivityThread.java:124)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
au...@google.com <au...@google.com> #10
This issue could not be reproduced in Marshmallow builds. At this point, our eng teams are not prioritizing changes on earlier releases. Please do let us know if you encounter this issue on 6.0+.
lu...@gmail.com <lu...@gmail.com> #11
This makes me sad. Because we still have about 10% of our user base that can be affected by this.
Are you aware of any work arounds for this issue?
We considered explicitly setting the class loader during the saving of the state in hopes that might fix it. But, we're not sure of any additional ramifications that might have on saving state.
And, it's not specific to just Android 2, though, this is mostly the case.
97% Android 2
1% Android 4
1% Android 3
1% Other
Any advice would be greatly appreciated.
Are you aware of any work arounds for this issue?
We considered explicitly setting the class loader during the saving of the state in hopes that might fix it. But, we're not sure of any additional ramifications that might have on saving state.
And, it's not specific to just Android 2, though, this is mostly the case.
97% Android 2
1% Android 4
1% Android 3
1% Other
Any advice would be greatly appreciated.
au...@google.com <au...@google.com> #12
Do you have a multi-dex setup? If so and RecyclerView is in the secondary dex, I guess this might happen.
The SavedState was not public on an earlier version of the library which could cause this issue but it is already fixed now (+ 23.1.1 should have it public).
Another thing to check might be the proguard setup to ensure that the SavedState class is not being stripped.
The SavedState was not public on an earlier version of the library which could cause this issue but it is already fixed now (+ 23.1.1 should have it public).
Another thing to check might be the proguard setup to ensure that the SavedState class is not being stripped.
lu...@gmail.com <lu...@gmail.com> #13
We're not currently using multidex and have these two lines in our proguard config:
-keep class android.support.design.widget.AppBarLayout$Behavior$SavedState { *; }
-keep class android.support.design.widget.CoordinatorLayout$SavedState { *; }
When looking through the mapping files, SavedState seems to be preserved. But, I could be misreading it.
-keep class android.support.design.widget.AppBarLayout$Behavior$SavedState { *; }
-keep class android.support.design.widget.CoordinatorLayout$SavedState { *; }
When looking through the mapping files, SavedState seems to be preserved. But, I could be misreading it.
cv...@gmail.com <cv...@gmail.com> #15
same problem as in the first message. this is my workaroud that works:
public class FixedNavigationView extends NavigationView {
public FixedNavigationView(Context context) {
super(context);
}
public FixedNavigationView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public FixedNavigationView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
final protected void onRestoreInstanceState(Parcelable savedState) {
if (savedState != null) {
SavedState state = (SavedState) savedState;
if (state.menuState != null)
state.menuState.setClassLoader(getContext().getClass().getClassLoader());
}
super.onRestoreInstanceState(savedState);
}
}
public class FixedNavigationView extends NavigationView {
public FixedNavigationView(Context context) {
super(context);
}
public FixedNavigationView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public FixedNavigationView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
final protected void onRestoreInstanceState(Parcelable savedState) {
if (savedState != null) {
SavedState state = (SavedState) savedState;
if (state.menuState != null)
state.menuState.setClassLoader(getContext().getClass().getClassLoader());
}
super.onRestoreInstanceState(savedState);
}
}
ra...@gmail.com <ra...@gmail.com> #16
I tried FixedNavigationView , but stil have android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.design.widget.AppBarLayout$Behavior$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
ra...@gmail.com <ra...@gmail.com> #17
try to fix in the same way AppBarLayout
ob...@gmail.com <ob...@gmail.com> #18
This class has a very different structure
gu...@gmail.com <gu...@gmail.com> #19
SavedState on AppBarLayout is protected contrary to NavigationView where it's public, so it's not possible to access it in the same way of the NavigationView fix.
And, where are having this issue not only on Adnroid 2, but also on 3, 4 and even Lolipop!
And, where are having this issue not only on Adnroid 2, but also on 3, 4 and even Lolipop!
gu...@gmail.com <gu...@gmail.com> #20
in android 2.3.6:
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.fabiano.ifprof/com.example.fabiano.ifprof.ShowFaltas}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v7.widget.RecyclerView$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v7.widget.RecyclerView$SavedState
at android.os.Parcel.readParcelable(Parcel.java:1958)
at android.os.Parcel.readValue(Parcel.java:1846)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2112)
at android.os.Parcel.readSparseArray(Parcel.java:1568)
at android.os.Parcel.readValue(Parcel.java:1903)
at android.os.Parcel.readMapInternal(Parcel.java:2083)
at android.os.Bundle.unparcel(Bundle.java:208)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167)
at android.support.design.internal.NavigationMenuPresenter.onRestoreInstanceState(NavigationMenuPresenter.java:175)
at android.support.v7.view.menu.MenuBuilder.dispatchRestoreInstanceState(MenuBuilder.java:349)
at android.support.v7.view.menu.MenuBuilder.restorePresenterStates(MenuBuilder.java:361)
at android.support.design.widget.NavigationView.onRestoreInstanceState(NavigationView.java:191)
at android.view.View.dispatchRestoreInstanceState(View.java:6278)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1211)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.View.restoreHierarchyState(View.java:6257)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1606)
at android.app.Activity.onRestoreInstanceState(Activity.java:847)
at android.app.Activity.performRestoreInstanceState(Activity.java:819)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1096)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1629)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.fabiano.ifprof/com.example.fabiano.ifprof.ShowFaltas}: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v7.widget.RecyclerView$SavedState
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.os.BadParcelableException: ClassNotFoundException when unmarshalling: android.support.v7.widget.RecyclerView$SavedState
at android.os.Parcel.readParcelable(Parcel.java:1958)
at android.os.Parcel.readValue(Parcel.java:1846)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2112)
at android.os.Parcel.readSparseArray(Parcel.java:1568)
at android.os.Parcel.readValue(Parcel.java:1903)
at android.os.Parcel.readMapInternal(Parcel.java:2083)
at android.os.Bundle.unparcel(Bundle.java:208)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167)
at android.support.design.internal.NavigationMenuPresenter.onRestoreInstanceState(NavigationMenuPresenter.java:175)
at android.support.v7.view.menu.MenuBuilder.dispatchRestoreInstanceState(MenuBuilder.java:349)
at android.support.v7.view.menu.MenuBuilder.restorePresenterStates(MenuBuilder.java:361)
at android.support.design.widget.NavigationView.onRestoreInstanceState(NavigationView.java:191)
at android.view.View.dispatchRestoreInstanceState(View.java:6278)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1211)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:1215)
at android.view.View.restoreHierarchyState(View.java:6257)
at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1606)
at android.app.Activity.onRestoreInstanceState(Activity.java:847)
at android.app.Activity.performRestoreInstanceState(Activity.java:819)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1096)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1629)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
Description
Version used: 23.2.0
Theme used: Theme.AppCompat.Light.NoActionBar
Devices/Android versions reproduced on: 4.4.4
Using a menu item with android.support.v7.widget.SearchView as actionViewClass and use an id resource as id, I encounter the following Unmarshalling exception during state restoration (with Don't keep activities option on):
E/AndroidRuntime(16968): FATAL EXCEPTION: main
E/AndroidRuntime(16968): Process: com.example, PID: 16968
E/AndroidRuntime(16968): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.example.MainActivity}: java.lang.RuntimeException: Parcel android.os.Parcel@528522a4: Unmarshalling unknown type code 44 at offset 252
E/AndroidRuntime(16968): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
E/AndroidRuntime(16968): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
E/AndroidRuntime(16968): at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime(16968): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime(16968): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(16968): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(16968): at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime(16968): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(16968): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(16968): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime(16968): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime(16968): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(16968): Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@528522a4: Unmarshalling unknown type code 44 at offset 252
E/AndroidRuntime(16968): at android.os.Parcel.readValue(Parcel.java:2080)
E/AndroidRuntime(16968): at android.os.Parcel.readSparseArrayInternal(Parcel.java:2363)
E/AndroidRuntime(16968): at android.os.Parcel.readSparseArray(Parcel.java:1735)
E/AndroidRuntime(16968): at android.os.Parcel.readValue(Parcel.java:2070)
E/AndroidRuntime(16968): at android.os.Parcel.readArrayMapInternal(Parcel.java:2314)
E/AndroidRuntime(16968): at android.os.Bundle.unparcel(Bundle.java:249)
E/AndroidRuntime(16968): at android.os.Bundle.getSparseParcelableArray(Bundle.java:1273)
E/AndroidRuntime(16968): at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:1741)
E/AndroidRuntime(16968): at android.app.Activity.onRestoreInstanceState(Activity.java:944)
E/AndroidRuntime(16968): at android.app.Activity.performRestoreInstanceState(Activity.java:916)
E/AndroidRuntime(16968): at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1138)
E/AndroidRuntime(16968): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
E/AndroidRuntime(16968): ... 11 more
This does not happen prior to 23.2.0 (e.g. 23.1.1). Replacing id resource with a new id (e.g. @+id/new_id) would also resolve this.
- Relevant code to trigger the issue:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="
xmlns:app="
<item android:id="@id/menu_search"
android:title="@string/search"
android:menuCategory="secondary"
app:actionViewClass="android.support.v7.widget.SearchView"
app:showAsAction="always" />
</menu>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item type="id" name="menu_search" />
</resources>
- Step to reproduce
1. Open activity
2. Pause activity (with Don't keep activity on to destroy it)
3. Resume activity
-> Encounter crash
I also attach a sample project that can reproduce this.