Crash in java.lang.NullPointerException: at android.app.Notification$Builder.<init>(Notification.java)

VERIFIED FIXED in Firefox 65

Status

()

defect
P1
critical
VERIFIED FIXED
5 months ago
3 months ago

People

(Reporter: lizzard, Assigned: vlad.baicu)

Tracking

(Blocks 1 bug, {crash, topcrash})

Firefox 64
Firefox 67
Unspecified
Android
Points:
---

Firefox Tracking Flags

(firefox64 wontfix, firefox65blocking verified, firefox66blocking verified, firefox67 fixed)

Details

(crash signature)

Attachments

(3 attachments)

This bug was filed from the Socorro interface and is
report bp-00487454-39e3-4756-833c-3bfe90181228.
=============================================================


This crash first started showing up in the 64.0.1 release. It's the #8 top crash for Fennec. 


Java stack trace:

java.lang.NullPointerException
	at android.app.Notification$Builder.&lt;init&gt;(Notification.java:2383)
	at android.app.Notification$Builder.&lt;init&gt;(Notification.java:2372)
	at org.mozilla.gecko.media.GeckoMediaControlAgent.createNotification(GeckoMediaControlAgent.java:402)
	at org.mozilla.gecko.media.MediaControlService.onStartCommand(MediaControlService.java:42)
	at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3476)
	at android.app.ActivityThread.-wrap23(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1674)
	at android.os.Handler.dispatchMessage(Handler.java:105)
	at android.os.Looper.loop(Looper.java:156)
	at android.app.ActivityThread.main(ActivityThread.java:6523)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
(Reporter)

Updated

5 months ago
Priority: -- → P1

Adding affected branches. Socorro is flagging this as a startup crash on 64 and 65, but not 66.

(Assignee)

Updated

4 months ago
Assignee: nobody → vlad.baicu
(Assignee)

Comment 2

4 months ago

Seems like the context is null when we try to create the notification, however I am not sure how that could happen since the context is attached at startup. Jan, do you have any ideas about this scenario ?

Flags: needinfo?(jh+bugzilla)

I'll try thinking about this some more, but unfortunately no immediate idea, sorry.

(Assignee)

Comment 4

4 months ago

Without reproducing or having more information about this crash, the best I can do for now is provide a speculative fix which at the very least should prevent the crash. Hopefully we might be able to find out more on nightly.

(Assignee)

Comment 5

4 months ago

Use MediaControlService's context when creating the notification in order to
prevent a NPE.

Logcat from one of the reports:

Android_Logcat

--------- beginning of main
01-22 19:18:30.801 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.814 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.824 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.838 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.848 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.864 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.872 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.884 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.900 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.907 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.916 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.923 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.934 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.942 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.954 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.965 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.973 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.984 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:30.995 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.006 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.017 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.031 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.037 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.049 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.056 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.070 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.076 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.096 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.108 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.115 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.127 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.137 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.144 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.156 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.163 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.175 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.182 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.190 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.207 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.216 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.231 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.239 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.253 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.261 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.274 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.282 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.293 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.301 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.313 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.320 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.331 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.339 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.347 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.358 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.366 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.378 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.389 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.397 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.407 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.412 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.419 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.430 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.441 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.449 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.456 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.467 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.482 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.490 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.505 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.511 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.521 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.528 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.539 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.550 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.558 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.570 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.578 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.590 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.599 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.630 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.639 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.651 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.659 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.666 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.679 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.692 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.699 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.707 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.718 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.725 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.736 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.744 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.756 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.765 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.777 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.784 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.796 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.804 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.816 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.824 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.837 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.845 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.858 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.865 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.879 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.886 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.896 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.904 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.916 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.926 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.934 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.940 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.951 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.959 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.971 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.981 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:31.995 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.003 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.016 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.023 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.033 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.040 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.053 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.066 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.075 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.081 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.088 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.100 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.107 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.119 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.126 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.138 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.149 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.156 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.163 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.176 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.183 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.196 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.207 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.214 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.226 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.233 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.244 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.254 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.261 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.270 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.282 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.293 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.306 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.320 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.334 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.345 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.353 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.374 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.381 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.393 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.401 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.409 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.422 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.440 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.449 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.457 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.470 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.484 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.493 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.505 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.512 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.519 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.529 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.534 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.541 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.554 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.562 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.569 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.577 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.587 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.595 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.601 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.608 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.620 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.627 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.638 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.648 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.654 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.664 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.671 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.679 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.687 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.694 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.707 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.719 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.737 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.745 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.756 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.763 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.774 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.785 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.806 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.814 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.824 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.832 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.843 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.855 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.871 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.881 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.894 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.901 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.914 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.921 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.929 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.941 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.955 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:32.998 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.006 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.012 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.024 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.032 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.040 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.050 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.052 4992 4998 I art : Thread[3,tid=4998,WaitingInMainSignalCatcherLoop,Thread*=0xa2fb8c00,peer=0x22c050d0,"Signal Catcher"]: reacting to signal 3
01-22 19:18:33.052 4992 4998 I art :
01-22 19:18:33.068 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.078 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.087 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.101 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.112 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.130 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.139 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.156 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.166 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.178 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.185 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.200 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.211 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.222 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.251 4992 5002 W art : Suspending all threads took: 7.902ms
01-22 19:18:33.261 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.273 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.286 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.294 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.306 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.319 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.328 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.335 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.348 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.356 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.370 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.375 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.391 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.401 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.409 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.413 4992 4998 I art : Wrote stack traces to '/data/anr/traces.txt'
01-22 19:18:33.422 4992 4992 D MediaControlService: onStartCommand
01-22 19:18:33.531 7320 7320 I GeckoMediaManager: Media service has been unbound. Stopping.
01-22 19:18:33.539 7320 7320 I Process : Sending signal. PID: 7320 SIG: 9
01-22 19:19:55.710 7648 7648 I MultiDex: VM with version 2.1.0 has multidex support
01-22 19:19:55.710 7648 7648 I MultiDex: Installing application
01-22 19:19:55.711 7648 7648 I MultiDex: VM has multidex support, MultiDex support library is disabled.
01-22 19:19:55.743 7648 7648 I GeckoApplication: zerdatime 2971264921 - application start
01-22 19:19:55.779 7648 7648 D MediaControlService: onStartCommand
01-22 19:19:55.786 7648 7648 D MediaControlService: onStartCommand
01-22 19:19:55.798 7648 7648 D AndroidRuntime: Shutting down VM
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at android.app.Notification$Builder.<init>(Notification.java:2336)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at android.app.Notification$Builder.<init>(Notification.java:2325)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at org.mozilla.gecko.media.GeckoMediaControlAgent.createNotification(GeckoMediaControlAgent.java:402)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at org.mozilla.gecko.media.MediaControlService.onStartCommand(MediaControlService.java:42)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3432)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at android.app.ActivityThread.-wrap21(ActivityThread.java)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1633)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at android.os.Handler.dispatchMessage(Handler.java:102)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at android.os.Looper.loop(Looper.java:154)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at android.app.ActivityThread.main(ActivityThread.java:6316)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at java.lang.reflect.Method.invoke(Native Method)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
01-22 19:19:55.800 7648 7648 E GeckoCrashHandler: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
01-22 19:19:55.803 7648 7648 E art : No implementation found for void org.mozilla.gecko.GeckoAppShell.reportJavaCrash(java.lang.Throwable, java.lang.String) (tried Java_org_mozilla_gecko_GeckoAppShell_reportJavaCrash and Java_org_mozilla_gecko_GeckoAppShell_reportJavaCrash__Ljava_lang_Throwable_2Ljava_lang_String_2)
01-22 19:19:55.822 7648 7648 I Process : Sending signal. PID: 7648 SIG: 9
01-22 19:19:55.884 7666 7666 I MultiDex: VM with version 2.1.0 has multidex support
01-22 19:19:55.884 7666 7666 I MultiDex: Installing application
01-22 19:19:55.884 7666 7666 I MultiDex: VM has multidex support, MultiDex support library is disabled.
01-22 19:19:55.885 7666 7666 I GeckoApplication: zerdatime 2971265063 - application start
--------- beginning of system
01-22 19:19:55.934 7666 7680 I Timeline: Timeline: Activity_launch_request id:org.mozilla.firefox time:1749698009
01-22 19:19:55.954 7666 7680 I art : System.exit called, status: 0
01-22 19:19:55.955 7666 7680 I AndroidRuntime: VM exiting with result code 0, cleanup skipped.

I should add, the above logcat came from a user with at least 3 identical reports filed with 0s of uptime -- so this is a startup crash.

Thank you. That confirms my theory regarding how we end up with a null mContext in the agent, but at the same time raises the question what is going on beforehand with onStartCommand being called repeatedly and us eventually and apparently getting an ANR?

Flags: needinfo?(jh+bugzilla)
(Assignee)

Comment 9

4 months ago

Some code cleanup.

Depends on D17391

(Assignee)

Comment 10

4 months ago

Added additional logging. In case the agent is not attached but we are not on a
release or beta build, allow createNotification to be called with a null context
so that we may be able to gather more information from the reports.

Depends on D18115

(Assignee)

Updated

4 months ago
Keywords: checkin-needed

