Closed Bug 1241460 Opened 8 years ago Closed 3 years ago

LeakCanary: GeckoAppShell.sContextGetter leaks BrowserApp instance?

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: sebastian, Unassigned)

References

Details

Attachments

(2 files)

With "Don't keep activities" enabled in the Developer settings and after leaving the application I get the following leak report from LeakCanary.

> BrowserApp has leaked 1.6 MB
> 
> In org.mozilla.fennec_sebastian:46.0a1:2015396385.
> * org.mozilla.gecko.BrowserApp has leaked:
> * GC ROOT static org.mozilla.gecko.GeckoAppShell.sContextGetter
> * leaks org.mozilla.gecko.BrowserApp instance
> 
> * Retaining: 1.6 MB.
> * Reference Key: dc9818a4-5e60-4ed5-ac1b-0e8af85dc081
> * Device: Huawei google Nexus 6P angler
> * Android Version: 6.0.1 API: 23 LeakCanary: 1.4-beta1 02804f3
> * Durations: watch=5014ms, gc=124ms, heap dump=5843ms, analysis=38043ms
In GeckoApp we always set the instance in onCreate():
https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java#1221

So the leak should "only" exist as long as the app is paused.
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: