The type code is a prefix in the data stream that tells Parcelable the
type of data that follows.
See Parcel.java, method readValue(), around lines 1700-1800.
All the codes are small numbers, between -1 and 24. The code in your
logcat is much larger.
This can be caused by data being read in a different order than it's
been written. For example:
parcel.writeInt(...)
parcel.writeString()
...
parcel.readString()
parcel.readInt()
It can also be caused by data corruption of some sort, for some reason.
You don't seem to be using parcel directly, but still, maybe this can
give you some more ideas.
There is a call to Activity.onRestoreInstanceState, so there is a
parcelable (bundle) involved here.
-- Kostya
18.05.2011 12:49, Namrata пишет:
@Zsolt thanks for replying..but I didn't understand what are you
saying, can u plz explain it in detail?
On May 18, 12:42 pm, Zsolt Vasvari<[email protected]> wrote:
The stack trace you are showing doesn't seem to involve your intent
extras. It appears to be restoring the state of your screen when it's
crashing.
On May 18, 3:35 pm, Namrata<[email protected]> wrote:
Hi,
I have one activity A with requires few values passed in intent. Those
values are of type boolean& int array. I am passing these these
values from activity B in intent as intent.putExtra(key1, boolean)&
intent.putExtra(key2, int[]). In activity A I am reading it as
Intent i = getIntent();
Bundle b = i.getExtras();
boolean flag = b.getBoolean(key1);
int[] array = b.getIntArray(key2);
It works perfect all the time but there is one case where it throws
exception
java.lang.RuntimeException: Parcel android.os.Parcel@4611b4a8:
Unmarshalling unknown type code 2131427514 at offset 456
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2787)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2803)
at android.app.ActivityThread.access$2300(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:
2136)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.RuntimeException: Parcel
android.os.Parcel@4611b4a8: Unmarshalling unknown type code 2131427514
at offset 456
at android.os.Parcel.readValue(Parcel.java:1838)
at android.os.Parcel.readSparseArrayInternal(Parcel.java:2037)
at android.os.Parcel.readSparseArray(Parcel.java:1493)
at android.os.Parcel.readValue(Parcel.java:1828)
at android.os.Parcel.readMapInternal(Parcel.java:2008)
at android.os.Bundle.unparcel(Bundle.java:208)
at android.os.Bundle.getSparseParcelableArray(Bundle.java:1167)
at
com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState(PhoneWindow.java:
1493)
at android.app.Activity.onRestoreInstanceState(Activity.java:850)
at android.app.Activity.performRestoreInstanceState(Activity.java:822)
at
android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:
1142)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2765)
... 11 more
I dont have exact reproducible steps for this, but this is very
annoying, what to do?
Thanks in advance
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en