Closed Bug 1250900 Opened 9 years ago Closed 9 years ago

crash in java.lang.UnsupportedOperationException: Can''t convert to color: type=0x2 at android.content.res.TypedArray.getColor(TypedArray.java)

Categories

(Firefox for Android Graveyard :: General, defect)

45 Branch
Unspecified
Android
defect
Not set
critical

Tracking

(firefox46 unaffected, firefox47+ fixed, fennec47+)

RESOLVED DUPLICATE of bug 1205124
Tracking Status
firefox46 --- unaffected
firefox47 + fixed
fennec 47+ ---

People

(Reporter: snorp, Assigned: ahunt)

References

Details

(Keywords: crash)

Crash Data

Attachments

(3 files, 1 obsolete file)

This bug was filed from the Socorro interface and is report bp-3b99cbfe-e2c5-405e-a8cc-930da2160217. ============================================================= This is a recent appearance in Nightly 47
Agreed looks to be new in 47. lenovo A820 19 (REL) armeabi-v7a 5 55.6% huawei H30-U10 17 (REL) armeabi-v7a 3 33.3% samsung GT-I9082 17 (REL) armeabi-v7a 1 11.1%
Tracked since it's a crash. Margaret, could you please help find an owner? Thanks!
Looking at the stack, looks like a regression from bug 1227325.
Assignee: nobody → ahunt
Blocks: 1227325
Flags: needinfo?(margaret.leibovic)
I can reproduce this on my Nexus 4 with Android 4 - to reproduce: 1) Open settings (3-dot menu -> settings) 2) Select Privacy 3) Select "Use master password" Expected: dialog appears allowing you to set a master password. Actual: the current dialog window crashes (and we then get returned to the main settings screen, where all the options are greyed) I tested this when looking at Bug 1227325 (the dialog worked fine then), so I'm guessing some other change elsewhere caused this. I noticed that we're no longer using the orangey/red theme for the settings screen, so it looks like something is messed up with our resource loading for the entire GeckoPreferences, which could possibly be causing this.
(In reply to Andrzej Hunt :ahunt from comment #4) > I can reproduce this on my Nexus 4 with Android 4 - to reproduce: > 1) Open settings (3-dot menu -> settings) > 2) Select Privacy > 3) Select "Use master password" > > Expected: dialog appears allowing you to set a master password. > Actual: the current dialog window crashes (and we then get returned to the > main settings screen, where all the options are greyed) > > I tested this when looking at Bug 1227325 (the dialog worked fine then), so > I'm guessing some other change elsewhere caused this. I noticed that we're > no longer using the orangey/red theme for the settings screen, so it looks > like something is messed up with our resource loading for the entire > GeckoPreferences, which could possibly be causing this. Actually, it looks like we only use our orange/red theming for Android >= 5.0, so the lack of theming isn't a regression. The crash also doesn't happen on an N4 running Android 5.0.1. (I'm guessing that means that there's something wrong with our theming inheritance on sdk-19 and below, but I'd need to investigate that more.)
(In reply to Andrzej Hunt :ahunt from comment #6) > Created attachment 8726475 [details] > MozReview Request: Bug 1250900 - Make GeckoPreferences inherit from > Theme.AppCompat so that TextLayout doesn't crash > > Review commit: https://reviewboard.mozilla.org/r/38023/diff/#index_header > See other reviews: https://reviewboard.mozilla.org/r/38023/ This is a tentative fix - it fixes the crash, but also changes the appearance of our preferences. The most noticeable aspect is that checkboxes are now material style checkboxes, but using black instead of orange like on Android >= 5, I've not noticed any other significant changes. We'd probably need to do the same thing for values/themes.xml to cover Android 2.3 too (I can crash using the same steps there too), which would probably have the same effect on the appearance.
Comment on attachment 8726475 [details] MozReview Request: Bug 1250900 - Make GeckoPreferences inherit from Theme.AppCompat so that TextLayout doesn't crash r?mcomella Review request updated; see interdiff: https://reviewboard.mozilla.org/r/38023/diff/1-2/
Attachment #8726475 - Attachment description: MozReview Request: Bug 1250900 - Make GeckoPreferences inherit from Theme.AppCompat so that TextLayout doesn't crash → MozReview Request: Bug 1250900 - Make GeckoPreferences inherit from Theme.AppCompat so that TextLayout doesn't crash r?mcomella
Attachment #8726475 - Flags: review?(michael.l.comella)
Comment on attachment 8726475 [details] MozReview Request: Bug 1250900 - Make GeckoPreferences inherit from Theme.AppCompat so that TextLayout doesn't crash r?mcomella https://reviewboard.mozilla.org/r/38023/#review35163 r+ but check with antlam that this is okay. He might prefer the alternatives: * not using the floating hint text in GeckoPreferences * Keeping the old floating hint text layout we used to use until we can properly style the GeckoPreferences with material (bug 1205124?)
Attachment #8726475 - Flags: review?(michael.l.comella) → review+
https://reviewboard.mozilla.org/r/38023/#review35163 fwiw, since we don't extend `AppCompatActivity` in `GeckoPreferences` but inherit from the AppCompat style, app compat & styling in the preferences might be inconsistent so it'd be to get out of this state asap.
(In reply to Michael Comella (:mcomella) from comment #9) > Comment on attachment 8726475 [details] > MozReview Request: Bug 1250900 - Make GeckoPreferences inherit from > Theme.AppCompat so that TextLayout doesn't crash r?mcomella > > https://reviewboard.mozilla.org/r/38023/#review35163 > > r+ but check with antlam that this is okay. He might prefer the alternatives: > * not using the floating hint text in GeckoPreferences > * Keeping the old floating hint text layout we used to use until we can > properly style the GeckoPreferences with material (bug 1205124?) Antlam: what are your opinions? Just for context: - We upgraded the textbox we use for the master password dialog (we now use the default Android EditText, with a floating hint - we previously used our own version that also had a floating hint) - But that crashes with our current theming on devices running 4.3 or below Possible solutions are: 1. We change our theme inheritance on 4.3 and below, which changes the appearance of the checkboxes (we now get Material style checkboxes, but they're black instead of orange). (I'll attach screenshots of this below) 2. We scrap the floating hints for the textbox in the master password dialog, no other changes 3. Revert the change (I don't think this is a great idea since we don't want to have to maintain functionality that Android provides, moreover our implementation had some subtle behavioural differences compared to the Android version).
Flags: needinfo?(alam)
Screenshot of preferences on 5.0 and newer
Screenshot of preferences on 4.3 without changes
Screenshot of preferences on 4.3 with "upgraded" theming
Additional Note: - I haven't figured out how to get orange checkboxes on 4.3 - using the same attributes that we use for 5 .0 and above doesn't change the colour. - The same fix doesn't cause the appearance of preferences on 2.3 (api 9/10) to change (or at least I didn't notice any differences)
Talked to :ahunt on IRC. tl;dr - Half Jellybean half Lollipop looks weird (comment 14) - We can just go with full Jellybean UI for Jellybean users (comment 13)
Flags: needinfo?(alam)
What's the status here? This bug is tracking 47.
Flags: needinfo?(ahunt)
(In reply to :Margaret Leibovic from comment #17) > What's the status here? This bug is tracking 47. Bug 1205124 will also fix this crash (it incorporates what the patch here does, but also ensures consistent Lollipop styling), I'll hopefully be landing that soon.
Flags: needinfo?(ahunt)
tracking-fennec: --- → 47+
Marking as duplicate: Bug 1205124 (which just landed on fx-team) fixes this. I've also requested tracking 47 on that bug.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Attachment #8726475 - Attachment is obsolete: true
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: