Closed
Bug 718904
Opened 12 years ago
Closed 12 years ago
java.lang.ClassCastException: java.lang.String at org.mozilla.gecko.AwesomeBar.onCreateContextMenu(AwesomeBar.java:421)
Categories
(Firefox for Android Graveyard :: General, defect, P3)
Tracking
(firefox11 fixed, firefox12 fixed, firefox13 verified)
VERIFIED
FIXED
Firefox 13
People
(Reporter: nhirata, Assigned: wesj)
References
Details
(Keywords: crash, Whiteboard: [native-crash])
Crash Data
Attachments
(2 files)
1.55 KB,
patch
|
lucasr
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
1.22 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
From Soccoro Reports: https://crash-stats.mozilla.com/report/index/ead225f7-821f-4074-83c7-b26c32120115 https://crash-stats.mozilla.com/report/index/128464cf-edb0-4bfd-b758-a64042120115 Java Crash in app notes: java.lang.ClassCastException: java.lang.String at org.mozilla.gecko.AwesomeBar.onCreateContextMenu(AwesomeBar.java:421) at android.view.View.createContextMenu(View.java:4363) at com.android.internal.view.menu.ContextMenuBuilder.show(ContextMenuBuilder.java:81) at com.android.internal.policy.impl.PhoneWindow$DecorView.showContextMenuForChild(PhoneWindow.java:1983) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:466) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:466) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:466) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:466) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:466) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:466) Note: Occurs on Motorola Triumph
Comment 1•12 years ago
|
||
No idea if we can reproduce this crash, but based on the build (2012-01-15 12.0a1)it should be this line: http://hg.mozilla.org/mozilla-central/annotate/c98283f80ae7/mobile/android/base/AwesomeBar.java#l421 Cursor cursor = (Cursor)selectedItem; The error would indicate that we are trying to cast selectedItem to a Cursor, but selectedItem is a String. How could that happen?
Assignee: nobody → wjohnston
Comment 2•12 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #1) > No idea if we can reproduce this crash, but based on the build (2012-01-15 > 12.0a1)it should be this line: > http://hg.mozilla.org/mozilla-central/annotate/c98283f80ae7/mobile/android/ > base/AwesomeBar.java#l421 > > Cursor cursor = (Cursor)selectedItem; > > The error would indicate that we are trying to cast selectedItem to a > Cursor, but selectedItem is a String. How could that happen? Weird. Both Bookmark and Top Sites ListViews are cursor-based. The only explanation I can think of is that this bug is triggered by tapping-and-holding on top of a History section header ("Today", "Yesterday", "7 days ago", etc) which is a string element.
Comment 3•12 years ago
|
||
This is very brittle code. See bug 704467 for another workaround I added to protect against a similar situation.
Updated•12 years ago
|
Priority: -- → P3
Assignee | ||
Comment 4•12 years ago
|
||
This fixes A bug with tapping on the header rows in the history pane. It does not touch the code that apparently crashed here. Nor does it happen on bing maps like the comments in the crash report suggest.
Attachment #591253 -
Flags: review?(lucasr.at.mozilla)
Comment 5•12 years ago
|
||
Comment on attachment 591253 [details] [diff] [review] Patch Review of attachment 591253 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/AwesomeBar.java @@ +408,5 @@ > ExpandableListView exList = (ExpandableListView)list; > int childPosition = exList.getPackedPositionChild(info.packedPosition); > int groupPosition = exList.getPackedPositionGroup(info.packedPosition); > + > + // check if long tap is on a header row nit: "Check"
Attachment #591253 -
Flags: review?(lucasr.at.mozilla) → review+
Assignee | ||
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/d9120155ac87 Landed on inbound. NOTE again this does NOT fix this particular bug, I was just apparently to lazy to file a follow up for it.
Assignee | ||
Comment 7•12 years ago
|
||
Comment on attachment 591253 [details] [diff] [review] Patch [Approval Request Comment] Regression caused by (bug #): bug 711905 User impact if declined: potential crashes when long tapping on headers (Today, Yesterday, etc). Testing completed (on m-c, etc.): Landed on central Jan 25 Risk to taking this patch (and alternatives if risky): Little risk.
Attachment #591253 -
Flags: approval-mozilla-aurora?
Comment 8•12 years ago
|
||
Comment on attachment 591253 [details] [diff] [review] Patch [Triage Comment] Mobile only - approved for Aurora.
Attachment #591253 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d9120155ac87
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
Comment 10•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/38d3435b65f0
status-firefox11:
--- → fixed
Comment 11•12 years ago
|
||
It's not fixed in Fx 11: https://crash-stats.mozilla.com/report/list?query_search=signature&query_type=contains&reason_type=contains&range_value=4&range_unit=weeks&hang_type=any&process_type=any&signature=java.lang.ClassCastException%3A%20java.lang.String%20at%20org.mozilla.gecko.AwesomeBar.onCreateContextMenu%28AwesomeBar.java%29
Status: RESOLVED → REOPENED
Crash Signature: [@ TouchBadMemory ] → [@ TouchBadMemory ]
[@ java.lang.ClassCastException: java.lang.String at org.mozilla.gecko.AwesomeBar.onCreateContextMenu(AwesomeBar.java)]
Resolution: FIXED → ---
Assignee | ||
Comment 12•12 years ago
|
||
I'm still not sure what causes this. I think we're best to catch it and hope that we can find a way to reproduce.
Attachment #595190 -
Flags: review?(mark.finkle)
Comment 13•12 years ago
|
||
Comment on attachment 595190 [details] [diff] [review] Patch we should remove the logging at some point. not right away.
Attachment #595190 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 14•12 years ago
|
||
Comment on attachment 595190 [details] [diff] [review] Patch Low risk. Mobile only. Prevents a crash.
Attachment #595190 -
Flags: approval-mozilla-beta?
Attachment #595190 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 15•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/82628a241e74
Updated•12 years ago
|
status-firefox12:
--- → affected
Target Milestone: Firefox 12 → Firefox 13
Comment 16•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/82628a241e74
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Attachment #595190 -
Flags: approval-mozilla-beta?
Attachment #595190 -
Flags: approval-mozilla-beta+
Attachment #595190 -
Flags: approval-mozilla-aurora?
Attachment #595190 -
Flags: approval-mozilla-aurora+
Reporter | ||
Comment 18•12 years ago
|
||
Crash occurs on build : 20120209042012 on Model: 'SAMSUNG-SGH-I997' Not sure, maybe needs to clear data on the phone? Waiting to see if there's another crash that reoccurs. From Socorro: https://crash-stats.mozilla.com/report/index/d3a96fb8-3281-4947-b880-0ed192120209 java.lang.ClassCastException: java.lang.String at org.mozilla.gecko.AwesomeBar.onCreateContextMenu(AwesomeBar.java:420) at android.view.View.createContextMenu(View.java:4420) at com.android.internal.view.menu.ContextMenuBuilder.show(ContextMenuBuilder.java:81) at com.android.internal.policy.impl.PhoneWindow$DecorView.showContextMenuForChild(PhoneWindow.java:1933) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:460) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:460) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:460) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:460) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:460) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:460) at android.widget.AbsListView.performLongPress(AbsListView.java:2032) at android.widget.AbsListView.access$600(AbsListView.java:99) at android.widget.AbsListView$CheckForLongPress.run(AbsListView.java:1985) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:130) at org.mozilla.gecko.GeckoApp$32.run(GeckoApp.java:1777) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3687) 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:842) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method)
Assignee | ||
Comment 19•12 years ago
|
||
http://hg.mozilla.org/releases/mozilla-aurora/rev/94a9071cf559
Assignee | ||
Comment 20•12 years ago
|
||
http://hg.mozilla.org/releases/mozilla-beta/rev/332a8c115a74
Comment 21•12 years ago
|
||
This crash doesn't occur on the latest Nightly build. Closing bug as: Verified fixed on: Firefox 13.0a1 (2012-03-01) 20120301031135 http://hg.mozilla.org/mozilla-central/rev/1c3b291d0830 -- Device: Samsung Galaxy S2 OS: Android 2.3.4
Status: RESOLVED → VERIFIED
status-firefox13:
--- → verified
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•