Closed
Bug 1136157
Opened 10 years ago
Closed 8 years ago
crash in java.lang.NullPointerException: Attempt to invoke virtual method ''int java.lang.Object.hashCode()'' on a null object reference at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java)
Categories
(Firefox for Android Graveyard :: Favicon Handling, defect)
Tracking
(firefox36 affected, firefox37 affected, firefox38 affected, firefox39 affected, fennec+)
People
(Reporter: TeoVermesan, Unassigned, Mentored)
Details
(Keywords: crash, regression, Whiteboard: [good second bug][lang=java])
Crash Data
This bug was filed from the Socorro interface and is
report bp-36da1f4d-a968-4cc0-9225-388db2150224.
=============================================================
Steps to reproduce:
1. Open about:reader
2. Open tab tray
3. Tap the three-dots-menu and choose "Close all tabs"
Expected results:
- about:home is displayed
Actual results:
- Firefox crashes
Reporter | ||
Updated•10 years ago
|
status-firefox36:
--- → affected
status-firefox37:
--- → affected
status-firefox38:
--- → affected
status-firefox39:
--- → affected
Comment 1•10 years ago
|
||
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:883)
at org.mozilla.gecko.util.NonEvictingLruCache.get(NonEvictingLruCache.java:26)
at org.mozilla.gecko.favicons.Favicons.getSizedFaviconForPageFromLocal(Favicons.java:267)
at org.mozilla.gecko.favicons.Favicons.getSizedFaviconForPageFromLocal(Favicons.java:295)
at org.mozilla.gecko.home.TwoLinePageRow.update(TwoLinePageRow.java:260)
at org.mozilla.gecko.home.TwoLinePageRow.updateFromCursor(TwoLinePageRow.java:291)
at org.mozilla.gecko.home.RecentTabsPanel$RecentTabsAdapter.bindView(RecentTabsPanel.java:402)
at org.mozilla.gecko.home.MultiTypeCursorAdapter.getView(MultiTypeCursorAdapter.java:62)
tracking-fennec: --- → ?
Keywords: regression,
regressionwindow-wanted
Comment 2•10 years ago
|
||
Null page URL passed to getSizedFaviconForPageFromLocal. It doesn't null-check. Easy fix.
Comment 3•10 years ago
|
||
Rather, easy band-aid. It's not obvious why there's a null URL here; maybe we somehow saw a snapshot of about:home before it had a URL? We should fix that, too.
Comment 4•10 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #2)
> Null page URL passed to getSizedFaviconForPageFromLocal. It doesn't
> null-check. Easy fix.
Definitely something that should be fixed at the caller: getSizedFaviconForPageFromLocal with no page URL is nonsensical, and defensive null checks aren't nice.
We were called from TwoLinePageRow. Since it didn't NPE at line 248 (where it does url.equals(mPageUrl)), TwoLinePageRow.update definitely got a non-null url.
The root of the problem, then, is that ReaderModeUtils.getUrlFromAboutReader(url) is returning null.
Comment 5•10 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #3)
>
> maybe we somehow saw a snapshot of about:home before it had a URL? We should fix
> that, too.
It is about:reader not about:home; see bug 1136167.
Updated•10 years ago
|
Assignee: nobody → margaret.leibovic
tracking-fennec: ? → +
Updated•10 years ago
|
Assignee: margaret.leibovic → rnewman
Updated•9 years ago
|
Assignee: rnewman → nobody
Mentor: rnewman
Whiteboard: [good second bug][lang=java]
Updated•9 years ago
|
Crash Signature: [@ java.lang.NullPointerException: Attempt to invoke virtual method ''int java.lang.Object.hashCode()'' on a null object reference at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java)] → [@ java.lang.NullPointerException: Attempt to invoke virtual method ''int java.lang.Object.hashCode()'' on a null object reference at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java)]
[@ java.lang.NullPointerException: Attempt to invoke…
Comment 6•8 years ago
|
||
I can take this up if nobody's working on it. Would it be OK if I tested for the return value of StringUtils.getQueryParameter() and if it's null, I can return "about:home"? Would that fix the problem or is that too simplistic?
Flags: needinfo?(rnewman)
Comment 7•8 years ago
|
||
(In reply to swaroop.rao from comment #6)
> I can take this up if nobody's working on it. Would it be OK if I tested for
> the return value of StringUtils.getQueryParameter() and if it's null, I can
> return "about:home"? Would that fix the problem or is that too simplistic?
That's too simplistic.
The caller shouldn't be passing a null URL. Above that, we shouldn't be in a state where we don't know the page URL at the time we try to fetch the icon.
In comment 4, Chris suggests that ReaderModeUtils.getUrlFromAboutReader is failing to return a URL.
But I can't reproduce this bug with an old 2015-12 Nightly, nor with today's Nightly, so I'm going to close this bug!
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(rnewman)
Resolution: --- → WORKSFORME
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
Comment 8•2 years ago
|
||
Removing regressionwindow-wanted
keyword because this bug has been resolved.
Keywords: regressionwindow-wanted
Comment 9•2 years ago
|
||
Removing regressionwindow-wanted
keyword because this bug has been resolved.
Comment 10•2 years ago
|
||
Removing regressionwindow-wanted
keyword because this bug has been resolved.
You need to log in
before you can comment on or make changes to this bug.
Description
•