Skip to content
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

Proof of concept for investigation of "Cannot recycle a resource while it is still acquired" #5310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TWiStErRob
Copy link
Collaborator

Description

Trace asynchronous calls across Handler messages. It's probably not acceptable in its current form due to many allocations. I wonder how this could make it to production. Is there a way to "debug" Glide? Feature flag?

Motivation and Context

#4507 and #5211 have no idea why it's happening, this would highlight which part of the app is causing the issue.

@sjudd
Copy link
Collaborator

sjudd commented Oct 17, 2023

It could be done with a default off log tag that's checked once statically? You could avoid capturing the stack trace unless it's enabled.

@TWiStErRob
Copy link
Collaborator Author

TWiStErRob commented Oct 17, 2023

I think a Log tag is not enough, they need to deploy it to production so that they can get crash traces from real devices. And they can't execute adb shell setprop there. It's not reproducible in dev envs as I understood. Glide users need to control this explicitly to opt in.

@TWiStErRob
Copy link
Collaborator Author

Although a simple static boolean variable would work, I guess.

@sjudd
Copy link
Collaborator

sjudd commented Nov 3, 2023

Hmm for production use cases we could use the flags system, might be annoying to pipe it through, but once done you can read from some set of flag values during initialization to control this:

public GlideBuilder setLogRequestOrigins(boolean isEnabled) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants