Fixed
Status Update
Comments
fr...@gmail.com <fr...@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
fr...@gmail.com <fr...@gmail.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.
al...@gmail.com <al...@gmail.com> #4
Hi Please provide the sample project to reproduce the issue, Also our eng teams are not prioritizing changes on earlier releases.
sm...@gmail.com <sm...@gmail.com> #5
am...@google.com <am...@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
fr...@gmail.com <fr...@gmail.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>
fr...@gmail.com <fr...@gmail.com> #8
This is our #1 crash in crashlytics. Same behavior and types of crashes.
am...@google.com <am...@google.com> #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)
sm...@gmail.com <sm...@gmail.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+.
il...@google.com <il...@google.com>
al...@gmail.com <al...@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.
pe...@gmail.com <pe...@gmail.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.
dn...@google.com <dn...@google.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.
Description
Version used: 25.1.0
Devices/Android versions reproduced on:
Nexus 4 Nougat API 25
The issues happens when the MediaControllerCompat is created with the token of the a MediaSessionCompat which has its lifecycle bind to the application.
Here is the LeakCanary log:
In br.com.me.mediacontrollercompatreprocase:1.0:1.
* br.com.me.mediacontrollercompatreprocase.AnotherActivity has leaked:
* GC ROOT android.os.ResultReceiver$MyResultReceiver.this$0
* references android.support.v4.media.session.MediaControllerCompat$MediaControllerImplApi21$1.this$0 (anonymous subclass of android.os.ResultReceiver)
* references android.support.v4.media.session.MediaControllerCompat$MediaControllerImplApi24.mControllerObj
* references android.media.session.MediaController.mContext
* leaks br.com.me.mediacontrollercompatreprocase.AnotherActivity instance
* Retaining: 48 KB.
* Reference Key: c72cb728-7e92-4fce-959a-b2a856ea7af6
* Device: unknown Android Android SDK built for x86_64 sdk_google_phone_x86_64
* Android Version: 7.1 API: 25 LeakCanary: 1.5 00f37f5
* Durations: watch=5013ms, gc=112ms, heap dump=3237ms, analysis=18682ms
For more details, you could use the following sample to reproduce it.