Closed
Bug 850645
Opened 13 years ago
Closed 13 years ago
Unable to launch WebApps - Crash @ java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/org.mozilla.fennec/files/mozilla/webapp/browser.db
Categories
(Firefox for Android Graveyard :: Data Providers, defect)
Tracking
(firefox19 unaffected, firefox20 unaffected, firefox21 unaffected, firefox22 affected)
RESOLVED
DUPLICATE
of bug 844895
| Tracking | Status | |
|---|---|---|
| firefox19 | --- | unaffected |
| firefox20 | --- | unaffected |
| firefox21 | --- | unaffected |
| firefox22 | --- | affected |
People
(Reporter: aaronmt, Unassigned)
Details
(Keywords: crash, regression, reproducible, Whiteboard: [native-crash])
Attachments
(1 file, 1 obsolete file)
|
12.02 KB,
text/plain
|
Details |
D/GeckoDBUtils( 6057): Database is locked, trying to kill any zombie processes: /data/data/org.mozilla.fennec/files/mozilla/ki37kaux.webapp0/browser.db
I/Process ( 6057): Sending signal. PID: 6116 SIG: 9
I/Process ( 6057): Sending signal. PID: 6125 SIG: 9
I/Process ( 6057): Sending signal. PID: 6256 SIG: 9
W/dalvikvm( 6057): threadid=10: thread exiting with uncaught exception (group=0x40c63930)
E/GeckoAppShell( 6057): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 365 ("GeckoBackgroundThread")
E/GeckoAppShell( 6057): java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/org.mozilla.fennec/files/mozilla/ki37kaux.webapp0/browser.db
E/GeckoAppShell( 6057): at android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55)
E/GeckoAppShell( 6057): at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1534)
E/GeckoAppShell( 6057): at android.database.sqlite.SQLiteDatabase.update(SQLiteDatabase.java:1514)
E/GeckoAppShell( 6057): at org.mozilla.fennec.db.BrowserProvider.updateFaviconIdsForUrl(BrowserProvider.java:2911)
E/GeckoAppShell( 6057): at org.mozilla.fennec.db.BrowserProvider.insertFavicon(BrowserProvider.java:2945)
E/GeckoAppShell( 6057): at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.createFavicon(BrowserProvider.java:1118)
E/GeckoAppShell( 6057): at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper.access$100(BrowserProvider.java:375)
E/GeckoAppShell( 6057): at org.mozilla.fennec.db.BrowserProvider$DatabaseHelper$2.run(BrowserProvider.java:1083)
E/GeckoAppShell( 6057): at android.os.Handler.handleCallback(Handler.java:725)
E/GeckoAppShell( 6057): at android.os.Handler.dispatchMessage(Handler.java:92)
E/GeckoAppShell( 6057): at android.os.Looper.loop(Looper.java:137)
E/GeckoAppShell( 6057): at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:32)
E/Gecko ( 6057): mozalloc_abort: Redirecting call to abort() to mozalloc_abort
i) Install Twitter from Firefox Marketplace
ii) Launch Twitter from the Android
| Reporter | ||
Comment 1•13 years ago
|
||
Severity: normal → critical
| Reporter | ||
Comment 2•13 years ago
|
||
| Reporter | ||
Updated•13 years ago
|
Summary: java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/org.mozilla.fennec/files/mozilla/webapp/browser.db → Unable to launch WebApps - Crash @ java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: /data/data/org.mozilla.fennec/files/mozilla/webapp/browser.db
| Reporter | ||
Updated•13 years ago
|
status-firefox19:
--- → unaffected
status-firefox20:
--- → unaffected
status-firefox21:
--- → unaffected
| Reporter | ||
Updated•13 years ago
|
Keywords: regression,
regressionwindow-wanted
| Reporter | ||
Comment 3•13 years ago
|
||
Launching an installed WebApp with fennec fully forced-stopped works
| Reporter | ||
Comment 5•13 years ago
|
||
Last working good build on m-c
20130307030926
http://hg.mozilla.org/mozilla-central/rev/ee4879719f78
Unfortunately bug 849539 from builds afterwards is obscuring attempts to narrow this
| Reporter | ||
Comment 6•13 years ago
|
||
First known bad build on m-c that has lets you get further in web-app startup with bug 849539
20130312031046
http://hg.mozilla.org/mozilla-central/rev/7433bc4545c9
Kind of big, anything stick out? http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ee4879719f78&tochange=7433bc4545c9
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
| Reporter | ||
Updated•13 years ago
|
Flags: needinfo?(wjohnston)
Keywords: regressionwindow-wanted
Comment 8•13 years ago
|
||
I think the problem here is that SqliteDBConnection implements its own ref counting. When the db moves out of scope in the first thread, we move its refcount to zero. When the background thread tries to use the safe db reference to create favicons, it fails here:
http://androidxref.com/4.2.2_r1/xref/frameworks/base/core/java/android/database/sqlite/SQLiteClosable.java#52
This just forces us to acquire a fresh db reference in the favicon creation code. Alternatively, we could play with calling acquireReference ourselves as an alternative.
Attachment #727296 -
Flags: review?(lucasr.at.mozilla)
Comment 9•13 years ago
|
||
This bug is closed. The patch should be attach to bug 844895.
Comment 10•13 years ago
|
||
Comment on attachment 727296 [details] [diff] [review]
Patch
Review of attachment 727296 [details] [diff] [review]:
-----------------------------------------------------------------
Not on your patch but spawning db writing tasks on a separate thread from onCreate() looks rather risky...
Anyway, looks good. I just wonder if there's a chance that the SQLiteOpenHelper is disposed before the background task runs (which could cause a crash on this new getWritableDatabase() call).
Attachment #727296 -
Flags: review?(lucasr.at.mozilla) → review+
Updated•13 years ago
|
Attachment #727296 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
tracking-fennec: ? → ---
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
•