Closed
Bug 709331
Opened 13 years ago
Closed 13 years ago
AndroidBrowserDB.updateThumbnailForUrl() resource leak because ContentResolver cursor was not closed
Categories
(Firefox for Android Graveyard :: General, defect, P1)
Tracking
(fennec11+)
RESOLVED
INVALID
Tracking | Status | |
---|---|---|
fennec | 11+ | --- |
People
(Reporter: cpeterson, Assigned: lucasr)
Details
Using a Nightly or local build with Android StrictMode enabled, logcat reports AndroidBrowserDB.updateThumbnailForUrl() does not close a ContentResolver cursor. I can repro these warnings on ICS, but not Gingerbread. E/StrictMode( 2332): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks. E/StrictMode( 2332): java.lang.Throwable: Explicit termination method 'close' not called E/StrictMode( 2332): at dalvik.system.CloseGuard.open(CloseGuard.java:184) E/StrictMode( 2332): at android.content.ContentResolver$CursorWrapperInner.<init>(ContentResolver.java:1581) E/StrictMode( 2332): at android.content.ContentResolver.query(ContentResolver.java:320) E/StrictMode( 2332): at org.mozilla.gecko.db.AndroidBrowserDB.updateThumbnailForUrl(AndroidBrowserDB.java:234) E/StrictMode( 2332): at org.mozilla.gecko.db.BrowserDB.updateThumbnailForUrl(BrowserDB.java:138) E/StrictMode( 2332): at org.mozilla.gecko.Tab.saveThumbnailToDB(Tab.java:383) E/StrictMode( 2332): at org.mozilla.gecko.Tab.access$100(Tab.java:58) E/StrictMode( 2332): at org.mozilla.gecko.Tab$1.run(Tab.java:146) E/StrictMode( 2332): at android.os.Handler.handleCallback(Handler.java:605) E/StrictMode( 2332): at android.os.Handler.dispatchMessage(Handler.java:92) E/StrictMode( 2332): at android.os.Looper.loop(Looper.java:137) E/StrictMode( 2332): at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:153) W/CursorWrapperInner( 2332): Cursor finalized without prior close()
Reporter | ||
Comment 1•13 years ago
|
||
You may need to apply the StrictMode patches from bug 708114 to repro the warnings.
Reporter | ||
Comment 2•13 years ago
|
||
This StrictMode warning is logged for every page load.
Updated•13 years ago
|
Assignee: nobody → lucasr.at.mozilla
Priority: -- → P1
Assignee | ||
Comment 3•13 years ago
|
||
The method to update thumbnail on DB doesn't use cursors anymore (see bug 707732). Closing.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Updated•13 years ago
|
tracking-fennec: --- → 11+
Updated•3 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
•