dejavu89
dejavu89

Reputation: 754

Parcel unmarshalling unknown types

so I am completely stumped by this error and it is different from other questions out there since I am not using any Parcel Object. Would appreciate any lead since I don't even know where to start as it does not point to any class or method or line in my code.

Fatal Exception: java.lang.RuntimeException
Unable to start activity ComponentInfo{com.blueinklabs.investifystocks.free/com.blueinklabs.investifystocks.MainActivity}: java.lang.RuntimeException: Parcel android.os.Parcel@3b18145e: Unmarshalling unknown type code 3801188 at offset 3396
 raw
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2658)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2723)
android.app.ActivityThread.access$900 (ActivityThread.java:172)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1422)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:145)
android.app.ActivityThread.main (ActivityThread.java:5832)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1399)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1194)

Continued:

Caused by java.lang.RuntimeException
android.os.Parcel.readValue (Parcel.java:2222)
android.os.Parcel.readArrayMapInternal (Parcel.java:2479)
android.os.BaseBundle.unparcel (BaseBundle.java:221)
android.os.Bundle.getSparseParcelableArray (Bundle.java:871)
com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState (PhoneWindow.java:2156)
android.app.Activity.onRestoreInstanceState (Activity.java:1082)
android.app.Activity.performRestoreInstanceState (Activity.java:1027)
android.app.Instrumentation.callActivityOnRestoreInstanceState (Instrumentation.java:1175)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2631)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2723)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1194)

EDIT: 1) I have the following Broadcast receiver for IAB:

 mBroadcastReceiver = new IabBroadcastReceiver(MainActivity.this);
 IntentFilter broadcastFilter = new IntentFilter(IabBroadcastReceiver.ACTION);
 registerReceiver(mBroadcastReceiver, broadcastFilter);

2) I have recently added Fabric.io for their Crashlytics library (I'm being reported the error through Crashlytics, so it might be i was facing errors before but were not being reported in the Google Play crashes)

3) Following is my method for receiving intents from Alarms. But I see errors all over the day and not necessarily during the time when these intents are triggered.

@Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
    //Log.e("THIS", "IS RUNNING");
    NotificationManager notifManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
    notifManager.cancelAll();

    String myString = intent.getStringExtra(EXTRA_WHICH);
    if (myString != null) {
        if (myString.equals("MORNING")) {
            //Log.e("HEY", "FROM MORNING NOTI");
            String settingsString = intent.getStringExtra(EXTRA_SETTINGS);
            if (settingsString != null) {
                if (settingsString.equals("YES")) {
                    Intent newIntent = new Intent(MainActivity.this, SettingsActivity.class);
                    startActivity(newIntent);
                }
            }

        } else {
            //Log.e("HEY", "FROM EVENING NOTI");
            String settingsString = intent.getStringExtra(EXTRA_SETTINGS);
            if (settingsString != null) {
                if (settingsString.equals("YES")) {
                    Intent newIntent = new Intent(MainActivity.this, SettingsActivity.class);
                    startActivity(newIntent);
                }
            } else {
                String myStringMovers = intent.getStringExtra(EXTRA_MOVERS);
                //Log.e("HEY", myStringMovers);
                if (myStringMovers.equals("YES")) {
                    myViewPager.setCurrentItem(1);
                    Intent newIntent = new Intent(MainActivity.this, IndexDetailActivity.class);
                    newIntent.putExtra(IndexDetailActivity.EXTRA_NAME, "KSE100");
                    newIntent.putExtra(IndexDetailActivity.EXTRA_FULLNAME, "KSE 100 INDEX");
                    startActivityForResult(newIntent, 111);
                } else {
                    myViewPager.setCurrentItem(1);
                }
            }
        }
    }
}

Upvotes: 1

Views: 1199

Answers (2)

raditya gumay
raditya gumay

Reputation: 3011

i fixed by this workaround, dont implements callback.

@Override
protected void onSaveInstanceState(Bundle outState) {}

@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {}

Upvotes: 2

dejavu89
dejavu89

Reputation: 754

So I figured this was an issue which was probably occurring due to the latest Android Design Support Library 23.2.0.

Please see the relevant code issue here:

https://code.google.com/p/android/issues/detail?id=201836

Upvotes: 0

Related Questions