{"action":"created","issue":{"url":"https://api.github.com/repos/bumptech/glide/issues/3235","repository_url":"https://api.github.com/repos/bumptech/glide","labels_url":"https://api.github.com/repos/bumptech/glide/issues/3235/labels{/name}","comments_url":"https://api.github.com/repos/bumptech/glide/issues/3235/comments","events_url":"https://api.github.com/repos/bumptech/glide/issues/3235/events","html_url":"https://github.com/bumptech/glide/issues/3235","id":345511956,"node_id":"MDU6SXNzdWUzNDU1MTE5NTY=","number":3235,"title":"Rare RejectedExecutionException","user":{"login":"Tolriq","id":932609,"node_id":"MDQ6VXNlcjkzMjYwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/932609?v=4","gravatar_id":"","url":"https://api.github.com/users/Tolriq","html_url":"https://github.com/Tolriq","followers_url":"https://api.github.com/users/Tolriq/followers","following_url":"https://api.github.com/users/Tolriq/following{/other_user}","gists_url":"https://api.github.com/users/Tolriq/gists{/gist_id}","starred_url":"https://api.github.com/users/Tolriq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tolriq/subscriptions","organizations_url":"https://api.github.com/users/Tolriq/orgs","repos_url":"https://api.github.com/users/Tolriq/repos","events_url":"https://api.github.com/users/Tolriq/events{/privacy}","received_events_url":"https://api.github.com/users/Tolriq/received_events","type":"User","site_admin":false},"labels":[{"id":46953960,"node_id":"MDU6TGFiZWw0Njk1Mzk2MA==","url":"https://api.github.com/repos/bumptech/glide/labels/question","name":"question","color":"d4c5f9","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-07-29T08:12:04Z","updated_at":"2018-08-28T15:40:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Glide 4.7.1\r\n\r\nGot some really rare crash where Glide is trying to send task to a terminated executor.\r\nCan't reproduce for the moment, but since it's fully inside Glide I suppose adding a !isTerminated could reduce that, but no idea of the side effects.\r\n\r\n@sjudd \r\n\r\n```\r\nCaused by java.util.concurrent.RejectedExecutionException: Task com.a.a.c.b.j@86fdb73 rejected from java.util.concurrent.ThreadPoolExecutor@6ff2ff[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 99]\r\n       at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2078)\r\n       at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:843)\r\n       at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1389)\r\n       at com.bumptech.glide.load.engine.executor.GlideExecutor.execute(GlideExecutor.java:268)\r\n       at com.bumptech.glide.request.SingleRequest.com.bumptech.glide.load.engine.EngineJob.start(SingleRequest.java:22120)\r\n       at com.bumptech.glide.request.target.ViewTarget.com.bumptech.glide.request.target.ViewTarget$SizeDeterminer.getSize(ViewTarget.java:1383)\r\n       at com.bumptech.glide.request.SingleRequest.begin(SingleRequest.java:264)\r\n       at com.bumptech.glide.RequestManager.com.bumptech.glide.manager.RequestTracker.resumeRequests(RequestManager.java:4124)\r\n       at com.bumptech.glide.manager.ActivityFragmentLifecycle.onStart(ActivityFragmentLifecycle.java:51)\r\n       at com.bumptech.glide.manager.SupportRequestManagerFragment.onStart(SupportRequestManagerFragment.java:182)\r\n       at android.support.v4.app.Fragment.performStart(Fragment.java:2372)\r\n       at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1467)\r\n       at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1759)\r\n       at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1827)\r\n       at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3244)\r\n       at android.support.v4.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:3206)\r\n       at android.support.v4.app.Fragment.performStart(Fragment.java:2378)\r\n       at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1467)\r\n       at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1759)\r\n       at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1827)\r\n       at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3244)\r\n       at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:3212)\r\n       at android.support.v4.app.FragmentActivity.android.support.v4.app.FragmentController.dispatchResume(FragmentActivity.java:9217)\r\n       at android.support.v4.app.FragmentActivity.onPostResume(FragmentActivity.java:498)\r\n       at android.support.v7.app.AppCompatActivity.onPostResume(AppCompatActivity.java:171)\r\n       at android.app.Activity.performResume(Activity.java:7368)\r\n       at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3763)\r\n       at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3828)\r\n       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1746)\r\n       at android.os.Handler.dispatchMessage(Handler.java:105)\r\n       at android.os.Looper.loop(Looper.java:164)\r\n       at android.app.ActivityThread.main(ActivityThread.java:6938)\r\n       at java.lang.reflect.Method.invoke(Method.java)\r\n       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)\r\n       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)\r\n```"},"comment":{"url":"https://api.github.com/repos/bumptech/glide/issues/comments/416635256","html_url":"https://github.com/bumptech/glide/issues/3235#issuecomment-416635256","issue_url":"https://api.github.com/repos/bumptech/glide/issues/3235","id":416635256,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjYzNTI1Ng==","user":{"login":"sjudd","id":1627211,"node_id":"MDQ6VXNlcjE2MjcyMTE=","avatar_url":"https://avatars3.githubusercontent.com/u/1627211?v=4","gravatar_id":"","url":"https://api.github.com/users/sjudd","html_url":"https://github.com/sjudd","followers_url":"https://api.github.com/users/sjudd/followers","following_url":"https://api.github.com/users/sjudd/following{/other_user}","gists_url":"https://api.github.com/users/sjudd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjudd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjudd/subscriptions","organizations_url":"https://api.github.com/users/sjudd/orgs","repos_url":"https://api.github.com/users/sjudd/repos","events_url":"https://api.github.com/users/sjudd/events{/privacy}","received_events_url":"https://api.github.com/users/sjudd/received_events","type":"User","site_admin":false},"created_at":"2018-08-28T15:40:28Z","updated_at":"2018-08-28T15:40:28Z","author_association":"MEMBER","body":"Sorry I missed this. \r\n\r\nIf you're using tearDown outside of tests I can't really guarantee much. tearDown is pretty aggressive about trying to stop threads to try to make sure that emulator tests are consistent. \r\n\r\nIf you have suggestions for how to improve the tearDown methods themselves, I'm ok with it. I don't want to build support for re-creating Glide outside of visiblefortesting methods."}}
{"actor":{"display_login":"sjudd"}}