crash in java.lang.NoSuchMethodError: android.graphics.Bitmap.getByteCount at org.mozilla.gecko.preferences.LocaleListPreference$CharacterValidator.getPixels(LocaleListPreference.java)

VERIFIED FIXED in Firefox 32

Status

()

defect
--
critical
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: kbrosnan, Assigned: rnewman)

Tracking

({crash, regression})

Trunk
Firefox 34
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox31 unaffected, firefox32+ verified, firefox33+ verified, firefox34+ verified, fennec32+)

Details

(crash signature)

Attachments

(2 attachments)

[Tracking Requested - why for this release]:

[Tracking Requested - why for this release]:

[Tracking Requested - why for this release]:

This bug was filed from the Socorro interface and is 
report bp-cfb1948e-16ef-47c2-8e86-737212140730.
=============================================================

Crash on gingerbread devices doing local switching.

java.lang.NoSuchMethodError: android.graphics.Bitmap.getByteCount
	at org.mozilla.gecko.preferences.LocaleListPreference$CharacterValidator.getPixels(LocaleListPreference.java:62)
	at org.mozilla.gecko.preferences.LocaleListPreference$CharacterValidator.<init>(LocaleListPreference.java:52)
	at org.mozilla.gecko.preferences.LocaleListPreference.<init>(LocaleListPreference.java:85)
	at java.lang.reflect.Constructor.constructNative(Native Method)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
	at android.preference.GenericInflater.createItem(GenericInflater.java:383)
	at android.preference.GenericInflater.createItemFromTag(GenericInflater.java:430)
	at android.preference.GenericInflater.rInflate(GenericInflater.java:481)
	at android.preference.GenericInflater.rInflate(GenericInflater.java:493)
	at android.preference.GenericInflater.inflate(GenericInflater.java:326)
	at android.preference.GenericInflater.inflate(GenericInflater.java:263)
	at android.preference.PreferenceManager.inflateFromResource(PreferenceManager.java:251)
	at android.preference.PreferenceActivity.addPreferencesFromResource(PreferenceActivity.java:262)
	at org.mozilla.gecko.preferences.GeckoPreferences.onCreate(GeckoPreferences.java:338)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1632)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1684)
	at android.app.ActivityThread.access$1500(ActivityThread.java:124)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:948)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:130)
	at android.app.ActivityThread.main(ActivityThread.java:3717)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
	at dalvik.system.NativeStart.main(Native Method)

Device list:
motorola 	XT621
samsung 	GT-I9070
samsung 	GT-I8160
                GT-S6500D
Amazon 	        Kindle Fire
samsung 	GT-I9100
samsung 	GT-P1000
TCT 	        ALCATEL ONE TOUCH 4010A
HTC 	        HTC Desire HD A9191
samsung 	SPH-D710
Sony Ericsson 	ST25i
motorola 	XT626
motorola 	XT910
Keywords: regression
Added in API 12.
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
This replaces the API-limited call with one that's safe anywhere, fixes a potential KitKat issue, and also handles a different theoretical problem.
Attachment #8468122 - Flags: review?(margaret.leibovic)
Comment on attachment 8468122 [details] [diff] [review]
Fix CharacterValidator for API levels below 12

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

LGTM.
Attachment #8468122 - Flags: review?(margaret.leibovic) → review+
Keywords: checkin-needed
Whiteboard: [needs uplift]
Keywords: checkin-needed
Target Milestone: --- → Firefox 34
Oops, build failure. Do you want to push a fix or backout?

https://tbpl.mozilla.org/php/getParsedLog.php?id=45296039&tree=Fx-Team
The bustage was because we're building with outdated tools. We might have problems on KitKat devices until Bug 1042829 lands.

I undid the KitKat-specific part of this patch and pushed a fix; when we uplift we need to merge those two.

We should make builder tooling updates routine so that we're not constantly fighting this kind of nonsense. Thanks for your efforts, Wes!
Depends on: 1042829
AppConstants.Versions doesn't exist on <34, so we'll need this.
Comment on attachment 8468507 [details] [diff] [review]
Patch for uplift.

Approval Request Comment
[Feature/regressing bug #]:
  Bug 1023451, which worked around an Android limitation in a v12+ way.

[User impact if declined]:
  Crashes in locale picker on API 9-11.

[Describe test coverage new/current, TBPL]:
  None.
 
[Risks and why]: 
  This is a straightforward substitution for the internal implementation of the later method. It also adds a minimal catch for another edge case. Low risk.

[String/UUID change made/needed]:
  None.
Attachment #8468507 - Flags: approval-mozilla-beta?
Attachment #8468507 - Flags: approval-mozilla-aurora?
Blocks: 1023451
Whiteboard: [needs uplift] → [has branch patch]
tracking-fennec: ? → 32+
Attachment #8468507 - Flags: approval-mozilla-beta?
Attachment #8468507 - Flags: approval-mozilla-beta+
Attachment #8468507 - Flags: approval-mozilla-aurora?
Attachment #8468507 - Flags: approval-mozilla-aurora+
Verified as fixed on 
Builds:
Firefox for Android 32
Firefox for Android 33
Firefox for Android 34 Beta 1
Device: Samsung Galaxy R (Android 2.3.4)
You need to log in before you can comment on or make changes to this bug.