You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a long period of non-stop running (more than 48 hrs and the S3TransferUtility uploads 1 photo per minute on average), the exception came out of nowhere. Apparently I failed to catch this exception which caused the crash of the app (this following exception was shown by setting DefaultUncaughtExceptionHandler )
What is this exception? How to fix it? Or at least where to catch this exception so that the app would not crash?
Thank you!
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@3a5f74be rejected from java.util.concurrent.ThreadPoolExecutor@392ac91f[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 106] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1339) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:103) at com.amazonaws.mobileconnectors.s3.transferutility.TransferThreadPool.submitTask(TransferThreadPool.java:46) at com.amazonaws.mobileconnectors.s3.transferutility.TransferRecord.start(TransferRecord.java:160) at com.amazonaws.mobileconnectors.s3.transferutility.TransferService.execCommand(TransferService.java:284) at com.amazonaws.mobileconnectors.s3.transferutility.TransferService$UpdateHandler.handleMessage(TransferService.java:220) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:155) at android.os.HandlerThread.run(HandlerThread.java:61)
The text was updated successfully, but these errors were encountered:
RejectedExecutionException can happen when a new task is added to ThreadPoolExecutor on one of these scenarios:
ThreadPoolExecutor is shutting down.
ThreadPoolExecutor is full and can't handle more tasks.
The stack trace says ThreadPoolExecutor is shutting down, so it's the first case. This is a rare race condition when a transfer is initiated while TransferService stops itself and terminates ThreadPoolExecutor after being idle for a minute. I label this as bug and will fix it ASAP.
Thanks for torturing the SDK :). Any other findings?
To whom it may concern,
I use the SDK version 2.2.13
After a long period of non-stop running (more than 48 hrs and the S3TransferUtility uploads 1 photo per minute on average), the exception came out of nowhere. Apparently I failed to catch this exception which caused the crash of the app (this following exception was shown by setting DefaultUncaughtExceptionHandler )
What is this exception? How to fix it? Or at least where to catch this exception so that the app would not crash?
Thank you!
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@3a5f74be rejected from java.util.concurrent.ThreadPoolExecutor@392ac91f[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 106] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1339) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:103) at com.amazonaws.mobileconnectors.s3.transferutility.TransferThreadPool.submitTask(TransferThreadPool.java:46) at com.amazonaws.mobileconnectors.s3.transferutility.TransferRecord.start(TransferRecord.java:160) at com.amazonaws.mobileconnectors.s3.transferutility.TransferService.execCommand(TransferService.java:284) at com.amazonaws.mobileconnectors.s3.transferutility.TransferService$UpdateHandler.handleMessage(TransferService.java:220) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:155) at android.os.HandlerThread.run(HandlerThread.java:61)
The text was updated successfully, but these errors were encountered: