Removing a bookmark repeatedly crashes Fennec; java.lang.IllegalArgumentException: Empty values at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1797)

VERIFIED FIXED

Status

()

defect
P3
critical
VERIFIED FIXED
8 years ago
3 years ago

People

(Reporter: gaby2300, Assigned: lucasr)

Tracking

({crash, reproducible})

unspecified
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox11 fixed, fennec11+)

Details

(Whiteboard: [testday-20111111],[native-crash:P1][ICS])

Attachments

(2 attachments, 2 obsolete attachments)

Reporter

Description

8 years ago
Unbookmarking several different sites the android message about the application (Fennec) not working shows up forcing me to close it. I restarted the app several times and each time as I unbookmarked a site the same message showed up
Reporter

Updated

8 years ago
Keywords: crash
Whiteboard: [testday-20111111]
Posted file logcat of crash
Attaching logcat.  able to reproduce on Galaxy Tab 10.1.

Repro: on tablet UI, keep bookmarking and unbookmarking a site.  Crash.

In particular, the crash is around RemoveBookmarkTask.doInBackground.

11-11 12:55:38.420: DEBUG/dalvikvm(389): GC_CONCURRENT freed 418K, 10% free 6666K/7367K, paused 3ms+7ms
11-11 12:55:38.420: VERBOSE/AudioPolicyManager(230): releaseOutput() 1
11-11 12:55:38.420: DEBUG/WindowManager(292): addWindowToListInOrder() : current mSkipWidgetFocus='true'
11-11 12:55:38.430: INFO/SurfaceFlinger(227): id=102(7) createSurface 0x13902c for pid 2599 (1x1),1 flag=0, Toast
11-11 12:55:38.430: ERROR/DatabaseUtils(1053): Writing exception to parcel
11-11 12:55:38.430: ERROR/DatabaseUtils(1053): java.lang.IllegalArgumentException: Empty values
11-11 12:55:38.430: ERROR/DatabaseUtils(1053):     at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1797)
11-11 12:55:38.430: ERROR/DatabaseUtils(1053):     at android.database.sqlite.SQLiteDatabase.update(SQLiteDatabase.java:1780)
11-11 12:55:38.430: ERROR/DatabaseUtils(1053):     at com.android.browser.provider.BrowserProvider2.updateHistoryInTransaction(BrowserProvider2.java:1642)
11-11 12:55:38.430: ERROR/DatabaseUtils(1053):     at com.android.browser.provider.BrowserProvider2.updateInTransaction(BrowserProvider2.java:1437)
11-11 12:55:38.430: ERROR/DatabaseUtils(1053):     at com.android.browser.provider.SQLiteContentProvider.update(SQLiteContentProvider.java:157)
11-11 12:55:38.430: ERROR/DatabaseUtils(1053):     at android.content.ContentProvider$Transport.update(ContentProvider.java:233)
11-11 12:55:38.430: ERROR/DatabaseUtils(1053):     at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:208)
11-11 12:55:38.430: ERROR/DatabaseUtils(1053):     at android.os.Binder.execTransact(Binder.java:320)
11-11 12:55:38.430: ERROR/DatabaseUtils(1053):     at dalvik.system.NativeStart.run(Native Method)
11-11 12:55:38.440: WARN/dalvikvm(2599): threadid=15: thread exiting with uncaught exception (group=0x40136760)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599): FATAL EXCEPTION: AsyncTask #2
11-11 12:55:38.440: ERROR/AndroidRuntime(2599): java.lang.RuntimeException: An error occured while executing doInBackground()
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at android.os.AsyncTask$3.done(AsyncTask.java:266)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1081)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:574)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at java.lang.Thread.run(Thread.java:1020)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599): Caused by: java.lang.IllegalArgumentException: Empty values
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:166)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:136)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at android.content.ContentProviderProxy.update(ContentProviderNative.java:534)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at android.content.ContentResolver.update(ContentResolver.java:847)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at org.mozilla.gecko.Tab$RemoveBookmarkTask.doInBackground(Tab.java:379)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at org.mozilla.gecko.Tab$RemoveBookmarkTask.doInBackground(Tab.java:373)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at android.os.AsyncTask$2.call(AsyncTask.java:252)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
11-11 12:55:38.440: ERROR/AndroidRuntime(2599):     ... 4 more
11-11 12:55:38.460: WARN/ActivityManager(292):   Force finishing activity org.mozilla.fennec_dougt/.App
11-11 12:55:38.470: VERBOSE/WindowOrientationListener(292): rotation : 0   Angle: 356   tilt: 37
11-11 12:55:38.500: ERROR/android.os.Debug(292): Dumpstate > /data/log/dumpstate_app_error
Reporter

Comment 2

8 years ago
I found this bug using the 20111111 build in my Samsung Galaxy Tab 10.1 and Android 3.1
Reporter

Comment 3

8 years ago
I found this bug using the 20111111 build, in a Samsung Galaxy Tab 10.1 and Android 3.1
Reporter

Comment 4

8 years ago
Steps to reproduce:

1) Browse to any site.
2) Tap the bookmark button.
3) The site is not bookmarked.
4) Tap Menu.
5) Tap the bookmark button.
6) The site is bookmarked.
7) Tap the bookmark button.
8) The site is unbookmarked.
9) The android message about the application (Fennec) not working shows up and it forces the user to close the app.

