android / android/android-test
Crash when sending error stack trace with view dump
- Dominant language
- Java
- Stars
- 1.2k
- Forks
- 342
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 2
Description
### Description
Instrumentation Crash when sending stack trace with view dump
### Steps to Reproduce
When there are multiple recyclerview in backstack on the same activity, and a check/click fails Espresso produces a stack trace and gets recorded in test results. This sending of stack trace and view dump becomes too large and causes a crash.
`java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1061820 bytes
at android.app.ActivityThread.finishInstrumentation(ActivityThread.java:7699)
at android.app.Instrumentation.finish(Instrumentation.java:270)
at androidx.test.runner.MonitoringInstrumentation.finish(MonitoringInstrumentation.java:420)
at androidx.test.runner.AndroidJUnitRunner.finish(AndroidJUnitRunner.java:463)
at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:452)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2261)
Caused by: android.os.TransactionTooLargeException: data parcel size 1061820 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(BinderProxy.java:635)
at android.app.IActivityManager$Stub$Proxy.finishInstrumentation(IActivityManager.java:7314)
at android.app.ActivityThread.finishInstrumentation(ActivityThread.java:7697)
at android.app.Instrumentation.finish(Instrumentation.java:270)
at androidx.test.runner.MonitoringInstrumentation.finish(MonitoringInstrumentation.java:420)
at androidx.test.runner.AndroidJUnitRunner.finish(AndroidJUnitRunner.java:463)
at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:452)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2261) `
### Expected Results
Instrumentation should not crash
### Actual Results
Instrumentation Crashes
### AndroidX Test and Android OS Versions
Version: 3.4.0, Android 12
Contributor guide
Research direction
Reproduce the failure with multiple RecyclerViews in the back stack on one activity, then trace how AndroidJUnitRunner, MonitoringInstrumentation, and ActivityThread.finishInstrumentation send the stack trace and view dump. Done means the instrumentation completes without TransactionTooLargeException while preserving the test result information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100