android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x2/d=0x1010350 a=<n>}: at android.content.res.Resources.loadColorStateList(Resources.java) mainly on HTC devices running Gingerbread

RESOLVED FIXED in Firefox 23

Status

()

defect
--
critical
RESOLVED FIXED
6 years ago
3 years ago

People

(Reporter: scoobidiver, Assigned: sriram)

Tracking

(4 keywords)

23 Branch
Firefox 24
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox22 unaffected, firefox23+ fixed, firefox24 fixed, fennec23+)

Details

(Whiteboard: [native-crash], crash signature)

Attachments

(1 attachment)

There's one crash in 23.0a1/20130427, bp-55d256b6-b46c-454e-b231-b1def2130427, after the fix of bug 861658.

android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x2/d=0x1010350 a=3}
	at android.content.res.Resources.loadColorStateList(Resources.java:1822)
	at android.content.res.TypedArray.getColorStateList(TypedArray.java:342)
	at android.widget.TextView.<init>(TextView.java:458)
	at android.widget.TextView.<init>(TextView.java:385)
	at java.lang.reflect.Constructor.constructNative(Native Method)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
	at android.view.LayoutInflater.createView(LayoutInflater.java:505)
	at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
	at com.android.internal.view.menu.MenuItemImpl.createItemView(MenuItemImpl.java:609)
	at com.android.internal.view.menu.MenuItemImpl.getItemView(MenuItemImpl.java:594)
	at com.android.internal.view.menu.MenuBuilder$MenuAdapter.getView(MenuBuilder.java:1188)
	at android.widget.AbsListView.obtainView(AbsListView.java:1430)
	at android.widget.ListView.measureHeightOfChildren(ListView.java:1264)
	at android.widget.ListView.onMeasure(ListView.java:1127)
	at android.view.View.measure(View.java:8526)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:386)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
	at android.view.View.measure(View.java:8526)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:386)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
	at com.android.internal.widget.WeightedLinearLayout.onMeasure(WeightedLinearLayout.java:60)
	at android.view.View.measure(View.java:8526)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
	at android.view.View.measure(View.java:8526)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3224)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
	at android.view.View.measure(View.java:8526)
	at android.view.ViewRoot.performTraversals(ViewRoot.java:902)
	at android.view.ViewRoot.handleMessage(ViewRoot.java:1957)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:150)
	at android.app.ActivityThread.main(ActivityThread.java:4263)
	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:839)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/query/query?product=FennecAndroid&query_search=signature&query_type=contains&query=android.content.res.Resources.loadColorStateList&do_query=1
There are two crashes from another user in today's build so the regression range might be:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=a6104e0e5a2c&tochange=0e45f1b9521f
It might be a regression from bug 863379.
Keywords: regression
Version: Trunk → Firefox 23
Comments talk about long tapping in the address bar or in one of the top sites.
> Comments talk about long tapping in the address bar or in one of the top
> sites.

Comment #0's https://crash-stats.mozilla.com/report/index/55d256b6-b46c-454e-b231-b1def2130427

HTC Supersonic (EVO 4G). Kevin can you try the EVO 4G?
Flags: needinfo?(kbrosnan)
Summary: android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x2/d=0x1010350 a=<n>}: at android.content.res.Resources.loadColorStateList(Resources.java) on Gingerbread → android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x2/d=0x1010350 a=<n>}: at android.content.res.Resources.loadColorStateList(Resources.java) on HTC devices running Gingerbread
It's #6 top crasher in 23.0a1.
Keywords: topcrash
Steps to reproduce?
(In reply to Lucas Rocha (:lucasr) from comment #5)
> Steps to reproduce?
See comment 2.
Summary: android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x2/d=0x1010350 a=<n>}: at android.content.res.Resources.loadColorStateList(Resources.java) on HTC devices running Gingerbread → android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x2/d=0x1010350 a=<n>}: at android.content.res.Resources.loadColorStateList(Resources.java) mainly on HTC devices running Gingerbread
No luck reproducing on my HTC Nexus One (Android 2.3); I don't have any 2.3 HTC devices with SenseUI if that makes any difference.
QA Contact: kbrosnan
tracking-fennec: --- → ?
I am able to reproduce this on HTC Desire Z(Android 2.3.3) on Firefox for Android 23.0a1 (2013-05-07)
Keywords: reproducible
Teodora, what are exactly your steps to reproduce?
Flags: needinfo?(teodora.vermesan)
Steps to reproduce:
1. Open Firefox
2. Long tap on the awesomebar
Flags: needinfo?(teodora.vermesan)
Needs an assignee now that there are steps.
Flags: needinfo?(kbrosnan)
tracking-fennec: ? → 23+
Assignee: nobody → sriram
I have a HTC desire running Froyo and I couldn't reproduce this issue.
(In reply to Sriram Ramasubramanian [:sriram] from comment #12)
> I have a HTC desire running Froyo and I couldn't reproduce this issue.

Check to see if Kevin or Erin have a HTC Desire Z or HD you can try.
I dropped off a HTC Evo 3d that can repro.
Posted patch PatchSplinter Review
The themes.xml had references to "textColorLinkInverse", which is available only in 11+. This caused the crashes. Ideally we should use a color resource directly here. However, we don't use the textColorLink anywhere, and we can safely re-use it here for the sake of completeness. This patch works fine without crashing.
Attachment #748932 - Flags: review?(mark.finkle)
Comment on attachment 748932 [details] [diff] [review]
Patch

Will it be bad to change textColorLinkInverse to textColorLink in Xxx.Inverse styles?

r+ but look into my question
Attachment #748932 - Flags: review?(mark.finkle) → review+
(In reply to Mark Finkle (:mfinkle) from comment #16)
> Comment on attachment 748932 [details] [diff] [review]
> Patch
> 
> Will it be bad to change textColorLinkInverse to textColorLink in
> Xxx.Inverse styles?
> 
> r+ but look into my question

That color is not used anywhere. It's for the sake of completion I added it. So we won't run into any problem with that.
https://hg.mozilla.org/mozilla-central/rev/b4bd174a6a18
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
This is also reproducible when trying to use the Lightweight Theme Switcher addon on the HTC Desire Z (Android 2.3.3) on Aurora 23.0a2 2013-05-15
Crash Signature: [@ android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x2/d=0x1010350 a=3}: at android.content.res.Resources.loadColorStateList(Resources.java)] → [@ android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x2/d=0x1010350 a=3}: at android.content.res.Resources.loadColorStateList(Resources.java)] [@ android.content.res.Resources$NotFoundExcepti…
When is the patch uplifted to Aurora?
Sriram - This needs an uplift. Please request one.
Flags: needinfo?(sriram)
Comment on attachment 748932 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): New styles.
User impact if declined: HTC phones running 2.3 will crash.
Testing completed (on m-c, etc.): m-c on 05/15
Risk to taking this patch (and alternatives if risky): None. We don't use the "textColorLink". Just that HTC phones want to know the value even when not using it!
String or IDL/UUID changes made by this patch: None.
Attachment #748932 - Flags: approval-mozilla-aurora?
Flags: needinfo?(sriram)
Attachment #748932 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
For the record, I saw this (not in Fennec, but in ABS code) running on a Samsung GT-S5570, Android version 2.3.6.
You need to log in before you can comment on or make changes to this bug.