We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. (255, 'applying /tmp/tmpooT5gp\npatching file mobile/android/base/java/org/mozilla/gecko/media/MediaControlService.java\nHunk #1 FAILED at 38\nHunk #2 FAILED at 50\n2 out of 2 hunks FAILED -- saving rejects to file mobile/android/base/java/org/mozilla/gecko/media/MediaControlService.java.rej\npatching file mobile/android/base/java/org/mozilla/gecko/media/GeckoMediaControlAgent.java\nHunk #1 FAILED at 112\nHunk #3 FAILED at 316\n2 out of 3 hunks FAILED -- saving rejects to file mobile/android/base/java/org/mozilla/gecko/media/GeckoMediaControlAgent.java.rej\nabort: patch failed to apply', '')

Flags: needinfo?(vlad.baicu)
Keywords: checkin-needed
(Assignee)

Comment 12

4 months ago

Rebased the patches, they should work now

Flags: needinfo?(vlad.baicu)
Keywords: checkin-needed

Comment 14

4 months ago
bugherder
Status: NEW → RESOLVED
Last Resolved: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67

Can you request uplift to beta? Thanks!

Flags: needinfo?(vlad.baicu)

Ryan suggested respinning Fennec this week for this startup crash. I think that's a good idea as we are still at a 25% update rate for beta. If we can uplift today, I can start another build and we could release 66.0b6 tomorrow or Thursday. Earlier would be better so that we get more crash data this week.

Sorina, can your team do another Fennec signoff?

Flags: needinfo?(sorina.florean)
(Assignee)

Comment 17

3 months ago

Comment on attachment 9038587 [details]
Bug 1516665 - Prevent MediaControlService NPE. r=JanH

Beta/Release Uplift Approval Request

Feature/Bug causing the regression

Bug 1384866

User impact if declined

The app will continue to crash on startup

Is this code covered by automated tests?

Yes

Has the fix been verified in Nightly?

Yes

Needs manual test from QE?

Yes

If yes, steps to reproduce

Unknown

List of other uplifts needed

None

Risk to taking this patch

Low

Why is the change risky/not risky? (and alternatives if risky)

The change is not risky because we are merely preventing the crash from happening if the MediaControlAgent is not attached.

String changes made/needed

Flags: needinfo?(vlad.baicu)
Attachment #9038587 - Flags: approval-mozilla-beta?

Is it just patch 1 and patch 2? Leaving out the logging in patch 3, correct?

Flags: needinfo?(vlad.baicu)

(In reply to Liz Henry (:lizzard) (use needinfo) from comment #16)

Ryan suggested respinning Fennec this week for this startup crash. I think
that's a good idea as we are still at a 25% update rate for beta. If we can
uplift today, I can start another build and we could release 66.0b6 tomorrow
or Thursday. Earlier would be better so that we get more crash data this
week.

Sorina, can your team do another Fennec signoff?

Yes, we can signoff another Fennec this week.

Flags: needinfo?(sorina.florean)

Comment on attachment 9038587 [details]
Bug 1516665 - Prevent MediaControlService NPE. r=JanH

Per comment 17.

Attachment #9038587 - Flags: approval-mozilla-release?

Comment on attachment 9038587 [details]
Bug 1516665 - Prevent MediaControlService NPE. r=JanH

[Triage Comment]

Attachment #9038587 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9040179 [details]
Bug 1516665 - Part 2: Cleanup. r=JanH

Fix for high volume startup crash, let's land for beta 6.

Attachment #9040179 - Flags: approval-mozilla-beta+
(Assignee)

Comment 24

3 months ago

Hey Liz, we've put checks in code for the build type (if it's nightly, beta or release) so all 3 can be uplifted or ride the train as usual, but only part 1 prevents the crash, that's why I've requested uplift only for it.

Flags: needinfo?(vlad.baicu)

Comment 25

3 months ago

Hello, I tried to reproduce this crash on Beta 66.0b6 using multiple scenarios from the crash report(Switching multiple tabs, play some media files, opening different links) and using information received from Vlad but I was not able to reproduce the crash.
Devices:

  • Samsung Galaxy S8 (Android 8.0);
  • OnePlus 5T (Android 9);
  • Google Pixel (Android 9).

Comment on attachment 9038587 [details]
Bug 1516665 - Prevent MediaControlService NPE. r=JanH

[Triage Comment]
Fixes a pretty bad startup crash. 66.0b6 data looks good. Approved for 65.0.1.

Attachment #9038587 - Flags: approval-mozilla-release? → approval-mozilla-release+

qe-verify+ though I suspect that crash-stats will very quickly tell us if it works or not :)

Flags: qe-verify+
Whiteboard: [qa-triaged]

Updated

3 months ago
Blocks: 1527243

Comment 29

3 months ago

Verified as fixed on the latest version on Release 65.0.1 using Samsung Galaxy S8 (Android 8.0) and OnePlus 5T (Android 9);
Due to that, I'll close this bug as Verified, thanks.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
QA Whiteboard: [qa-triaged]
Whiteboard: [qa-triaged]
You need to log in before you can comment on or make changes to this bug.