Closed Bug 1065531 Opened 6 years ago Closed 6 years ago

crash in java.lang.NoSuchMethodError: android.os.Bundle.getString at org.mozilla.gecko.preferences.GeckoPreferences.setupPreferences(GeckoPreferences.java)

Categories

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

32 Branch
ARM
Android
defect
Not set
critical

Tracking

()

VERIFIED FIXED
Firefox 35
Tracking Status
firefox32 + wontfix
firefox33 + verified
firefox34 + verified
firefox35 --- verified
fennec 33+ ---

People

(Reporter: aaronmt, Assigned: rnewman)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-1225af13-57e4-4b4d-baa1-fdcc72140909.
=============================================================

java.lang.NoSuchMethodError: android.os.Bundle.getString
	at org.mozilla.gecko.preferences.GeckoPreferences.setupPreferences(GeckoPreferences.java:599)
	at org.mozilla.gecko.preferences.GeckoPreferences.setupPreferences(GeckoPreferences.java:578)
	at org.mozilla.gecko.preferences.GeckoPreferenceFragment.onCreate(GeckoPreferenceFragment.java:72)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:697)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:921)
	at android.app.BackStackRecord.run(BackStackRecord.java:578)
	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1221)
	at android.app.Activity.performStart(Activity.java:4313)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1709)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1752)
	at android.app.ActivityThread.access$1500(ActivityThread.java:123)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:126)
	at android.app.ActivityThread.main(ActivityThread.java:3998)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:491)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
	at dalvik.system.NativeStart.main(Native Method)
Version: Firefox 34 → Firefox 32
Looks like the signature of getString with a default value was only added in API level 12:
https://developer.android.com/reference/android/os/Bundle.html#getString%28java.lang.String,%20java.lang.String%29

Fingers point at rnewman.
Assignee: nobody → rnewman
Blocks: 1019981
*looks guilty*
Status: NEW → ASSIGNED
tracking-fennec: --- → 33+
It turns out that the default behavior is to return null, so... yeah.
Attachment #8488080 - Flags: review?(margaret.leibovic)
Comment on attachment 8488080 [details] [diff] [review]
crash in java.lang.NoSuchMethodError: android.os.Bundle.getString at org.mozilla.gecko.preferences.GeckoPreferences.setupPreferences. v1

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

I wonder why Eclipse didn't complain about this.  We should investigate.
Attachment #8488080 - Flags: review?(margaret.leibovic) → review+
https://hg.mozilla.org/mozilla-central/rev/63956a63daec
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Comment on attachment 8488080 [details] [diff] [review]
crash in java.lang.NoSuchMethodError: android.os.Bundle.getString at org.mozilla.gecko.preferences.GeckoPreferences.setupPreferences. v1

Would take this on release if we spin another point release. Zero risk.

Approval Request Comment
[Feature/regressing bug #]:
  Bug 1019981

[User impact if declined]:
  Users on API v11 will get a crash opening settings.

[Describe test coverage new/current, TBPL]:
  No testing needed.

[Risks and why]: 
  We added code to avoid <13 fragment users hitting the locale picker. Unfortunately, that code accidentally used a 12+ method!
  This switches to a 100% equivalent version that's available on all Android versions. No risk.

[String/UUID change made/needed]:
  None.
Attachment #8488080 - Flags: approval-mozilla-beta?
Attachment #8488080 - Flags: approval-mozilla-aurora?
Comment on attachment 8488080 [details] [diff] [review]
crash in java.lang.NoSuchMethodError: android.os.Bundle.getString at org.mozilla.gecko.preferences.GeckoPreferences.setupPreferences. v1

(In reply to Richard Newman [:rnewman] from comment #7)
> Would take this on release if we spin another point release. Zero risk.

Let's hope we don't have a reason to do so. :)

Approved for Beta and Aurora.
Attachment #8488080 - Flags: approval-mozilla-beta?
Attachment #8488080 - Flags: approval-mozilla-beta+
Attachment #8488080 - Flags: approval-mozilla-aurora?
Attachment #8488080 - Flags: approval-mozilla-aurora+
Added tracking for 32 in case we do have to spin another point release.
Marking won't fix for 32. This fix will ship in 33 next week.
I'm marking this bug verified fixed since there are no crashes reported with 33 or later. However, I'm marking this qe-verify- since QE did not do explicit verification for this bug.
Status: RESOLVED → VERIFIED
Crash Signature: [@ java.lang.NoSuchMethodError: android.os.Bundle.getString at org.mozilla.gecko.preferences.GeckoPreferences.setupPreferences(GeckoPreferences.java) ]
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.