Closed
Bug 768900
Opened 13 years ago
Closed 13 years ago
java.lang.NullPointerException: at org.mozilla.gecko.AndroidImport.mergeBookmarks(AndroidImport.java)
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox15 verified, firefox16 verified, firefox17 verified)
VERIFIED
FIXED
Firefox 16
People
(Reporter: scoobidiver, Assigned: gcp)
References
Details
(Keywords: crash, regression)
Crash Data
Attachments
(1 file)
7.95 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
It first appeared in 16.0a1/20120626092318 (not an official nightly build). See bp-7669c265-7f1d-4124-989c-17c432120627.
The regression window might be (low volume):
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c659521a7a9a&tochange=5cdbeae14405
It's likely a regression from bug 710330.
java.lang.NullPointerException
at org.mozilla.gecko.AndroidImport.mergeBookmarks(AndroidImport.java:59)
at org.mozilla.gecko.AndroidImport.run(AndroidImport.java:142)
at org.mozilla.gecko.AndroidImportPreference$2.run(AndroidImportPreference.java:71)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at org.mozilla.gecko.GeckoBackgroundThread.run(GeckoBackgroundThread.java:31)
More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.gecko.AndroidImport.mergeBookmarks%28AndroidImport.java%29
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → gpascutto
Assignee | ||
Comment 1•13 years ago
|
||
final int faviconCol = cursor.getColumnIndexOrThrow(Browser.BookmarkColumns.FAVICON);
FAVICON is API level 1, so this probably happens if the user has no actual bookmarks, though I think the column is still supposed to exist in the projection. Maybe this happens if the user has no bookmarks, the database itself isn't even created.
Easy to fix but a bit of a strange bug IMHO.
Comment 3•13 years ago
|
||
STR: i) disable com.google.android.browser ii) attempt to import history/bookmarks
Comment 4•13 years ago
|
||
(In reply to Aaron Train [:aaronmt] from comment #3)
> STR: i) disable com.google.android.browser ii) attempt to import
> history/bookmarks
Hmm, in this case the returned cursor is probably null, not simply pointing to an empty result set. I guess doing a null check on the cursor in this specific case makes sense.
Assignee | ||
Comment 5•13 years ago
|
||
Not sure if the try/finally is really needed, but in another bug I ran into the problem that some Android versions have bugs that "forget" to create random bookmarks columns, so let's not crash our app if that is the case.
Attachment #637911 -
Flags: review?(mark.finkle)
Comment 6•13 years ago
|
||
Comment on attachment 637911 [details] [diff] [review]
Patch 1. Check for null and catch errors
Seems OK, just move the "cursor" declaration out of the try blocks and fix the ";" on it's own line issue.
Attachment #637911 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 7•13 years ago
|
||
Comment 8•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
Assignee | ||
Comment 9•13 years ago
|
||
Comment on attachment 637911 [details] [diff] [review]
Patch 1. Check for null and catch errors
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 710330
User impact if declined: App will crash if the user tries to import from the Android Browser while that Browser is disabled in the OS.
Testing completed (on m-c, etc.): Landed a few days ago in m-c.
Risk to taking this patch (and alternatives if risky): Very low.
Attachment #637911 -
Flags: approval-mozilla-aurora?
Updated•13 years ago
|
Attachment #637911 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 10•13 years ago
|
||
Reporter | ||
Updated•13 years ago
|
status-firefox15:
--- → fixed
Updated•13 years ago
|
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
•