Closed Bug 930163 Opened 11 years ago Closed 11 years ago

crash in java.lang.NullPointerException: at org.mozilla.gecko.home.TwoLinePageRow.updateFromCursor(TwoLinePageRow.java)

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect)

27 Branch
All
Android
defect
Not set
critical

Tracking

(firefox27 affected, firefox28 affected, fennec27+)

RESOLVED WORKSFORME
Tracking Status
firefox27 --- affected
firefox28 --- affected
fennec 27+ ---

People

(Reporter: aaronmt, Unassigned)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-4793b55e-4c7f-469a-a915-cfb182131023.
=============================================================

java.lang.NullPointerException
	at org.mozilla.gecko.home.TwoLinePageRow.updateFromCursor(TwoLinePageRow.java:207)
	at org.mozilla.gecko.home.BookmarksListAdapter.bindView(BookmarksListAdapter.java:193)
	at org.mozilla.gecko.home.MultiTypeCursorAdapter.getView(MultiTypeCursorAdapter.java:62)
	at android.widget.AbsListView.obtainView(AbsListView.java:2350)
Attached patch PatchSplinter Review
Attachment #821895 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 821895 [details] [diff] [review]
Patch

Review of attachment 821895 [details] [diff] [review]:
-----------------------------------------------------------------

I'm uneasy with just adding these null checks without understanding the real cause of these crashes. For instance, the row with a null URL will probably look broken and not work at all. What would be the point of working around the NPE?

I'd like to hear a better reason for why this is better than simply exposing the bug (and fixing the real cause) before giving r+.
Attachment #821895 - Flags: review?(lucasr.at.mozilla) → review-
I'll wait for steps needed then. This is hard to speculate what could go wrong to cause this issue.
Nothing should ever be setting a bookmark URL to null, but it's not a NOT NULL column, so it's not impossible. 

I don't think waiting for steps will help -- this could be the result of an import from the Android browser, a weird Sync result (unlikely, but possible), or even a JNI add-on. Those things aren't going to happen in routine QA.

Sriram: spend some time trying to find how nulls could leak into the DB this way?
(In reply to Richard Newman [:rnewman] from comment #4)
> Nothing should ever be setting a bookmark URL to null, but it's not a NOT
> NULL column, so it's not impossible. 
> 
> I don't think waiting for steps will help -- this could be the result of an
> import from the Android browser, a weird Sync result (unlikely, but
> possible), or even a JNI add-on. Those things aren't going to happen in
> routine QA.
> 
> Sriram: spend some time trying to find how nulls could leak into the DB this
> way?

Agree. This bug seems to have the same root cause than bug 883500 i.e. null URLs coming from the DB. The crash just happens at a different point here because in we're using TextUtils.equals() in Beta, instead of url.equals().

Based on the crash comments in bug 883500, this seems to be happening more often while scrolling bookmarks. Sriram, maybe start from there?
Flags: needinfo?(sriram)
tracking-fennec: --- → ?
tracking-fennec: ? → 26+
tracking-fennec: 26+ → 27+
tracking-fennec: 27+ → ?
Depends on: 883500
tracking-fennec: ? → 27+
Flags: needinfo?(sriram.mozilla)
Product: Firefox for Android → Firefox for Android Graveyard

Removing steps-wanted keyword because this bug has been resolved.

Keywords: steps-wanted

Removing steps-wanted keyword because this bug has been resolved.

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

Attachment

General

Created:
Updated:
Size: