-
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
Glide behaves differently with support library 26.1.0 #2881
Comments
Support library issues sound like #2730. The timeout exception may be happening if you're nesting requests because doing so can lead to deadlock depending on the number of threads Glide has available. If you want to nest requests, make sure your nested requests always apply |
I don't have anything in code that differentiates between debug and release builds, still all nested glide reqeusts fail if I use support lib v26.1.0 in release and all nested glide requests succeed if I simply build the app in debug... |
I've finally removed my usage of Now I have found out that I can reproduce the proguard setup
rules
All I do is changing the above proguard rules from default to optimised and I already see the issue. I compiled my app with each config twice and always see the same results... |
What is in Interestingly glide/library/src/main/java/com/bumptech/glide/request/RequestFutureTarget.java Lines 198 to 219 in 17c1c3d
I wonder if there's an optimization that's stripping the while loop? |
|
Do I have to make sure that my nested requests are thread safe? Could this be a problem? Could those lock out each other? My app will likely try to load multiple requests with sub requests at once, is glide taking care of this? |
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions. |
I am experiencing the same issue. Any resolution on it so far? the only difference between the optimized proguard file for android and the normal is that the optimized has the optimize parameter set, the other doesn't use optimization. So it is hard to determine what exactly is going wrong here :/ |
Currently I've disabled In the end, it's not the optimised for me but something in proguard minifying my code, as far as I can tell. I only found one thing, that may help you: Be careful with Maybe this helps you, I had not yet time to investigate this deeper
|
As you asked and I had sime time now it seems to be this issue for me. My issue + solution is written here: https://github.com/serso/android-checkout/issues/139 After this change, I could just create an optimised proguarded app that loads nested images as well (I clear glide's cache therefore and test it this way). That this is working for my device is no proof so far, if I remeber correctly, I had issues with some devices only, but I will try this new setup soon and check if this solves the issue on other devices as well |
Big thank you for the provided information! I ran into the same issue that I let proguard remove the |
Sorry I missed this and thank you for the detailed follow up @MFlisar, super helpful! |
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions. |
Glide Version: 4.5
Integration libraries: none
Device/Android Version:
Issue details / Repro steps / Use case background:
Short introduction
I'm using glide and all my dependencies normally like following:
Then I add my own version to my project and am done. This works fine of course.
Currently I have an issue after upgrading from support library 26.1.0 to 27.0.2 (including target and build sdk 26 => 27). If I proguard my app I get
Cannot instantiate class: android.support.v7.widget.SearchView
exceptions (on some devices only) suddenly although my proguard file contains-keep class android.support.v7.widget.SearchView { *; }
. I don't know how to solve this because imho this should be solved by the proguard line and it was solved like this in the past and I can't find anything new for this issue for the new support library or similar and can't solve this issue currently.Summary
android.support.v7.widget.SearchView
, so app crashes anywayUsage
I wanted to reuse my old code which worked with targets, so I created an
InstantTarget
to execute image loads synchronously (class is here: https://gist.github.com/MFlisar/5808cba2d6d970552e67d862a715e981).I use it like following (ALL my requests run through this final function):
And my loader looks like following:
Problem
When I use support library 26.1.0 and make a release build, I see following behaviour: all my nested reqeusts fail with a
TimeoutException
(what they don't do in debug!). Exception looks like following:Any ideas how I could solve this issue? Or why I see different behaviour between debug and release builds? Glide only uses the
SupportFragment
from the support libraries, correct? There should not be any issues just because I use 26.1.0 support libraryThe text was updated successfully, but these errors were encountered: