Closed
Bug 1100403
Opened 10 years ago
Closed 9 years ago
crash in java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500(BrowserSearch.java)
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox35 affected, firefox36 affected, firefox44 fixed, firefox45 fixed, firefox46 fixed, b2g-v2.5 fixed)
RESOLVED
FIXED
Firefox 46
People
(Reporter: aaronmt, Assigned: ahunt)
Details
(Keywords: crash)
Crash Data
Attachments
(2 files)
58 bytes,
text/x-review-board-request
|
Margaret
:
review+
Sylvestre
:
approval-mozilla-aurora+
|
Details |
2.21 KB,
patch
|
ritu
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
This bug was filed from the Socorro interface and is
report bp-ad72a320-ac58-4032-8fe5-a41412141116.
=============================================================
ava.lang.NullPointerException
at org.mozilla.gecko.home.BrowserSearch.access$500(BrowserSearch.java:67)
at org.mozilla.gecko.home.BrowserSearch$4.run(BrowserSearch.java:355)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5175)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Comment 1•9 years ago
|
||
This might have been fixed with Bug 1186683 as well.
Updated•9 years ago
|
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500(BrowserSearch.java)] → [@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500(BrowserSearch.java)]
[@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500]
Updated•9 years ago
|
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500(BrowserSearch.java)]
[@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500] → [@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500(BrowserSearch.java)]
[@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500]
java.lang.NullPointerException: at org.mozilla.gecko.home.…
Updated•9 years ago
|
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500(BrowserSearch.java)]
[@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500]
java.lang.NullPointerException: at org.mozilla.gecko.home.… → [@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500(BrowserSearch.java)]
[@ java.lang.NullPointerException: at org.mozilla.gecko.home.BrowserSearch.access$500]
[@ java.lang.NullPointerException: at org.mozilla.gecko.hom…
Updated•9 years ago
|
Crash Signature: org.mozilla.gecko.home.BrowserSearch.access$1900(BrowserSearch.java)] → org.mozilla.gecko.home.BrowserSearch.access$1900(BrowserSearch.java)]
[@ java.lang.NullPointerException: Attempt to invoke virtual method ''boolean java.lang.String.startsWith(java.lang.String)'' on a null object reference at org.mozilla.gecko.home.Brow…
This crashed 12 times in 28 days – it's probably not worth looking deeply into this bug over the other top crashers we have.
Also, crashes occurred in 44, where bug 1186683 is landed, so I don't think it fixed this bug.
Comment 4•9 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #2)
> This crashed 12 times in 28 days – it's probably not worth looking deeply
> into this bug over the other top crashers we have.
I saw multiple similar signatures related to BrowserSearch.access. With these reports combined, this is crashing a lot more often than 12 times in the last 28 days.
Comment 5•9 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #3)
> Also, crashes occurred in 44, where bug 1186683 is landed, so I don't think
> it fixed this bug.
I wonder if bug 1186683 even made this crash occur more often, since most of these new stacks appear to happen only in 44.
Comment 6•9 years ago
|
||
Looking into this a bit, I wonder if mAdapter is null here:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/home/BrowserSearch.java#1127
It only gets set in onActivityCreated:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/home/BrowserSearch.java#388
And if we're destroying/creating the fragment more often, I suspect we can get into race issues with loaders.
Comment 7•9 years ago
|
||
Yeah, two loaders racing -- one will reset mAdapter to null. Shared mutable state is the enemy :/
Comment 8•9 years ago
|
||
liuche or ahunt, can one of you write a patch here?
Flags: needinfo?(liuche)
Flags: needinfo?(ahunt)
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to :Margaret Leibovic from comment #8)
> liuche or ahunt, can one of you write a patch here?
Looking into it right now!
Assignee: nobody → ahunt
Flags: needinfo?(liuche)
Flags: needinfo?(ahunt)
Assignee | ||
Comment 10•9 years ago
|
||
I've got one patch which would prevent us from using the adapter if null, however the last trace that was linked seems to be a separate issue ("java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference") - I wonder it that's in:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/home/BrowserSearch.java#546
or
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/home/BrowserSearch.java#564
Trace:
https://crash-stats.mozilla.com/report/index/aa12bdb8-1dca-41a2-a73b-626fd2160115
Assignee | ||
Comment 11•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/31063/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/31063/
Attachment #8708465 -
Flags: review?(margaret.leibovic)
Comment 12•9 years ago
|
||
Comment on attachment 8708465 [details]
MozReview Request: Bug 1100403 - Don't read mAdapter if null r?margaret
https://reviewboard.mozilla.org/r/31063/#review27879
Thanks for the quick fix. Let's also request uplift for this one and see if we can get it into the next beta.
Attachment #8708465 -
Flags: review?(margaret.leibovic) → review+
Assignee | ||
Comment 13•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/80e55e78a44c60640f975722caff586da3af65fe
Bug 1100403 - Don't read mAdapter if null r=margaret
Assignee | ||
Comment 14•9 years ago
|
||
Comment on attachment 8708465 [details]
MozReview Request: Bug 1100403 - Don't read mAdapter if null r?margaret
Approval Request Comment
[Feature/regressing bug #]: n/a
[User impact if declined]: 30th top crasher in current beta (44.0b8)
[Describe test coverage new/current, TreeHerder]: no tests - not reproducable locally.
[Risks and why]: low-risk: add null check where object was previously accessed directly.
[String/UUID change made/needed]: None.
(Separate patch required for beta due to path changes)
Attachment #8708465 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 15•9 years ago
|
||
Separate patch for beta due to path changes:
Approval Request Comment
[Feature/regressing bug #]: n/a
[User impact if declined]: 30th top crasher in current beta (44.0b8)
[Describe test coverage new/current, TreeHerder]: no tests - not reproducable locally.
[Risks and why]: low-risk: add null check where object was previously accessed directly.
[String/UUID change made/needed]: None.
(Separate patch required for beta due to path changes)
Attachment #8708500 -
Flags: approval-mozilla-beta?
Comment 16•9 years ago
|
||
I'm in favor of a band-aid to avoid a NPE, but this is the symptom of a more significant lifecycle problem. The loader should capture its adapter, or otherwise untie this knot.
Please file a follow-up to do this right -- more 'final', please!
(In reply to Andrzej Hunt :ahunt from comment #10)
> however the last trace that was linked seems to be a separate issue
> ("java.lang.NullPointerException: Attempt to invoke virtual method 'boolean
> java.lang.String.startsWith(java.lang.String)' on a null object reference")
This kinda doesn't make sense. The DB URL must be non-null, we null-check host, stripCommonSubdomains doesn't return null, so perhaps this is inlined code?
Comment 17•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
Comment on attachment 8708500 [details] [diff] [review]
1100403_backport_beta.patch
Fennec crash fix, makes sense to uplift to Beta44 as Fennec stability remains a big concern for this cycle.
Attachment #8708500 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
status-firefox44:
--- → affected
status-firefox45:
--- → affected
Comment 19•9 years ago
|
||
Comment 20•9 years ago
|
||
Comment on attachment 8708465 [details]
MozReview Request: Bug 1100403 - Don't read mAdapter if null r?margaret
Just like with beta.
Attachment #8708465 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 21•9 years ago
|
||
Will verify this after checking in crash-stats that this crash signature will not be present.
Assignee | ||
Comment 22•9 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #16)
> I'm in favor of a band-aid to avoid a NPE, but this is the symptom of a more
> significant lifecycle problem. The loader should capture its adapter, or
> otherwise untie this knot.
>
> Please file a follow-up to do this right -- more 'final', please!
Done at bug 1240797.
>
>
> (In reply to Andrzej Hunt :ahunt from comment #10)
>
> > however the last trace that was linked seems to be a separate issue
> > ("java.lang.NullPointerException: Attempt to invoke virtual method 'boolean
> > java.lang.String.startsWith(java.lang.String)' on a null object reference")
>
> This kinda doesn't make sense. The DB URL must be non-null, we null-check
> host, stripCommonSubdomains doesn't return null, so perhaps this is inlined
> code?
I really have no idea what's happening here - however it doesn't seem like a common cause of crashing, so probably not worth prioritising right now?
Comment 23•9 years ago
|
||
bugherder uplift |
status-b2g-v2.5:
--- → fixed
Comment 24•9 years ago
|
||
It looks like this crash is still happening on 44:
https://crash-stats.mozilla.com/report/index/01f0d5cf-1011-48c7-966e-001272160127
Either that, or it only solved some of the signatures here. Bug 1232608 has a similar signature, we could use that bug to investigate the remaining problems in BrowserSearch.
Updated•4 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
•