Closed Bug 725540 Opened 12 years ago Closed 12 years ago

Crash on bookmark removal -- java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.ImageView

Categories

(Firefox for Android Graveyard :: General, defect, P1)

ARM
Android
defect

Tracking

(firefox13 verified)

VERIFIED FIXED
Firefox 13
Tracking Status
firefox13 --- verified

People

(Reporter: aaronmt, Assigned: Margaret)

References

Details

(Keywords: crash, regression, reproducible, Whiteboard: [native-crash])

Crash Data

Attachments

(1 file)

D/GeckoBrowserProvider(31105): Updating image for URL: null
D/GeckoBrowserProvider(31105): Getting writable database for URI: content://org.mozilla.fennec.db.browser/bookmarks?profile=default
D/GeckoBrowserProvider(31105): Trying to update image for URL: null
D/GeckoBrowserProvider(31105): Deleted 2 rows for URI: content://org.mozilla.fennec.db.browser/bookmarks?profile=default
D/GeckoBrowserProvider(31105): Successful delete transaction: content://org.mozilla.fennec.db.browser/bookmarks?profile=default
D/GeckoBrowserProvider(31105): Getting readable database for URI: content://org.mozilla.fennec.db.browser/bookmarks?profile=default
D/GeckoBrowserProvider(31105): Query is on bookmarks: content://org.mozilla.fennec.db.browser/bookmarks?profile=default
D/GeckoBrowserProvider(31105): Using sort order title ASC.
D/GeckoBrowserProvider(31105): Running built query.
I/WindowManager(  197): createSurface Window{41be5270 Toast paused=false}: DRAW NOW PENDING
E/GeckoAppShell(31105): top level exception
E/GeckoAppShell(31105): java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.ImageView
E/GeckoAppShell(31105): 	at org.mozilla.gecko.AwesomeBarTabs$AwesomeCursorViewBinder.updateFavicon(AwesomeBarTabs.java:155)
E/GeckoAppShell(31105): 	at org.mozilla.gecko.AwesomeBarTabs$AwesomeCursorViewBinder.setViewValue(AwesomeBarTabs.java:190)
E/GeckoAppShell(31105): 	at android.widget.SimpleCursorTreeAdapter.bindView(SimpleCursorTreeAdapter.java:220)
E/GeckoAppShell(31105): 	at android.widget.SimpleCursorTreeAdapter.bindGroupView(SimpleCursorTreeAdapter.java:264)
E/GeckoAppShell(31105): 	at android.widget.CursorTreeAdapter.getGroupView(CursorTreeAdapter.java:207)
E/GeckoAppShell(31105): 	at android.widget.ExpandableListConnector.getView(ExpandableListConnector.java:445)
E/GeckoAppShell(31105): 	at android.widget.AbsListView.obtainView(AbsListView.java:2012)
E/GeckoAppShell(31105): 	at android.widget.ListView.measureHeightOfChildren(ListView.java:1244)
E/GeckoAppShell(31105): 	at android.widget.ListView.onMeasure(ListView.java:1155)
E/GeckoAppShell(31105): 	at android.view.View.measure(View.java:12603)
E/GeckoAppShell(31105): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4677)
E/GeckoAppShell(31105): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
E/GeckoAppShell(31105): 	at android.view.View.measure(View.java:12603)
E/GeckoAppShell(31105): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4677)
E/GeckoAppShell(31105): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
E/GeckoAppShell(31105): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
E/GeckoAppShell(31105): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
E/GeckoAppShell(31105): 	at android.view.View.measure(View.java:12603)
E/GeckoAppShell(31105): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4677)
E/GeckoAppShell(31105): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
E/GeckoAppShell(31105): 	at android.view.View.measure(View.java:12603)
E/GeckoAppShell(31105): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4677)
E/GeckoAppShell(31105): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
E/GeckoAppShell(31105): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
E/GeckoAppShell(31105): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
E/GeckoAppShell(31105): 	at android.view.View.measure(View.java:12603)
E/GeckoAppShell(31105): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4677)
E/GeckoAppShell(31105): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
E/GeckoAppShell(31105): 	at android.view.View.measure(View.java:12603)
E/GeckoAppShell(31105): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:812)
E/GeckoAppShell(31105): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
E/GeckoAppShell(31105): 	at android.view.View.measure(View.java:12603)
E/GeckoAppShell(31105): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4677)
E/GeckoAppShell(31105): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
E/GeckoAppShell(31105): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2072)
E/GeckoAppShell(31105): 	at android.view.View.measure(View.java:12603)
E/GeckoAppShell(31105): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1044)
E/GeckoAppShell(31105): 	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2418)
E/GeckoAppShell(31105): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/GeckoAppShell(31105): 	at android.os.Looper.loop(Looper.java:137)
E/GeckoAppShell(31105): 	at org.mozilla.gecko.GeckoApp$32.run(GeckoApp.java:1777)
E/GeckoAppShell(31105): 	at android.os.Handler.handleCallback(Handler.java:605)
E/GeckoAppShell(31105): 	at android.os.Handler.dispatchMessage(Handler.java:92)
E/GeckoAppShell(31105): 	at android.os.Looper.loop(Looper.java:137)
E/GeckoAppShell(31105): 	at android.app.ActivityThread.main(ActivityThread.java:4340)
E/GeckoAppShell(31105): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoAppShell(31105): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/GeckoAppShell(31105): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/GeckoAppShell(31105): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/GeckoAppShell(31105): 	at dalvik.system.NativeStart.main(Native Method)
I/WindowManager(  197): WIN DEATH: Window{41acaea0 SurfaceView paused=false}
I/ActivityManager(  197): Process org.mozilla.fennec (pid 31105) has died.
W/ActivityManager(  197): Force removing ActivityRecord{41da3ae0 org.mozilla.fennec/org.mozilla.gecko.AwesomeBar}: app died, no saved state
D/Zygote  (  117): Process 31105 exited cleanly (1)
I/WindowManager(  197): WIN DEATH: Window{4212bff0 org.mozilla.fennec/org.mozilla.fennec.App paused=false}
I/WindowManager(  197): WIN DEATH: Window{41a95cd0 org.mozilla.fennec/org.mozilla.gecko.AwesomeBar paused=false}
I/WindowManager(  197): WIN DEATH: Window{41be5270 Toast paused=false}