Unbookmarking the site should not cause the above message to appear.
I would mark this priority P2 or P3, cause the crash is edge-casey from the STRs.
Summary: Unbookmarking the android message about the application not working shows up → Removing a bookmark repeatedly crashes Fennec
Duplicate of this bug: 701917
Whiteboard: [testday-20111111] → [testday-20111111],[native-crash]
Summary: Removing a bookmark repeatedly crashes Fennec → Removing a bookmark repeatedly crashes Fennec; java.lang.IllegalArgumentException: Empty values at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1797)
Priority: -- → P3
Assignee: nobody → gpascutto
Setting to end user P1 as it is visible and we have steps to reproduce.
Keywords: reproducible
Whiteboard: [testday-20111111],[native-crash] → [testday-20111111],[native-crash:P1]
Note: Does not block the nightly swicthover
ICS/Honeycomb stack


E/AndroidRuntime( 1297): FATAL EXCEPTION: Thread-16
E/AndroidRuntime( 1297): java.lang.IllegalArgumentException: Empty values
E/AndroidRuntime( 1297): 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:166)
E/AndroidRuntime( 1297): 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:136)
E/AndroidRuntime( 1297): 	at android.content.ContentProviderProxy.update(ContentProviderNative.java:534)
E/AndroidRuntime( 1297): 	at android.content.ContentResolver.update(ContentResolver.java:847)
E/AndroidRuntime( 1297): 	at org.mozilla.gecko.Tab$RemoveBookmarkTask.doInBackground(Tab.java:395)
E/AndroidRuntime( 1297): 	at org.mozilla.gecko.Tab$RemoveBookmarkTask.doInBackground(Tab.java:389)
E/AndroidRuntime( 1297): 	at org.mozilla.gecko.GeckoAsyncTask$1.run(GeckoAsyncTask.java:47)
E/AndroidRuntime( 1297): 	at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 1297): 	at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 1297): 	at android.os.Looper.loop(Looper.java:132)
E/AndroidRuntime( 1297): 	at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:147)
Whiteboard: [testday-20111111],[native-crash:P1] → [testday-20111111],[native-crash:P1][ICS]
Assignee

Comment 10

8 years ago
Found this bug while doing something else. Gian, I couldn't find you around today so I thought it would be fine to just drop a patch here. It seems there's a bug in Android that somehow considers the "0" string value for BOOKMARK as an empty value.
Attachment #576797 - Flags: review?(gpascutto)
Assignee

Comment 11

8 years ago
Seems to be caused by changes in the db schema on Honeycomb/ICS. Adding bookmarks is broken as well (see bug 698828). Ignore my patch for now.
Assignee

Updated

8 years ago
Assignee: gpascutto → lucasr.at.mozilla
Reporter

Comment 12

8 years ago
I can still reproduce this bug in today's birch build 200111204
(In reply to Gabriela from comment #12)
> I can still reproduce this bug in today's birch build 200111204

Yes, this is due to a different database schema change in Honeycomb/ICS and the patch submitted in this bug did not land. Bookmarking on your Galaxy Tab will not work.
Assignee

Comment 14

8 years ago
Built on top of changes in bug 704490.
Attachment #579095 - Flags: review?(blassey.bugs)
Assignee

Updated

8 years ago
Depends on: 704490
Assignee

Updated

8 years ago
Attachment #576797 - Attachment is obsolete: true
Attachment #576797 - Flags: review?(gpascutto)
Comment on attachment 579095 [details] [diff] [review]
Fix bookmark removal in Honeycomb/ICS

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

::: mobile/android/base/db/AndroidBrowserDB.java
@@ +190,5 @@
> +    public void removeBookmarkPost11(ContentResolver cr, String uri) {
> +        cr.delete(Browser.BOOKMARKS_URI,
> +                  Browser.BookmarkColumns.BOOKMARK + " = 1 AND " +
> +                  Browser.BookmarkColumns.URL + " = ?",
> +                  new String[] { uri });

won't this delete it from history? If not, please add a comment
Assignee

Comment 16

8 years ago
(In reply to Brad Lassey [:blassey] from comment #15)
> Comment on attachment 579095 [details] [diff] [review]
> Fix bookmark removal in Honeycomb/ICS
> 
> Review of attachment 579095 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: mobile/android/base/db/AndroidBrowserDB.java
> @@ +190,5 @@
> > +    public void removeBookmarkPost11(ContentResolver cr, String uri) {
> > +        cr.delete(Browser.BOOKMARKS_URI,
> > +                  Browser.BookmarkColumns.BOOKMARK + " = 1 AND " +
> > +                  Browser.BookmarkColumns.URL + " = ?",
> > +                  new String[] { uri });
> 
> won't this delete it from history? If not, please add a comment

Misread Android's source code a bit. Submitting the correct patch now.
Assignee

Comment 17

8 years ago
Unfortunately, there's no way to switch the bookmark bit off only using Android < 11 API. We have to tap into the new content provider bits.
Attachment #579095 - Attachment is obsolete: true
Attachment #579095 - Flags: review?(blassey.bugs)
Attachment #580877 - Flags: review?(blassey.bugs)
Attachment #580877 - Flags: review?(blassey.bugs) → review+
Assignee

Comment 18

8 years ago
Pushed: http://hg.mozilla.org/mozilla-central/rev/98037e1999a6
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Samsung Galaxy Tab 10.1 (Android 3.1)
20111213061518
http://hg.mozilla.org/mozilla-central/rev/e79b3396889c

Looking to also verify on ICS.
Status: RESOLVED → VERIFIED
Reporter

Comment 20

8 years ago
Samsung Galaxy Tab 10.1 (Android 3.1)
Seems fixed in build 20111213
tracking-fennec: --- → 11+
You need to log in before you can comment on or make changes to this bug.