Last Comment Bug 716089 - Crash on startup: malformed query in local DB history query
: Crash on startup: malformed query in local DB history query
Status: RESOLVED FIXED
[native-crash][inbound]
: crash
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: ARM Android
: P1 critical (vote)
: Firefox 12
Assigned To: Lucas Rocha (:lucasr)
:
Mentors:
Depends on:
Blocks: 707150 710392
  Show dependency treegraph
 
Reported: 2012-01-06 14:39 PST by Richard Newman [:rnewman]
Modified: 2012-01-19 03:56 PST (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
11+


Attachments
Fix query syntax for filtering URLs on local DB (1.91 KB, patch)
2012-01-09 03:24 PST, Lucas Rocha (:lucasr)
blassey.bugs: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Review

Description Richard Newman [:rnewman] 2012-01-06 14:39:51 PST
Throwing this at you, lucasr. Please redirect if someone else can fix it sooner!

I have a patch applied that switches to using local DB. See try build:

https://tbpl.mozilla.org/?tree=Try&rev=9e860976a737

Log here:

http://rnewman.pastebin.mozilla.org/1437403

 FATAL EXCEPTION: GeckoLooper Thread
 android.database.sqlite.SQLiteException: near "(": syntax error: , while compiling: SELECT _id, url, title, favicon, thumbnail FROM history_with_images WHERE ((deleted = 0) AND ((url NOT LIKE ? )(url LIKE ? OR title LIKE ?))) ORDER BY visits * MAX(1, (date - 1325889145182) / 86400000 + 120) DESC LIMIT 4
     at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
     at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:64)
     at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:143)
     at android.database.sqlite.SQLiteProgram.compileAndbindAllArgs(SQLiteProgram.java:361)
     at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:127)
     at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:94)
     at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:51)
     at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47)
     at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1573)
     at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:354)
     at org.mozilla.fennec_rnewman.db.BrowserProvider.query(BrowserProvider.java:939)
     at android.content.ContentProvider$Transport.query(ContentProvider.java:178)
     at android.content.ContentResolver.query(ContentResolver.java:310)
     at org.mozilla.gecko.db.LocalBrowserDB.filter(LocalBrowserDB.java:85)
     at org.mozilla.gecko.db.BrowserDB.filter(BrowserDB.java:92)
     at org.mozilla.gecko.AboutHomeContent$4.run(AboutHomeContent.java:171)
Comment 1 Lucas Rocha (:lucasr) 2012-01-09 03:24:11 PST
Created attachment 586946 [details] [diff] [review]
Fix query syntax for filtering URLs on local DB

Regression caused by patch in bug 710392.
Comment 2 Richard Newman [:rnewman] 2012-01-10 09:10:55 PST
Inbound:

https://hg.mozilla.org/integration/mozilla-inbound/rev/9fb4756a6cbc
Comment 3 Richard Newman [:rnewman] 2012-01-10 09:12:33 PST
Ugh, cleared tracking fields. Fail.
Comment 4 Ed Morley [:emorley] 2012-01-10 18:51:34 PST
https://hg.mozilla.org/mozilla-central/rev/9fb4756a6cbc
Comment 5 Lucas Rocha (:lucasr) 2012-01-12 03:09:20 PST
Comment on attachment 586946 [details] [diff] [review]
Fix query syntax for filtering URLs on local DB

Fix a serious crash on startup when using local DB (which is enabled now).
Comment 6 Alex Keybl [:akeybl] 2012-01-12 22:25:43 PST
Comment on attachment 586946 [details] [diff] [review]
Fix query syntax for filtering URLs on local DB

[Triage Comment]
Mobile only - approving for Aurora.
Comment 7 Lucas Rocha (:lucasr) 2012-01-16 06:19:34 PST
Pushed to mozilla-aurora:
https://hg.mozilla.org/releases/mozilla-aurora/rev/8a36f0202bd7

Note You need to log in before you can comment on or make changes to this bug.