Crash on startup: malformed query in local DB history query

RESOLVED FIXED in Firefox 11

Status

()

Firefox for Android
General
P1
critical
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: rnewman, Assigned: lucasr)

Tracking

({crash})

unspecified
Firefox 12
ARM
Android
crash
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

(Whiteboard: [native-crash][inbound])

Attachments

(1 attachment)

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)

Updated

6 years ago
Keywords: crash
Whiteboard: [native-crash]
(Assignee)

Comment 1

6 years ago
Created attachment 586946 [details] [diff] [review]
Fix query syntax for filtering URLs on local DB

Regression caused by patch in bug 710392.
Attachment #586946 - Flags: review?(blassey.bugs)

Updated

6 years ago
Blocks: 710392

Updated

6 years ago
tracking-fennec: --- → 11+
Priority: -- → P1
Attachment #586946 - Flags: review?(blassey.bugs) → review+
Inbound:

https://hg.mozilla.org/integration/mozilla-inbound/rev/9fb4756a6cbc
tracking-fennec: 11+ → ---
Priority: P1 → --
Whiteboard: [native-crash] → [native-crash][inbound]
Ugh, cleared tracking fields. Fail.
tracking-fennec: --- → ?
Priority: -- → P1
https://hg.mozilla.org/mozilla-central/rev/9fb4756a6cbc
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
(Assignee)

Comment 5

5 years ago
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).
Attachment #586946 - Flags: approval-mozilla-aurora?
(Assignee)

Updated

5 years ago
Blocks: 707150

Comment 6

5 years ago
Comment on attachment 586946 [details] [diff] [review]
Fix query syntax for filtering URLs on local DB

[Triage Comment]
Mobile only - approving for Aurora.
Attachment #586946 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Comment 7

5 years ago
Pushed to mozilla-aurora:
https://hg.mozilla.org/releases/mozilla-aurora/rev/8a36f0202bd7
status-firefox11: --- → fixed
tracking-fennec: ? → 11+
You need to log in before you can comment on or make changes to this bug.