I work with a rather complicated data editing activity in Android, which often uses the package object when saving form data.
In general, this works very well, and I have not experienced data loss. However, I have a strange intermittent error that I cannot find a direct cause.
This happens when I send an intention to the gallery (using startActivityForResult) so that the user can select a profile image. A small (96x96) bitmap is returned in the kit, and I save this data in their profile. This works flawlessly in about 90% of cases, but in some cases, instead of returning with the image saved in the kit, it returns a package that cannot be analyzed. This happens quite often if I leave the device in gallery mode for a few minutes. (> 5 minutes idle).
When I try to access any package functionality, I get the following runtime exception:
java.lang.RuntimeException: Parcel android.os.Parcel@44a06078 : Unmarshalling unknown code type -8913000 at offset 392
Notes: o When this error occurs, a message appears stating that the editing action has been destroyed and needs to be recreated. (Before an error occurs, it progresses through onCreate, onStart and onRestoreInstanceState (where the accident occurs)). o It looks like it skips the "onActivityResult" section (or at least never reaches this. o The bundle object received on onRestoreInstanceState is not null, but any other access to the object (including checking for an empty one) results o this failure. o Checking the source code of the bundle, I found out that the crash comes from a package that checks the internal type using the saved flag. An error occurs when the int flag appears with a type not in the list (until now it was always - 8913000). O I saw this error only on froyo (2.2)
- ? - , ?
, -, , .