简体   繁体   中英

TransactionTooLargeException when onSaveInstanceState called

It Seems happened when onSaveInstanceState called.

Both Android 8.1 and 9.0 deveices have this problem.

How to solves this?

Thanks a lot!

13404-10 02:49:44.606 16580 16580 E JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 527472)

13504-10 02:49:44.606 16580 16580 W ActivityStopInfo: Bundle stats:

13604-10 02:49:44.606 16580 16580 W ActivityStopInfo: android:viewHierarchyState [size=2104]

13704-10 02:49:44.607 16580 16580 W ActivityStopInfo: android:views [size=2000]

13804-10 02:49:44.620 16580 16580 W ActivityStopInfo: android:support:fragments [size=524484]

13904-10 02:49:44.620 16580 16580 W ActivityStopInfo: PersistableBundle stats:

14004-10 02:49:44.620 16580 16580 W ActivityStopInfo: [null]

14104-10 02:49:44.620 16580 16580 D AndroidRuntime: Shutting down VM 142--------- beginning of crash

14304-10 02:49:44.621 16580 16580 E AndroidRuntime: FATAL EXCEPTION: main

14404-10 02:49:44.621 16580 16580 E AndroidRuntime: Process: com.cwj.hsing, PID: 16580

14504-10 02:49:44.621 16580 16580 E AndroidRuntime: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 527472 bytes

14604-10 02:49:44.621 16580 16580 E AndroidRuntime: at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:160)

14704-10 02:49:44.621 16580 16580 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:873)

14804-10 02:49:44.621 16580 16580 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)

14904-10 02:49:44.621 16580 16580 E AndroidRuntime: at android.os.Looper.loop(Looper.java:280)

15004-10 02:49:44.621 16580 16580 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6706)

15104-10 02:49:44.621 16580 16580 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)

15204-10 02:49:44.621 16580 16580 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)

15304-10 02:49:44.621 16580 16580 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

15404-10 02:49:44.621 16580 16580 E AndroidRuntime: Caused by: android.os.TransactionTooLargeException: data parcel size 527472 bytes

15504-10 02:49:44.621 16580 16580 E AndroidRuntime: at android.os.BinderProxy.transactNative(Native Method)

15604-10 02:49:44.621 16580 16580 E AndroidRuntime: at android.os.BinderProxy.transact(Binder.java:1127)

15704-10 02:49:44.621 16580 16580 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:4011)

15804-10 02:49:44.621 16580 16580 E AndroidRuntime: at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:144)

15904-10 02:49:44.621 16580 16580 E AndroidRuntime: ... 7 more

Bundle transaction null will be OK! if you donnot need save bundleData,you can do it like this!

 @Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(new Bundle());
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM