[geckoview] Crash when content tries to access gamepad API

RESOLVED FIXED in Firefox 55

Status

()

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: snorp, Unassigned)

Tracking

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

Looks like we're trying to use GeckoAppShell.getContext() in the content process, which is bad news.

04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: java.lang.NullPointerException: Attempt to invoke interface method 'android.content.Context org.mozilla.gecko.ContextGetter.getContext()' on a null object reference
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at org.mozilla.gecko.GeckoAppShell.getContext(GeckoAppShell.java:1633)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at org.mozilla.gecko.AndroidGamepadManager.addDeviceListener(AndroidGamepadManager.java:410)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at org.mozilla.gecko.AndroidGamepadManager.doStart(AndroidGamepadManager.java:162)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at org.mozilla.gecko.AndroidGamepadManager$1.run(AndroidGamepadManager.java:153)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at android.os.Handler.handleCallback(Handler.java:751)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at android.os.Handler.dispatchMessage(Handler.java:95)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at android.os.Looper.loop(Looper.java:154)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at android.app.ActivityThread.main(ActivityThread.java:6121)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at java.lang.reflect.Method.invoke(Native Method)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
04-14 18:16:17.144 16827 16827 E GeckoCrashHandler: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Created attachment 8865961 [details] [diff] [review]
Use application context in AndroidGamepadManager (v1)

Use application context in AndroidGamepadManager to avoid crash when
trying to use GeckoAppShell.getContext() in content process.
Attachment #8865961 - Flags: review?(snorp)
Attachment #8865961 - Flags: review?(snorp) → review+

Comment 2

a year ago
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cab30987328a
Use application context in AndroidGamepadManager; r=snorp

Comment 3

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/cab30987328a
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.