Closed Bug 1152489 Opened 5 years ago Closed 5 years ago

crash in java.lang.NullPointerException: at org.mozilla.gecko.BrowserApp.enterEditingMode(BrowserApp.java)

Categories

(Firefox for Android :: General, defect, critical)

38 Branch
All
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 40
Tracking Status
firefox38 + fixed
firefox39 + fixed
firefox40 --- fixed
fennec 38+ ---

People

(Reporter: aaronmt, Assigned: mcomella)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file, 1 obsolete file)

This bug was filed from the Socorro interface and is 
report bp-76b9638b-6406-4ff8-831f-a2b412150402.
=============================================================

java.lang.NullPointerException
	at org.mozilla.gecko.BrowserApp.enterEditingMode(BrowserApp.java:2180)
	at org.mozilla.gecko.BrowserApp.enterEditingMode(BrowserApp.java:2154)
	at org.mozilla.gecko.BrowserApp.access$800(BrowserApp.java:143)
	at org.mozilla.gecko.BrowserApp$9.onActivate(BrowserApp.java:988)
	at org.mozilla.gecko.toolbar.BrowserToolbar$1.onClick(BrowserToolbar.java:222)
	at android.view.View.performClick(View.java:4569)
	at android.view.View$PerformClick.run(View.java:18570)
	at android.os.Handler.handleCallback(Handler.java:743)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:136)
	at android.app.ActivityThread.main(ActivityThread.java:5196)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:515)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
	at dalvik.system.NativeStart.main(Native Method)
Mike - Does this look similar to other crashes we have fixed?
Assignee: nobody → michael.l.comella
Flags: needinfo?(michael.l.comella)
Line in question [1]:

  final String panelId = selectedTab.getMostRecentHomePanel();

Looks like we checked selectedTab != null above, but not here. We should really fix this selectedTab can be null mumbojumbo.

[1]: https://mxr.mozilla.org/mozilla-beta/source/mobile/android/base/BrowserApp.java#2180
Flags: needinfo?(michael.l.comella)
/r/6915 - Bug 1152489 - Prevent getMostRecentHomePanel() from being called on null selectedTab. r=mfinkle

Pull down this commit:

hg pull -r b32614c59677fad7d2a47ca080a7661e2425a635 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8591053 - Flags: review?(mark.finkle)
Comment on attachment 8591053 [details]
MozReview Request: bz://1152489/mcomella

SHIP IT! (maybe all caps makes the r+ work)
Attachment #8591053 - Flags: review?(mark.finkle) → review+
Comment on attachment 8591053 [details]
MozReview Request: bz://1152489/mcomella

Approval Request Comment
[Feature/regressing bug #]: Unknown
[User impact if declined]:
  Users can crash when starting the browser and selectedTab is still null (probably more of an issue on slower devices)

[Describe test coverage new/current, TreeHerder]: None (cannot repro), but ensured there was no crash locally.

[Risks and why]: 
  Low - added a null check and the javadoc starts our code should be able to handle the new null value. It's risky if this javadoc is outdated and/or incorrect.

[String/UUID change made/needed]: None
Attachment #8591053 - Flags: approval-mozilla-beta?
Attachment #8591053 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/951a7ea2acc3
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Comment on attachment 8591053 [details]
MozReview Request: bz://1152489/mcomella

Should be in 38 beta 4.
Attachment #8591053 - Flags: approval-mozilla-beta?
Attachment #8591053 - Flags: approval-mozilla-beta+
Attachment #8591053 - Flags: approval-mozilla-aurora?
Attachment #8591053 - Flags: approval-mozilla-aurora+
[Tracking Requested - why for this release]: Crash fix. How far should we uplift?
tracking-fennec: ? → 38+
Attachment #8591053 - Attachment is obsolete: true
Attachment #8619995 - Flags: review+
You need to log in before you can comment on or make changes to this bug.