Closed Bug 727264 Opened 12 years ago Closed 12 years ago

java.lang.ClassCastException: java.lang.Integer at ProfileMigrator.java:196 if Background Data is turned off

Categories

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

13 Branch
ARM
Android
defect

Tracking

(firefox13 verified)

VERIFIED FIXED
Firefox 13
Tracking Status
firefox13 --- verified

People

(Reporter: nhirata, Assigned: gcp)

References

Details

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

Attachments

(2 files)

Attached file logcat
1. go to Android Settings -> Data delivery  -> uncheck Background data
2. install XUL build
3. setup sync
4. install Native build
5. Launch Native

Expected: no crash
Actual: crash

Note: 
1. Droid Pro 2.3, Nightly 02/14/2012
Severity: normal → critical
Keywords: crash
Whiteboard: [native-crash]
I don't think this is "Sync is set up" so much as "you have history to migrate".
Severity: critical → major
tracking-fennec: --- → ?
Summary: If Background Data is turned off, and sync is setup with XUL; upgrading to native and starting native will crash → java.lang.ClassCastException: java.lang.Integer at ProfileMigrator.java:196 if Background Data is turned off
Severity: major → critical
Assignee: nobody → gpascutto
This is a regression introduced by modifications in SQLiteBridge. Instead of returning an empty result it returns the number of rows changed, but none of the calling code expects that.
>I don't think this is "Sync is set up" so much as "you have history to migrate".

Just pointing out for the benefit of QA: it's the exact opposite: "you have places but NO history to migrate" :-)
Attached patch patchSplinter Review
Attachment #598894 - Flags: review?(gpascutto)
Comment on attachment 598894 [details] [diff] [review]
patch

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

The amount of changed rows is only returned if the query returns no results. So on a normal query, this will lose the first (and due to the ordering - most important) history + favicon entry.

Need to fix this to either always return the number of changed rows, make the behavior dependent on whether the query is SELECT/UPDATE/INSERT/DELETE, or return a proper cursor and change all the callers.
Attachment #598894 - Flags: review?(gpascutto) → review-
Depends on: 726821
Priority: -- → P1
tracking-fennec: ? → ---
Verified fixed on:

Firefox 13.0a1 (2012-02-29)
20120229031108
http://hg.mozilla.org/mozilla-central/rev/30b4f99a137c

--
Device: Motorola Droid PRO
OS: Android 2.3.3
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: