Closed
Bug 782607
Opened 14 years ago
Closed 14 years ago
Strict mode violation with message Explicit termination method 'end' not called @ BrowserApp.java:575
Categories
(Firefox for Android Graveyard :: General, defect, P3)
Tracking
(firefox16-, firefox17-, fennec+)
RESOLVED
FIXED
Firefox 18
People
(Reporter: thomas, Unassigned)
Details
Attachments
(2 files)
|
164.34 KB,
text/plain
|
Details | |
|
1.24 KB,
patch
|
cpeterson
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:17.0) Gecko/17.0 Firefox/17.0
Build ID: 20120801080436
Steps to reproduce:
1. Browse http://news.thomasy.tw/m/9/#/m/
2. Click scroll down and click the any link.
3. Click Back button at upper left corner.
4. repeat step 2 if it is not crash.
Actual results:
it will crash with backtrace
I/GeckoApp( 2451): Got message: Content:LocationChange
I/GeckoApp( 2451): URI - http://news.thomasy.tw/m/#/m/group/tw.bbs.kulu.EE_104
D/GeckoTab( 2451): Updated URL for tab with id: 1
I/GeckoApp( 2451): Return
D/dalvikvm( 2451): GC_CONCURRENT freed 1451K, 17% free 13576K/16199K, paused 6ms+30ms
E/StrictMode( 2451): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
E/StrictMode( 2451): java.lang.Throwable: Explicit termination method 'end' not called
E/StrictMode( 2451): at dalvik.system.CloseGuard.open(CloseGuard.java:184)
E/StrictMode( 2451): at java.util.zip.Inflater.<init>(Inflater.java:82)
E/StrictMode( 2451): at java.util.zip.ZipFile.getInputStream(ZipFile.java:270)
E/StrictMode( 2451): at java.util.jar.JarFile.getInputStream(JarFile.java:388)
E/StrictMode( 2451): at libcore.net.url.JarURLConnectionImpl.getInputStream(JarURLConnectionImpl.java:226)
E/StrictMode( 2451): at java.net.URLConnection$DefaultContentHandler.getContent(URLConnection.java:1045)
E/StrictMode( 2451): at java.net.URLConnection.getContent(URLConnection.java:203)
E/StrictMode( 2451): at libcore.net.url.JarURLConnectionImpl.getContent(JarURLConnectionImpl.java:309)
E/StrictMode( 2451): at java.net.URL.getContent(URL.java:447)
E/StrictMode( 2451): at org.mozilla.gecko.BrowserApp$14.run(BrowserApp.java:575)
E/StrictMode( 2451): at android.os.Handler.handleCallback(Handler.java:605)
E/StrictMode( 2451): at android.os.Handler.dispatchMessage(Handler.java:92)
E/StrictMode( 2451): at android.os.Looper.loop(Looper.java:137)
E/StrictMode( 2451): at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31)
I/GeckoApp( 2451): Return
I/GeckoApp( 2451): Return
Expected results:
Should show the page
Comment on attachment 651706 [details]
3.log
Full crash log
Comment 2•14 years ago
|
||
I dont see a crash.
I see a strict mode violation.
Summary: Crash with message Explicit termination method 'end' not called @ BrowserApp.java:575 → Strict mode violation with message Explicit termination method 'end' not called @ BrowserApp.java:575
Comment 3•14 years ago
|
||
Without crash signatures we don't have info on the volume here so not tracking. If more info becomes available that shows this to be a topcrasher, or a reproducible crash please re-nom.
Comment 4•14 years ago
|
||
Thomasy, which Android device are you testing? The log suggests you are using some sort of Sony Ericsson phone.
I was not able to reproduce the StrictMode warning on my Galaxy Nexus.
Updated•14 years ago
|
OS: Linux → Android
Priority: -- → P3
Hardware: x86 → ARM
Updated•14 years ago
|
Assignee: nobody → cpeterson
tracking-fennec: ? → +
Comment 6•14 years ago
|
||
Sriram, you forgot to close() the InputStream here:
https://hg.mozilla.org/mozilla-central/annotate/ee7a3bddfe5f/mobile/android/base/BrowserApp.java#l650
Updated•14 years ago
|
Assignee: cpeterson → nobody
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 8•14 years ago
|
||
Comment on attachment 657344 [details] [diff] [review]
Patch
Review of attachment 657344 [details] [diff] [review]:
-----------------------------------------------------------------
r+ if you move the is.close into a finally{} block.
::: mobile/android/base/BrowserApp.java
@@ +649,5 @@
> URL url = new URL(icon);
> InputStream is = (InputStream) url.getContent();
> Drawable drawable = Drawable.createFromStream(is, "src");
> item.setIcon(drawable);
> + is.close();
You should move is.close() to a finally{} block within the try{}, in case createFromStream() or setIcon() throw an exception. Something like:
try {
URL url = new URL(icon);
InputStream is = (InputStream) url.getContent();
try {
Drawable drawable = Drawable.createFromStream(is, "src");
item.setIcon(drawable);
} finally {
is.close();
}
} catch (Exception e) {
Attachment #657344 -
Flags: review?(cpeterson) → review+
Comment 9•14 years ago
|
||
Comment 10•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
| Assignee | ||
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
•