-
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.get fails if PackageManager IPC fails #684
Comments
The right long term solution is to switch to using an annotation processor (at compile time), rather than trying to pull entries from the manifest. Unfortunately that won't happen in 3.6, though I may try to take a look at it in 4.0 (pull requests always welcome). I could add a try/catch for Glide 3, but then sometimes Glide will behave differently than users expect. It would be fine if no modules were registered, as in your case, but the only way we can tell whether or not modules are present is using the manifest. We could also add a method that would disable the manifest parser for apps that don't use modules, but that would largely defeat the purpose of lazily loading Glide (you'd need to call it in your Application object probably, and even then concurrency makes it hard to guarantee). Any thoughts? |
@sjudd I agree with a simple patch for 3.x if they want that. Something like a static According to the javadoc of |
@TWiStErRob There can be if you have a ContentProvider that uses Glide. It's still probably better than nothing... |
Yep - I'd prefer a short term solution of disabling modules, and an annotation processor in the long term. |
Hello again - we are still seeing this crash in production several thousand times a day. Any chance I can get a |
Feel free to put up a small PR, it would be very welcome. Quick question though to rule out a false negative: you do initialize Glide after Also see #1742! |
Yes, in our RE: #1742 - Cool! I hadn't seen that. Not sure I want to wait for v4 though. I'll see about putting up a PR later this week if I have time! |
PackageManager has a failure mode where it throws a RuntimeException with "Package manager has died" when IPC calls fail. We see this in the Dropbox app quite frequently. In our internal calls to PackageManager we are careful to catch this RuntimeException and handle it in cases where we can.
Unfortunately, adding Glide to our dependency list has started showing crashes with this stack:
For some reason not quite clear to me, we don't see this on anything above 4.4.4.
The request here would be to have a reasonable fallback when PackageManager is unavailable, or a way for apps to opt out of manifest scanning to pick up custom modules, since we don't use any.
The text was updated successfully, but these errors were encountered: