Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with sharing large terminal transcript #1166

Closed
ghost opened this issue Jun 24, 2019 · 2 comments
Closed

Problems with sharing large terminal transcript #1166

ghost opened this issue Jun 24, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 24, 2019

Problem description
When trying to share a large terminal transcript, application may do nothing or even crash.

It seems like Android puts some limits on data sent with intent. From experiments, it seems that max possible transcript size is around 128 KB.

Steps to reproduce

  1. Open new session.

  2. Fill console with some data. For example:

    dd if=/dev/zero bs=1M count=1 | tr '\0' 'A'
    
  3. From context menu click on button "Share transcript".

Expected behavior

Application should be able to share the transcript regardless of content size.
If it is not possible to send whole transcript, it can be truncated to the reasonable size.

Additional information

Android log:

06-25 00:15:19.048 21822 21822 E JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 2051700)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: FATAL EXCEPTION: main
06-25 00:15:19.053 21822 21822 E AndroidRuntime: Process: com.termux, PID: 21822
06-25 00:15:19.053 21822 21822 E AndroidRuntime: java.lang.RuntimeException: Failure from system
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1624)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.app.Activity.startActivityForResult(Activity.java:4564)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.app.Activity.startActivityForResult(Activity.java:4522)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.app.Activity.startActivity(Activity.java:4883)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.app.Activity.startActivity(Activity.java:4851)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.termux.app.TermuxActivity.onContextItemSelected(SourceFile:28)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.app.Activity.onMenuItemSelected(Activity.java:3547)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.android.internal.policy.PhoneWindow$PhoneWindowMenuCallback.onMenuItemSelected(PhoneWindow.java:3996)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:761)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:172)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:908)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:898)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.android.internal.view.menu.MenuDialogHelper.onClick(MenuDialogHelper.java:178)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1269)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.widget.AdapterView.performItemClick(AdapterView.java:350)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.widget.AbsListView.performItemClick(AbsListView.java:1683)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.widget.AbsListView$PerformClick.run(AbsListView.java:4094)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.widget.AbsListView$10.run(AbsListView.java:6583)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:789)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:98)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6944)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: Caused by: android.os.TransactionTooLargeException: data parcel size 2051700 bytes
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.os.BinderProxy.transactNative(Native Method)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.os.BinderProxy.transact(Binder.java:761)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.app.IActivityManager$Stub$Proxy.startActivity(IActivityManager.java:4883)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1617)
06-25 00:15:19.053 21822 21822 E AndroidRuntime: 	... 24 more
@ghost
Copy link
Author

ghost commented Aug 4, 2019

Fixed in 445da0c + 370ac2b.

@ghost ghost closed this as completed Aug 4, 2019
@diehard88
Copy link

@xeffyr .... thx!

@termux termux locked and limited conversation to collaborators Oct 17, 2021
AdamMickiewich pushed a commit to VolyaTeam/dzida-app that referenced this issue Aug 8, 2022
shrihankp pushed a commit to reisxd/termux-app that referenced this issue Oct 20, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants