-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalStateException in OnDestroy() "Failed to remove target from managers" #2262
Comments
Do you see this every time your Activity is destroyed? Or only sometimes? If you could reproduce this in a sample app it would be much easier for me to investigate. I agree this crash shouldn't happen. |
I did not see this every time the activity was destroyed. I do believe it is a race condition. Unfortunately, I am pressed for time and just reverted to the old version of Glide I was using. |
I updated to Glide 4.1.1 today, just to test if this is fixed. Unfortunately, I still get a crash with v4. Not the same one though.
|
any fixes for this? |
Let me know if you find a way to reproduce it. |
I get the |
I have issue same jonasborggren with version 4.2.0
|
I encountered the first crash ( |
@JustinTipton and @jonasborggren that's a different issue than the one reported here, please file a new issue. |
@acvt007 are you using a retained fragment? |
Yes, i use retained fragment. |
Thanks, and @JustinTipton same question, in your original report were you using a retained fragment? |
I'll also try one more time with a retained fragment myself. If anyone has a reproducible case of this they can share, especially a sample app, I'd appreciate it. If anyone who can reproduce this could share their Glide load line(s) that would help too (and any custom Target implementations). |
The crash is fixed by 8119837, but anyone experiencing this crash has another bug and/or memory leak. If you're seeing this crash it means that you have a case where you're starting a request with a RequestManager whose Activity or Fragment has already been destroyed. That could happen if you pass a RequestManager into an AsyncTask or other background thread. It could also happen if you reference the Activity RequestManager in a retained Fragment (via Glide.with(getContext()) or Glide.with(getActivity())). This change will prevent this particular crash, but we may add an assertion here to make it clear that it's unsafe to start loads on destroyed RequestManagers in a future version of Glide. |
Bug still reproducing in v4.9.0 - how fix it??? In my case I have 3 fragments(F1, F2, F3) in my activity (A1). Glide load urls in items of recyclerview in F2. Crash happens when backpressed from F3->F2->F1->exit from app. It seem a long bug in glide since v4. |
I am trying to migrate from v3 to v4 and I'm running into an error I cannot seem to solve. Perhaps it is a bug in 4.0
I have seven fragments containing list views, each is using Glide to load images, and all are tied to the same activity. I'm using "Glide.with(Fragment)" for each fragment.
In the activity onDestroy, I'm seeing the following crash, which is weird, because I've done my best to not call "Glide.with(Activity)". Either way, I wouldn't expect this exception.
The text was updated successfully, but these errors were encountered: