-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Leak in EditText #650
Comments
Looks like you're referencing an EditText from an AsyncTask and leaking Context. If this is still happening, can you provide the snippet of code? |
No response. Please re-open if you see this issue again and can provide more info. |
FYI: This was analyzed in this issue: intercom/intercom-android#368, and it seems like this is the leak inside a |
I get this leak too. It caused internally by TextView's AsyncTask Perhaps this should be added to the exclusions file. +1 Update This happens from time to time and a simple empty EditText can also cause the leak. I guess it's probably because network issues. Exclude it by replacing LeakCanary.refWatcher(this)
.excludedRefs(AndroidExcludedRefs.createAppDefaults()
.instanceField("android.widget.TextView$3", "this$0")
.build())
.buildAndInstall() |
I've been messing with this leak this whole week and finally, I have enough evidence to say that
A better option would be to put it in
|
@jrodbx Please re-open the issue
|
@Guneetgstar can you provide a small reproducible sample? |
Simple just use an
|
@Guneetgstar The leaktrace you provided is very different from the leaktrace the original author had provided, this is a different issue. It's also likely a different issue from the link you provided to the google tracker (input method manager has many leaks) Can you open a new issue with the info you provided so that we can close that one back? The next step will likely be to add a reference matcher. |
Sure the leak traces are different and before opening a new issue I want to show you the leak traces I just added in README.md of the sample project that reproduces the issue, it's again a different trace but it refers to the issue whose link I added in my last comment. So if it's about the different leak traces than I must open two new issues now but the thing is both the leak traces were produced doing the same thing, with README.md trace giving more info. |
Ha! Thanks for that, I had missed the readme. See this?
It means the two leaks that were found were correctly identified by leakcanary as "library leaks", ie known android leaks. I'm not sure what else we should do here? |
(note: we should probably make it clearer in the leaktrace what app vs lib leaks are) |
I can see clearly that this leak is identified by LeakCanary and although, with that huge description and links in it this should be clear to everyone.
|
@pyricau What I wanted to convey with README.md is that both the leak trace in README.md and the leak trace I posted here is due to the same library leaks because I am trying to do the same thing in both the applications but the traces are different. Isn't that possible because I also tested both application on higher versions where the leak is fixed and it's not identified there in both the apps? |
Yes it's likely these are two different leaks, they're just both triggered by the same actions. As for reporting library leaks, LeakCanary has no way to know until the analysis is performed. If we stopped reporting them then devs would be confused, asking what happened with the leak. Also, library leaks can indeed by fixed, though it's harder. For instance by using reflection or finding other ways to cause the leak to clear. |
I have following leak on Android 6.0.1 on Moto G4.
In com.czh.share:0.0.1:1.
The text was updated successfully, but these errors were encountered: