Closed
Bug 728263
Opened 14 years ago
Closed 14 years ago
Errors occur when Fennec is closed
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox12 affected, blocking-fennec1.0 beta+, fennec13+)
VERIFIED
FIXED
Firefox 13
People
(Reporter: xti, Assigned: gbrown)
Details
Attachments
(1 file, 1 obsolete file)
|
3.67 KB,
patch
|
gbrown
:
review+
|
Details | Diff | Splinter Review |
Firefox 13.0a1 (2012-02-17)
20120217031227
http://hg.mozilla.org/mozilla-central/rev/2271cb92cc05
Device: Motorola Droid PRO
OS: Android 2.3.3
Steps to reproduce:
1. Open Fennec
2. Go to Menu > More > Quit
Expected results:
After step 2, no errors should occur.
Actual result:
The following errors occur:
02-17 17:00:42.018: E/ActivityThread(13964): Activity org.mozilla.fennec.App has leaked IntentReceiver android.accounts.AccountManager$12@40440540 that was originally registered here. Are you missing a call to unregisterReceiver()?
02-17 17:00:42.018: E/ActivityThread(13964): android.app.IntentReceiverLeaked: Activity org.mozilla.fennec.App has leaked IntentReceiver android.accounts.AccountManager$12@40440540 that was originally registered here. Are you missing a call to unregisterReceiver()?
02-17 17:00:42.018: E/ActivityThread(13964): at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:756)
02-17 17:00:42.018: E/ActivityThread(13964): at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:551)
02-17 17:00:42.018: E/ActivityThread(13964): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:874)
02-17 17:00:42.018: E/ActivityThread(13964): at android.app.ContextImpl.registerReceiver(ContextImpl.java:861)
02-17 17:00:42.018: E/ActivityThread(13964): at android.app.ContextImpl.registerReceiver(ContextImpl.java:855)
02-17 17:00:42.018: E/ActivityThread(13964): at android.accounts.AccountManager.addOnAccountsUpdatedListener(AccountManager.java:1712)
02-17 17:00:42.018: E/ActivityThread(13964): at org.mozilla.gecko.AboutHomeContent.init(AboutHomeContent.java:142)
02-17 17:00:42.018: E/ActivityThread(13964): at org.mozilla.gecko.GeckoApp$AboutHomeRunnable.run(GeckoApp.java:1165)
02-17 17:00:42.018: E/ActivityThread(13964): at android.os.Handler.handleCallback(Handler.java:587)
02-17 17:00:42.018: E/ActivityThread(13964): at android.os.Handler.dispatchMessage(Handler.java:92)
02-17 17:00:42.018: E/ActivityThread(13964): at android.os.Looper.loop(Looper.java:123)
02-17 17:00:42.018: E/ActivityThread(13964): at android.app.ActivityThread.main(ActivityThread.java:3806)
02-17 17:00:42.018: E/ActivityThread(13964): at java.lang.reflect.Method.invokeNative(Native Method)
02-17 17:00:42.018: E/ActivityThread(13964): at java.lang.reflect.Method.invoke(Method.java:507)
02-17 17:00:42.018: E/ActivityThread(13964): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-17 17:00:42.018: E/ActivityThread(13964): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-17 17:00:42.018: E/ActivityThread(13964): at dalvik.system.NativeStart.main(Native Method)
02-17 17:00:42.033: I/ActivityManager(1298): Process org.mozilla.fennec (pid 13964) has died.
http://pastebin.mozilla.org/1486279
Do you have sync setup?
| Reporter | ||
Comment 2•14 years ago
|
||
(In reply to Naoki Hirata :nhirata from comment #1)
> Do you have sync setup?
No, I used a clean profile for both Aurora and Nightly.
Updated•14 years ago
|
tracking-fennec: --- → ?
Updated•14 years ago
|
tracking-fennec: ? → 13+
Keywords: fennecnative-betablocker
Updated•14 years ago
|
blocking-fennec1.0: --- → beta+
Comment 3•14 years ago
|
||
You can easily reproduce this bug if you enable Android's "Developer options > Don't keep activities" setting.
| Assignee | ||
Updated•14 years ago
|
Assignee: nobody → gbrown
| Assignee | ||
Comment 4•14 years ago
|
||
android.accounts.AccountManager.addOnAccountsUpdatedListener is called from org.mozilla.gecko.AboutHomeContent.init(AboutHomeContent.java:142)
AccountManager.removeOnAccountsUpdatedListener is never called.
From the API doc for addOnAccountsUpdatedListener:
"As long as this listener is present, the AccountManager instance will not be garbage-collected, and neither will the Context used to retrieve it, which may be a large Activity instance. To avoid memory leaks, you must remove this listener before then. Normally listeners are added in an Activity or Service's onCreate(Bundle) and removed in onDestroy()."
| Assignee | ||
Comment 5•14 years ago
|
||
Attachment #604087 -
Flags: review?(mark.finkle)
Comment 6•14 years ago
|
||
Comment on attachment 604087 [details] [diff] [review]
patch to remove listener during onDestroy
> unregisterReceiver(mBatteryReceiver);
>+ if (mAboutHomeContent != null) {
>+ mAboutHomeContent.onDestroy();
>+ }
nit: add a blank line above the new code
Attachment #604087 -
Flags: review?(mark.finkle) → review+
| Assignee | ||
Comment 7•14 years ago
|
||
updated for nit; r=mfinkle
Attachment #604087 -
Attachment is obsolete: true
Attachment #604187 -
Flags: review+
| Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Comment 8•14 years ago
|
||
Keywords: checkin-needed
Comment 9•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Updated•14 years ago
|
status-firefox13:
affected → ---
Comment 10•14 years ago
|
||
Verified/fixed on:
Nightly Fennec 15.0a1 (2012-04-25)
Device: HTC Desire (Android 2.2.2)
Status: RESOLVED → VERIFIED
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•