Fixed
Status Update
Comments
bl...@google.com <bl...@google.com> #2
The issue can be reproduced without even using intents or activities:
Parcel parcel = Parcel.obtain();
// put a custom parcelable class in a bundle
Bundle bundle = new Bundle();
MyCustomParcelable custom = new MyCustomParcelable();
bundle.putParcelable("KEY", custom);
// parcel the bundle itself
bundle.writeToParcel(parcel, 0);
// read the bundle from parcel
parcel.setDataPosition(0);
Bundle bundle2 = Bundle.CREATOR.createFromParcel(parcel);
// read custom parcelable class from bundle again
MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
-> This throws an exception:
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.MyCustomParcelable
at android.os.Parcel.readParcelableCreator(Parcel.java:2536)
at android.os.Parcel.readParcelable(Parcel.java:2462)
at android.os.Parcel.readValue(Parcel.java:2365)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2732)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.Bundle.getParcelable(Bundle.java:864)
-> Workaround:
After bundle2 has been read, but before custom parcelable object is read from bundle2, insert this line:
bundle2.setClassLoader(getClass().getClassLoader());
Parcel parcel = Parcel.obtain();
// put a custom parcelable class in a bundle
Bundle bundle = new Bundle();
MyCustomParcelable custom = new MyCustomParcelable();
bundle.putParcelable("KEY", custom);
// parcel the bundle itself
bundle.writeToParcel(parcel, 0);
// read the bundle from parcel
parcel.setDataPosition(0);
Bundle bundle2 = Bundle.CREATOR.createFromParcel(parcel);
// read custom parcelable class from bundle again
MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
-> This throws an exception:
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.example.MyCustomParcelable
at android.os.Parcel.readParcelableCreator(Parcel.java:2536)
at android.os.Parcel.readParcelable(Parcel.java:2462)
at android.os.Parcel.readValue(Parcel.java:2365)
at android.os.Parcel.readArrayMapInternal(Parcel.java:2732)
at android.os.BaseBundle.unparcel(BaseBundle.java:269)
at android.os.Bundle.getParcelable(Bundle.java:864)
-> Workaround:
After bundle2 has been read, but before custom parcelable object is read from bundle2, insert this line:
bundle2.setClassLoader(getClass().getClassLoader());
al...@google.com <al...@google.com> #3
It would be nice, even if this is not fixed quickly, that a google engineer
would explain what is hard in fixing the bug.
Thanks in advance, and thanks a lot for this example @pe..
2018-01-19 9:54 GMT-08:00 <buganizer-system@google.com>:
would explain what is hard in fixing the bug.
Thanks in advance, and thanks a lot for this example @pe..
2018-01-19 9:54 GMT-08:00 <buganizer-system@google.com>:
va...@google.com <va...@google.com> #4
> MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
You're missing a call to setClassLoader() before trying to deserialize the class:
> bundle2.setClassLoader(MyCustomParcelable.class.getClassLoader());
> MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
You're missing a call to setClassLoader() before trying to deserialize the class:
> bundle2.setClassLoader(MyCustomParcelable.class.getClassLoader());
> MyCustomParcelable custom2 = bundle2.getParcelable("KEY");
va...@google.com <va...@google.com> #5
Thank you for your feedback. We assure you that we are doing our best to address all issues reported. For now, we will be closing the issue as won't fix obsolete. If this issue currently still exists, we request that you log a new issue along with the bug report here https://goo.gl/TbMiIO and reference this bug for context.
va...@google.com <va...@google.com> #7
if the flake rate is high, i can backport the fix to our tree. otherwise, it'll get picked up when we do the next version bump. i assumed the flake rate was low.
va...@google.com <va...@google.com> #9
there's an upgrade going to the CQ now that should fix it
ap...@google.com <ap...@google.com> #10
Project: chromiumos/overlays/chromiumos-overlay
Branch: main
commit 4a9037cd9fc517c4c0d87e3f3dda8dd5b7ebce67
Author: Mike Frysinger <vapier@chromium.org>
Date: Tue Nov 02 00:34:31 2021
sandbox: bump to 2.29
BUG=b:204404822
TEST=CQ passes
Change-Id: I586cf7f17585d1f264cc26f651f340d6af3a5d05
Reviewed-on:https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/3256437
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
D sys-apps/sandbox/files/sandbox-2.27-symlink-toctou.patch
M sys-apps/sandbox/sandbox-2.29.ebuild
M sys-apps/sandbox/Manifest
https://chromium-review.googlesource.com/3256437
Branch: main
commit 4a9037cd9fc517c4c0d87e3f3dda8dd5b7ebce67
Author: Mike Frysinger <vapier@chromium.org>
Date: Tue Nov 02 00:34:31 2021
sandbox: bump to 2.29
BUG=b:204404822
TEST=CQ passes
Change-Id: I586cf7f17585d1f264cc26f651f340d6af3a5d05
Reviewed-on:
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
D sys-apps/sandbox/files/sandbox-2.27-symlink-toctou.patch
M sys-apps/sandbox/sandbox-2.29.ebuild
M sys-apps/sandbox/Manifest
Description
Builder arm-generic-kernel-v4_14-postsubmit in the chromeos failed.https://ci.chromium.org/ui/b/8832241188418810113 .https://ci.chromium.org/p/chromeos/builders/postsubmit/arm-generic-kernel-v4_14-postsubmit .
The build results can be found at
Recent results for the builder can be found at