Status Update
Comments
al...@android.com <al...@android.com>
am...@gmail.com <am...@gmail.com> #2
I'm also experiencing this with pretty much the same set up but on 6.0.1.
em...@evozi.com <em...@evozi.com> #3
[Comment deleted]
em...@evozi.com <em...@evozi.com> #4
This happens when we switch to 23.2 too, if users came back to the app activity it will crash. Disabling proguard doesn't solve this.
Reproduced using "don't keep activity options", found of that android.support.design.widget.TextInputLayout with @+id is causing this issue. Workaround by issue owner doesn't solve this.
Library used: design, support, appcompat-v7, cardview-v7
Version used: 23.2.0
Theme used: Theme.AppCompat.Light.NoActionBar
Devices/Android versions reproduced on: 5.1.1 and 6.0.1
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@278a9e87: Unmarshalling unknown type code 2131624163 at offset 684
at android.os.Parcel.readValue(Parcel.java:2228)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2546)
at android.os.Parcel.readSparseArray(Parcel.java:1874)
at android.os.Parcel.readValue(Parcel.java:2209)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2485)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:822)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:997)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1234)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:2041)
at android.support.v4.app.FragmentController.dispatchCreate(FragmentController.java:163)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:332)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:74)
at com.example.ui.MainActivity.onCreate(MainActivity.java:72)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2420)
at android.app.ActivityThread.access$900(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at
Reproduced using "don't keep activity options", found of that android.support.design.widget.TextInputLayout with @+id is causing this issue. Workaround by issue owner doesn't solve this.
Library used: design, support, appcompat-v7, cardview-v7
Version used: 23.2.0
Theme used: Theme.AppCompat.Light.NoActionBar
Devices/Android versions reproduced on: 5.1.1 and 6.0.1
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@278a9e87: Unmarshalling unknown type code 2131624163 at offset 684
at android.os.Parcel.readValue(Parcel.java:2228)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2546)
at android.os.Parcel.readSparseArray(Parcel.java:1874)
at android.os.Parcel.readValue(Parcel.java:2209)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2485)
at android.os.BaseBundle.unparcel(BaseBundle.java:221)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:822)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:997)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1234)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:2041)
at android.support.v4.app.FragmentController.dispatchCreate(FragmentController.java:163)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:332)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:74)
at com.example.ui.MainActivity.onCreate(MainActivity.java:72)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2420)
at android.app.ActivityThread.access$900(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
at
ne...@gmail.com <ne...@gmail.com> #5
me too today this happen to me when upgrade my app to appcomat 23.2.0 from 23.1.1
then i back again to 23.1.1
java.lang.RuntimeException: Unable to start activity ComponentInfo{thecoderx.mnf.islamicstoriesvoice/thecoderx.mnf.islamicstoriesvoice.SlidingTabItemsActivity}: java.lang.RuntimeException: Parcel android.os.Parcel@a887e55: Unmarshalling unknown type code 28 at offset 1708
1 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
2 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
3 at android.app.ActivityThread.access$900(ActivityThread.java:177)
4 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
5 at android.os.Handler.dispatchMessage(Handler.java:102)
6 at android.os.Looper.loop(Looper.java:145)
7 at android.app.ActivityThread.main(ActivityThread.java:5942)
8 at java.lang.reflect.Method.invoke(Native Method)
9 at java.lang.reflect.Method.invoke(Method.java:372)
10 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
11 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
12 Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@a887e55: Unmarshalling unknown type code 28 at offset 1708
13 at android.os.Parcel.readValue(Parcel.java:2222)
14 at android.os.Parcel.readSparseArrayInternal(Parcel.java:2540)
15 at android.os.Parcel.readSparseArray(Parcel.java:1868)
16 at android.os.Parcel.readValue(Parcel.java:2203)
17 at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
18 at android.os.BaseBundle.unparcel(BaseBundle.java:221)
19 at android.os.Bundle.getSparseParcelableArray(Bundle.java:871)
20 at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2165)
21 at android.app.Activity.onRestoreInstanceState(Activity.java:1092)
22 at android.app.Activity.performRestoreInstanceState(Activity.java:1037)
23 at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1175)
24 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2666)
25 ... 10 more
then i back again to 23.1.1
java.lang.RuntimeException: Unable to start activity ComponentInfo{thecoderx.mnf.islamicstoriesvoice/thecoderx.mnf.islamicstoriesvoice.SlidingTabItemsActivity}: java.lang.RuntimeException: Parcel android.os.Parcel@a887e55: Unmarshalling unknown type code 28 at offset 1708
1 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
2 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
3 at android.app.ActivityThread.access$900(ActivityThread.java:177)
4 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
5 at android.os.Handler.dispatchMessage(Handler.java:102)
6 at android.os.Looper.loop(Looper.java:145)
7 at android.app.ActivityThread.main(ActivityThread.java:5942)
8 at java.lang.reflect.Method.invoke(Native Method)
9 at java.lang.reflect.Method.invoke(Method.java:372)
10 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
11 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
12 Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@a887e55: Unmarshalling unknown type code 28 at offset 1708
13 at android.os.Parcel.readValue(Parcel.java:2222)
14 at android.os.Parcel.readSparseArrayInternal(Parcel.java:2540)
15 at android.os.Parcel.readSparseArray(Parcel.java:1868)
16 at android.os.Parcel.readValue(Parcel.java:2203)
17 at android.os.Parcel.readArrayMapInternal(Parcel.java:2479)
18 at android.os.BaseBundle.unparcel(BaseBundle.java:221)
19 at android.os.Bundle.getSparseParcelableArray(Bundle.java:871)
20 at com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2165)
21 at android.app.Activity.onRestoreInstanceState(Activity.java:1092)
22 at android.app.Activity.performRestoreInstanceState(Activity.java:1037)
23 at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1175)
24 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2666)
25 ... 10 more
au...@google.com <au...@google.com> #6
Thanks for the report, I'll look into this today. It is most likely caused by me adding new code to start saving expanded vs collapsed state of SearchView onSaveInstanceState.
au...@google.com <au...@google.com> #7
I missed adding Parcelable.Creator<SavedState> CREATOR to the SavedState. Fix in review.
ra...@ceptmysore.net <ra...@ceptmysore.net> #8
unmarshalling error screenshot attached
this happens when i enable "dont keep activities", "no background process" in developer option. app crashes when i return from another activity to mainActivity.
error i faced when i opened activity from fragment and when i returned back...
disable developer option,app works without any error
this happens when i enable "dont keep activities", "no background process" in developer option. app crashes when i return from another activity to mainActivity.
error i faced when i opened activity from fragment and when i returned back...
disable developer option,app works without any error
au...@google.com <au...@google.com> #10
Fix is in. It will be released with the next version of Android support library.
lu...@gmail.com <lu...@gmail.com> #11
Any idea when this will be released, or any workaround???
au...@google.com <au...@google.com> #12
The fix will come in 23.2.1 update which is coming soon.
lu...@gmail.com <lu...@gmail.com> #13
This is really, REALLY ugly, but since I can't rollback to 23.1.1 right now, it is better than having the app crashing on the users face.
public class HackySearchView extends android.support.v7.widget.SearchView {
public HackySearchView(Context context) {
super(context);
}
public HackySearchView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public HackySearchView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@SuppressLint("MissingSuperCall")
@Override
protected Parcelable onSaveInstanceState() {
addValueToPrivateFlags(0x00020000);
return BaseSavedState.EMPTY_STATE;
}
@SuppressLint("MissingSuperCall")
@Override
protected void onRestoreInstanceState(Parcelable state) {
addValueToPrivateFlags(0x00020000);
}
void addValueToPrivateFlags(int value) {
try {
Field f = View.class.getDeclaredField("mPrivateFlags");
f.setAccessible(true);
int oldValue = f.getInt(this);
f.setInt(this, oldValue | value);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
}
}
public class HackySearchView extends android.support.v7.widget.SearchView {
public HackySearchView(Context context) {
super(context);
}
public HackySearchView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public HackySearchView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@SuppressLint("MissingSuperCall")
@Override
protected Parcelable onSaveInstanceState() {
addValueToPrivateFlags(0x00020000);
return BaseSavedState.EMPTY_STATE;
}
@SuppressLint("MissingSuperCall")
@Override
protected void onRestoreInstanceState(Parcelable state) {
addValueToPrivateFlags(0x00020000);
}
void addValueToPrivateFlags(int value) {
try {
Field f = View.class.getDeclaredField("mPrivateFlags");
f.setAccessible(true);
int oldValue = f.getInt(this);
f.setInt(this, oldValue | value);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
}
}
cv...@gmail.com <cv...@gmail.com> #15
If this helps any, if you are supporting api 11 and higher (nothing before) you can use the non-support version of SearchView (that one doesn't have the bug).
ra...@gmail.com <ra...@gmail.com> #16
Hi auri...@google.com, I am facing a similar issue. Can you please let us know when the next update will be pushed for design support? This is getting really ugly with existing users. It took me 2 days to figure out what was happening. Updates such as this should be pushed out on priority.
ob...@gmail.com <ob...@gmail.com> #18
Getting the same issue on library 25.0. Is anyone having the solution?
gu...@gmail.com <gu...@gmail.com> #19
i am using 25.3.1
12-11 14:16:12.585 14868-14868/com.radityalabs.android E/AndroidRuntime: FATAL EXCEPTION: main
Process:com.radityalabs.android , PID: 14868
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.radityalabs.android/com.gojek.golife.location.LifeLocationPickerActivity }: java.lang.RuntimeException: Parcel android.os.Parcel@527f3a: Unmarshalling unknown type code 16777215 at offset 840
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@527f3a: Unmarshalling unknown type code 16777215 at offset 840
at android.os.Parcel.readValue(Parcel.java:2443)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2798)
at android.os.Parcel.readSparseArray(Parcel.java:2067)
at android.os.Parcel.readValue(Parcel.java:2421)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2717)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:910)
at com.android.internal.policy.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2129)
at android.app.Activity.onRestoreInstanceState(Activity.java:1047)
at android.app.Activity.performRestoreInstanceState(Activity.java:1002)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1174)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
12-11 14:16:12.585 14868-14868/
Process:
java.lang.RuntimeException: Unable to start activity ComponentInfo{
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@527f3a: Unmarshalling unknown type code 16777215 at offset 840
at android.os.Parcel.readValue(Parcel.java:2443)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2798)
at android.os.Parcel.readSparseArray(Parcel.java:2067)
at android.os.Parcel.readValue(Parcel.java:2421)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2717)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:910)
at com.android.internal.policy.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2129)
at android.app.Activity.onRestoreInstanceState(Activity.java:1047)
at android.app.Activity.performRestoreInstanceState(Activity.java:1002)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1174)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2619)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
gu...@gmail.com <gu...@gmail.com> #20
Hi, i fix this issue by implement onSavedInstance and onRestore but don't use super. This strange behavior
@Override
protected void onSaveInstanceState(Bundle outState) {
}
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
}
@Override
protected void onSaveInstanceState(Bundle outState) {
}
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
}
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.