Closed Bug 1030743 Opened 6 years ago Closed 6 years ago

NullPointerExceptions in GeckoPreferences

Categories

(Firefox for Android :: Settings and Preferences, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 33
Tracking Status
firefox31 + fixed
firefox32 + fixed
firefox33 --- fixed
fennec 31+ ---

People

(Reporter: blassey, Assigned: blassey)

References

Details

Attachments

(1 file)

reported through google play

We're calling GeckoAppShell.getContext(), but GeckoPreferences is a context so we shouldn't need to.

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.mozilla.firefox_beta/org.mozilla.gecko.preferences.GeckoPreferences}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2249)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2299)
at android.app.ActivityThread.access$700(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
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:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.mozilla.gecko.GeckoAppShell.getContext(GeckoAppShell.java:2070)
at org.mozilla.gecko.preferences.GeckoPreferences.getTextBox(GeckoPreferences.java:634)
at org.mozilla.gecko.preferences.GeckoPreferences.onCreateDialog(GeckoPreferences.java:705)
at android.app.Activity.onCreateDialog(Activity.java:3029)
at android.app.Activity.createDialog(Activity.java:1010)
at android.app.Activity.restoreManagedDialogs(Activity.java:999)
at android.app.Activity.performRestoreInstanceState(Activity.java:945)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1148)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2227)
... 11 more
Assignee: nobody → blassey.bugs
Attachment #8446529 - Flags: review?(rnewman)
Dupe of bug 1025931 in which you've already written and attached a patch?
Attachment #8446529 - Flags: review?(rnewman) → review+
Status: NEW → ASSIGNED
Component: General → Settings and Preferences
OS: Mac OS X → Android
Hardware: x86 → All
tracking-fennec: ? → 31+
https://hg.mozilla.org/mozilla-central/rev/5f65faec9280
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Depends on: 1033013
Comment on attachment 8446529 [details] [diff] [review]
NPE_getContext_GeckoPreferences.patch

Review of attachment 8446529 [details] [diff] [review]:
-----------------------------------------------------------------

Top crash in the android play store reporting (before our crash reporting gets hooked up)
Attachment #8446529 - Flags: approval-mozilla-beta?
Attachment #8446529 - Flags: approval-mozilla-aurora?
Comment on attachment 8446529 [details] [diff] [review]
NPE_getContext_GeckoPreferences.patch

Simple fix. Approved for Beta and Aurora.
Attachment #8446529 - Flags: approval-mozilla-beta?
Attachment #8446529 - Flags: approval-mozilla-beta+
Attachment #8446529 - Flags: approval-mozilla-aurora?
Attachment #8446529 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.