cuplv / TraceRunner

Tool for generating dynamic traces of android applications.
3 stars 0 forks source link

Threadpool for logging instrumentation terminates before we finish logging on crashing traces #19

Open ftc opened 7 years ago

ftc commented 7 years ago

If we have a callback that is called synchronously within a callin that throws an exception then the threadpool is shut down too soon resulting in a further logging of an exception exit to cause a threadpool error.

Trace

Process crashed while executing testButton(com.peilunzhang.contractiontimerdistilled.TraceCrash):
java.util.concurrent.RejectedExecutionException: Task edu.colorado.plv.tracerunner_runtime_instrumentation.LogDat@a862854 rejected from java.util.concurrent.ThreadPoolExecutor@71eaba7[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 5052]
    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2014)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:794)
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1340)
    at edu.colorado.plv.tracerunner_runtime_instrumentation.TraceRunnerRuntimeInstrumentation.logException(TraceRunnerRuntimeInstrumentation.java:69)
    at com.peilunzhang.contractiontimerdistilled.CountdownFragment$1.onFinish(CountdownFragment.java)
    at android.os.CountDownTimer$1.handleMessage(CountDownTimer.java:127)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5417)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

This is currently not a major issue as we are only verifying non crashing traces but it should be fixed at some point.