Closed
Bug 828480
Opened 13 years ago
Closed 13 years ago
java.lang.NullPointerException: at org.mozilla.gecko.AllPagesTab.setSuggestionsEnabled(AllPagesTab.java)
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox18 wontfix, firefox19 fixed, firefox20 fixed, firefox21 fixed)
RESOLVED
FIXED
Firefox 21
People
(Reporter: scoobidiver, Assigned: bnicholson)
References
Details
(Keywords: crash, Whiteboard: [native-crash][startupcrash])
Crash Data
Attachments
(1 file)
1.49 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
This bug tracks crashes not fixed by bug 816902.
Here is a crash report :bp-a3b1db88-e2be-452d-8667-0e8cf2130109.
java.lang.NullPointerException
at org.mozilla.gecko.AllPagesTab.setSuggestionsEnabled(AllPagesTab.java:606)
at org.mozilla.gecko.AllPagesTab.access$900(AllPagesTab.java:53)
at org.mozilla.gecko.AllPagesTab$5.onClick(AllPagesTab.java:589)
at android.view.View.performClick(View.java:4198)
at android.view.View$PerformClick.run(View.java:17158)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4918)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
at dalvik.system.NativeStart.main(Native Method)
More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.gecko.AllPagesTab.setSuggestionsEnabled%28AllPagesTab.java%29
Updated•13 years ago
|
Assignee: nobody → bnicholson
Assignee | ||
Comment 1•13 years ago
|
||
Bug 816902 immediately removed these listeners to prevent them from being triggered multiple times here: http://hg.mozilla.org/releases/mozilla-release/file/7e5736897abb/mobile/android/base/awesomebar/AllPagesTab.java#l585
The only place we set mSuggestionsPrompt to null is here: http://hg.mozilla.org/releases/mozilla-release/file/7e5736897abb/mobile/android/base/awesomebar/AllPagesTab.java#l633
That means setSuggestionsEnabled() was already called prior to the NPE, which means that multiple onClick() calls are still possible with the current implementation. I assume the click event isn't synchronously dispatched, so users could still queue up multiple click events before onClick() is first called. I found this same issue described here: http://stackoverflow.com/questions/10848157/android-prevent-multiple-onclick-events-on-a-button-that-has-been-disabled
An easy fix would be to add a null check for mSuggestionsPrompt to the beginning of setSuggestionsEnabled(), but I'd be concerned that the Runnable at http://hg.mozilla.org/releases/mozilla-release/file/7e5736897abb/mobile/android/base/awesomebar/AllPagesTab.java#l629 could potentially be executed after the second call to setSuggestionsEnabled() has already begun (which would cause a NPE for mSuggestionsPrompt somewhere later in the method). A fix that should work would be to create a class-level boolean that's toggled on the first call, but I hate creating a boolean for something so trivial...
Assignee | ||
Comment 2•13 years ago
|
||
This just adds a null check to the beginning of setSuggestionsEnabled(). We can look into other fixes if we still have crashes as speculated in comment 1.
Attachment #702055 -
Flags: review?(mark.finkle)
Assignee | ||
Updated•13 years ago
|
Updated•13 years ago
|
Attachment #702055 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 3•13 years ago
|
||
Assignee | ||
Comment 4•13 years ago
|
||
Comment on attachment 702055 [details] [diff] [review]
Add null check for mSuggestionsOptInPrompt
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 769145
User impact if declined: crashes if suggestions prompt response is clicked repeatedly
Testing completed (on m-c, etc.): just landed m-i
Risk to taking this patch (and alternatives if risky): very low risk - just adds a null pointer check
String or UUID changes made by this patch: none
Attachment #702055 -
Flags: approval-mozilla-beta?
Attachment #702055 -
Flags: approval-mozilla-aurora?
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Comment 6•13 years ago
|
||
Comment on attachment 702055 [details] [diff] [review]
Add null check for mSuggestionsOptInPrompt
Mobile only null check, good for b3 and Aurora.
Attachment #702055 -
Flags: approval-mozilla-beta?
Attachment #702055 -
Flags: approval-mozilla-beta+
Attachment #702055 -
Flags: approval-mozilla-aurora?
Attachment #702055 -
Flags: approval-mozilla-aurora+
Comment 7•13 years ago
|
||
Comment 8•13 years ago
|
||
(Also, this is in my queue to land on Aurora once it reopens)
Comment 9•13 years ago
|
||
Assignee | ||
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
•