3

I'm using in my app several libraries from android support and i update them when they are available.

During the test of the version 23.2.0, i've got a crash when i change the app permissions on android 6. As you know, when the user disable a permission, the app is recreated (same way as when the device rotate) and your parcelable objects are saved and restored from a bundle.

With the version 23.2.0, when the app is recreated, i've got a parcel error. I think that this error is not from my code but from the android code. I don't have this error when i use the libraries version 23.1.1 or lower.

Here is a dump :

E/AndroidRuntime: FATAL EXCEPTION: main Process: org.team.acs.scubalog, PID: 15378 java.lang.RuntimeException: Unable to start activity ComponentInfo{org.team.acs.scubalog/org.team.acs.scubalog.MainActivity}: java.lang.RuntimeException: Parcel android.os.Parcel@3a99bef: Unmarshalling unknown type code 3801188 at offset 2452 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.RuntimeException: Parcel android.os.Parcel@3a99bef: Unmarshalling unknown type code 3801188 at offset 2452 at android.os.Parcel.readValue(Parcel.java:2340) at android.os.Parcel.readArrayMapInternal(Parcel.java:2614) at android.os.BaseBundle.unparcel(BaseBundle.java:221) at android.os.Bundle.getSparseParcelableArray(Bundle.java:856) at com.android.internal.policy.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2033) at android.app.Activity.onRestoreInstanceState(Activity.java:1008) at android.app.Activity.performRestoreInstanceState(Activity.java:963) at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1163) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2389) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5417)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

After investigation, the libraries which produce this error are

com.android.support:appcompat-v7:23.2.0 AND com.android.support:design:23.2.0

If i use the version 23.1.1 => no crash.

Any idea about this crash ?

acs-team
  • 602
  • 6
  • 14
  • sasikumar : Which part of my code do you want ? ;) unfortunately, i don't know where investigate... :/ – acs-team Feb 26 '16 at 09:18
  • IntelliJ Amiya : I already saw this post. The crash is different. My app works very well except when i change the permission on android 6 and higher. In the post they speak about a crash in the api 17 and not 22. In my case it crash only with the api 23. – acs-team Feb 26 '16 at 09:23
  • @acs-team: I got a similar (maybe?) issue and posted it here: http://stackoverflow.com/questions/35652481/unmarshalling-unknown-type-code-6881391-at-offset-4752-after-upgrading-to-suppor. – henrykodev Feb 26 '16 at 13:06
  • 2
    https://code.google.com/p/android/issues/detail?id=201836 – xDragonZ Feb 26 '16 at 17:20
  • Thanks guys !!! Just wait the version 23.2.1 ! ;) – acs-team Feb 27 '16 at 08:33
  • Even I am facing the exact Unmarshalling unknown type code 3801188 error – dejavu89 Mar 07 '16 at 10:24
  • check this: http://stackoverflow.com/questions/35897517/unmarshalling-unknown-type-code-exception-while-resuming/35938623#35938623 – Andy Mar 14 '16 at 05:33

1 Answers1

0

Bug is fixed on support library 23.2.1

Ref: App with SearchView crashing on restore

Community
  • 1
  • 1
Jack Fan
  • 2,143
  • 3
  • 18
  • 25