Closed Bug 1546153 Opened 8 months ago Closed 7 months ago

crash in NullPointerException at org.mozilla.gecko.BrowserApp.onCreate(BrowserApp.java) on null mBrowserToolbar

Categories

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

ARM
Android
defect

Tracking

()

VERIFIED FIXED
Firefox 68
Tracking Status
firefox-esr60 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: cpeterson, Assigned: anuta.vlad)

References

Details

(Keywords: crash, Whiteboard: [bcs:p1])

Crash Data

Attachments

(2 files)

We should try to fix bug for [bcs:p2] because it's related to system language settings. Probably not a [bcs:p1] because users are unlikely to change their system language settings very often.

STR:

  1. Open Fennec. I was testing Fennec 66 Release.
  2. Go to Android's system settings and change the system language: System > Languages & input > Languages.
  3. Switch back to Fennec.

EXPECTED RESULT:
Fennec's UI language should change.

ACTUAL RESULT:
Fennec will sometimes crash.

I was able to twice reproduce a similar NullPointerException at org.mozilla.gecko.BrowserApp.onCreate(BrowserApp.java) after switching my Android system language settings.

bp-de0b3b1b-ac94-4f7c-a7c2-eda9d0190422

Looks like mBrowserToolbar is null here: https://searchfox.org/mozilla-release/rev/ee65ae17d964dda4d764020b2f0c0a09c6cd1984/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java#651

java.lang.NullPointerException
	at org.mozilla.gecko.BrowserApp.onCreate(BrowserApp.java:651)
	at android.app.Activity.performCreate(Activity.java:7032)
	at android.app.Activity.performCreate(Activity.java:7023)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1236)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2814)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2943)
	at android.app.ActivityThread.-wrap11(Unknown Source:0)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1630)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6626)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:811)
See Also: → 1542566
Assignee: nobody → rares.vultur
Status: NEW → ASSIGNED
Attached video 2019_04_23_15_58_51.mp4

Hi all,

I was able to reproduce the issue on the latest Nightly 68.0a1 (2019-04-23), on Beta 67.0b13, and on RC 66.0.2 on Samsung Galaxy Note 8 (Android 9).
I got a crash report only on RC, while Nightly and Beta crashed without a report, like in the attached short video.

Thank you!

Priority: -- → P2
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.BrowserApp.onCreate(BrowserApp.java)]
OS: Unspecified → Android
Hardware: Unspecified → ARM

This crash volume is a lot higher than I would expect. Perhaps this crash signature can be triggered by multiple causes.

Whiteboard: [bcs:p2] → [bcs:p1]

We were able to reproduce this using the steps above but only with the "Don't keep activities" enabled from the Developer options. I will prepare a PR with the fix.

Keywords: checkin-needed

It's currently not possible to land this, the landing system blocks it with this message:

'Lando says "This diff does not have the proper author information uploaded to Phabricator", but I see an author on Phabricator. What's wrong?'

See https://wiki.mozilla.org/Phabricator/FAQ#Lando

There is no previous, recent commit by Anuta found in mozilla-central, so I haven't the information (what user name and email address shall be used) to land this manually.

Flags: needinfo?(anuta.vlad)
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/fa5584298300
Fix NPE at BrowserApp.onCreate() caused by mBrowserToolbar being null. r=VladBaicu
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/autoland/rev/1a2d4ae3d07f
Backed out changeset fa5584298300 for checkstyle failure (missing whitespace)
https://hg.mozilla.org/integration/autoland/rev/86c7622bc218
Fix NPE at BrowserApp.onCreate() caused by mBrowserToolbar being null. r=VladBaicu

67=wontfix because it's too late to uplift to Fennec 67 Beta. We've had this crash for a long time, so the fix can ride the trains with Fennec 68.

Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68

Verified as fixed on the latest Nightly 68.0a1 (2019-05-05), with Samsung Galaxy Note 8 (Android 9), Nexus 6P (Android 8.1.0), and Nexus 5 (Android 6.0.1).

Status: RESOLVED → VERIFIED
Assignee: rares.vultur → anuta.vlad
Flags: needinfo?(anuta.vlad)
You need to log in before you can comment on or make changes to this bug.