STR

1. Set up Sync
2. Remove a bookmark from the mobile tabs listing

--
Tested with an inbound build:
20120208153859
http://hg.mozilla.org/integration/mozilla-inbound/rev/9c4e640fb4d8
Samsung Galaxy Nexus (Android 4.0.2)
This happens only on entries without favicons.
Keywords: regression
Assignee: nobody → margaret.leibovic
Priority: -- → P1
Bug 722413 should fix this, if Brian can figure out the issues he's having with that. Otherwise, we need to update the changes from bug 721776 to update the bookmarks cursor using the new DB APIs added in bug 716918. This shouldn't be too hard, but it's probably not worth it if we're removing refreshBookmarks() so soon.
Crash Signature: [@ java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.ImageView at org.mozilla.gecko.AwesomeBarTabs$AwesomeCursorViewBinder.updateFavicon(AwesomeBarTabs.java)]
Depends on: 722413
Attached patch patchSplinter Review
I don't know what the status of bug 722413 is, but this fixes the crash. Conveniently, we already have an AsyncTask for refreshing the children cursors.
Attachment #595853 - Flags: review?(mark.finkle)
Attachment #595853 - Flags: review?(bnicholson)
(Regression caused by bug 716918)
Blocks: 716918
No longer depends on: 722413
Comment on attachment 595853 [details] [diff] [review]
patch

Looks OK to me, but this is obviously getting a bit tricky.
Attachment #595853 - Flags: review?(mark.finkle) → review+
(In reply to Mark Finkle (:mfinkle) from comment #5)
> Comment on attachment 595853 [details] [diff] [review]
> patch
> 
> Looks OK to me, but this is obviously getting a bit tricky.

Yeah, this CursorTreeAdapter makes things tricky. Maybe we can simplify things when we implement a more complete bookmarks UI.

Pushed to inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/779ca542b71f
Attachment #595853 - Flags: review?(bnicholson)
https://hg.mozilla.org/mozilla-central/rev/779ca542b71f
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Comment on attachment 595853 [details] [diff] [review]
patch

[Approval Request Comment]
Regression caused by (bug #): bug 716918 (not uplifted yet)
User impact if declined: we need this in order to uplift bug 716918
Testing completed (on m-c, etc.): landed on m-c
Attachment #595853 - Flags: approval-mozilla-beta?
Attachment #595853 - Flags: approval-mozilla-aurora?
Attachment #595853 - Flags: approval-mozilla-beta?
Attachment #595853 - Flags: approval-mozilla-beta+
Attachment #595853 - Flags: approval-mozilla-aurora?
Attachment #595853 - Flags: approval-mozilla-aurora+
Comment on attachment 595853 [details] [diff] [review]
patch

Clearing approval for Aurora 12 and Beta 11 because we are not currently planning a Native Fennec release of these versions.  If this changes in the future, we will likely do a mass uplift of all native fennec changes.  For now, let's get these bugs off the channel triage radar.

[Filter on the string "mbrubeck-bugspam" if you want to delete all of these emails at once.]
Attachment #595853 - Flags: approval-mozilla-beta+
Attachment #595853 - Flags: approval-mozilla-aurora+
Verified fixed on:

Firefox 13.0a1 (2012-03-02)
20120302031112
http://hg.mozilla.org/mozilla-central/rev/3a7b9e61c263

--
Device: Samsung Galaxy S2
OS: Android 2.3.4
Status: RESOLVED → VERIFIED
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: