pedrovgs / Lynx

Lynx is an Android library created to show a custom view with all the information Android logcat is printing, different traces of different levels will be rendererd to show from log messages to your application exceptions. You can filter this traces, share your logcat to other apps, configure the max number of traces to show or the sampling rate used by the library.
Apache License 2.0
780 stars 94 forks source link

Crash when sharing traces #25

Closed stkent closed 7 years ago

stkent commented 8 years ago

Library version: 1.6 Android version: 6.0.1

Fatal Exception: java.lang.RuntimeException: Failure from system
       at android.app.Instrumentation.execStartActivity(Instrumentation.java:1547)
       at android.app.Activity.startActivityForResult(Activity.java:4283)
       at android.app.Activity.startActivityForResult(Activity.java:4230)
       at android.app.Activity.startActivity(Activity.java:4567)
       at android.app.Activity.startActivity(Activity.java:4535)
       at com.github.pedrovgs.lynx.LynxView.shareTraces(LynxView.java:185)
       at com.github.pedrovgs.lynx.presenter.LynxPresenter.onShareButtonClicked(LynxPresenter.java:120)
       at com.github.pedrovgs.lynx.LynxView$3.onClick(LynxView.java:321)
       at android.view.View.performClick(View.java:5702)
       at android.view.View$PerformClick.run(View.java:22546)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:158)
       at android.app.ActivityThread.main(ActivityThread.java:7237)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by android.os.TransactionTooLargeException: data parcel size 1541076 bytes
       at android.os.BinderProxy.transactNative(Binder.java)
       at android.os.BinderProxy.transact(Binder.java:503)
       at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:3130)
       at android.app.Instrumentation.execStartActivity(Instrumentation.java:1540)
       at android.app.Activity.startActivityForResult(Activity.java:4283)
       at android.app.Activity.startActivityForResult(Activity.java:4230)
       at android.app.Activity.startActivity(Activity.java:4567)
       at android.app.Activity.startActivity(Activity.java:4535)
       at com.github.pedrovgs.lynx.LynxView.shareTraces(LynxView.java:185)
       at com.github.pedrovgs.lynx.presenter.LynxPresenter.onShareButtonClicked(LynxPresenter.java:120)
       at com.github.pedrovgs.lynx.LynxView$3.onClick(LynxView.java:321)
       at android.view.View.performClick(View.java:5702)
       at android.view.View$PerformClick.run(View.java:22546)
       at android.os.Handler.handleCallback(Handler.java:739)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:158)
       at android.app.ActivityThread.main(ActivityThread.java:7237)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
pedrovgs commented 7 years ago

Thanks for reporting the bug @stkent :)

It seems something related to the size of the logs you are trying to share. Look at the trace: TransactionTooLargeException: data parcel size 1541076 bytes. We should review the android documentation and check the size of the traces before to send the intent.

This could be a nice issue for someone trying to help with the repository :)

stkent commented 7 years ago

Thanks for the thoughts, @pedrovgs! I'm not familiar enough with the internals of your library to be able to put up a quick fix, and since we only include it in testing versions of our application I probably won't have dedicated time to circle back. Wanted to report it at least :) Cheers!

Emeritus-DarranKelinske commented 7 years ago

Getting this too :)