Closed Bug 711988 Opened 8 years ago Closed 8 years ago

Crash on startup - Top Level Exception -- java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow

Categories

(Firefox for Android :: General, defect, P3, critical)

ARM
Android
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
fennec 11+ ---

People

(Reporter: aaronmt, Unassigned)

References

Details

(Keywords: crash, Whiteboard: [native-crash], [ICS], [QA^], startupcrash)

Crash Data

Attachments

(1 file, 1 obsolete file)

D/GeckoAwesomeBarTabs( 3090): Creating AwesomeBarTabs
D/GeckoAwesomeBarTabs( 3090): Creating All Pages tab
D/GeckoAwesomeBarTabs( 3090): Creating Bookmarks tab
D/GeckoAwesomeBarTabs( 3090): Creating History tab
V/PhoneStatusBar(  221): setLightsOn(true)
I/ActivityManager(  154): Displayed org.mozilla.fennec/org.mozilla.gecko.AwesomeBar: +233ms
I/GeckoApp( 3090): stop
D/dalvikvm(  334): GC_CONCURRENT freed 464K, 7% free 10683K/11399K, paused 7ms+17ms
D/dalvikvm(  154): GC_CONCURRENT freed 996K, 37% free 13570K/21319K, paused 2ms+8ms
D/dalvikvm( 3090): GC_CONCURRENT freed 5478K, 35% free 10758K/16327K, paused 4ms+4ms
D/dalvikvm( 3090): GC_CONCURRENT freed 515K, 35% free 10696K/16327K, paused 2ms+3ms
D/AudioHardware(   83): AudioHardware pcm playback is going to standby.
D/AudioHardware(   83): closePcmOut_l() mPcmOpenCnt: 1
D/dalvikvm( 1792): GC_CONCURRENT freed 449K, 6% free 9276K/9863K, paused 2ms+2ms
D/dalvikvm( 3090): GC_CONCURRENT freed 532K, 35% free 10720K/16327K, paused 2ms+4ms
D/dalvikvm( 3090): GC_CONCURRENT freed 514K, 35% free 10708K/16327K, paused 2ms+5ms
D/dalvikvm( 1792): GC_EXPLICIT freed 138K, 7% free 9232K/9863K, paused 20ms+3ms
D/dalvikvm( 3090): GC_CONCURRENT freed 463K, 35% free 10697K/16327K, paused 2ms+3ms
D/dalvikvm( 3090): GC_CONCURRENT freed 424K, 35% free 10732K/16327K, paused 2ms+4ms
D/dalvikvm( 3090): GC_CONCURRENT freed 558K, 35% free 10731K/16327K, paused 6ms+4ms
D/dalvikvm( 3090): GC_CONCURRENT freed 513K, 35% free 10712K/16327K, paused 3ms+4ms
D/dalvikvm( 1792): GC_CONCURRENT freed 351K, 6% free 9285K/9863K, paused 1ms+5ms
D/dalvikvm( 3090): GC_CONCURRENT freed 538K, 35% free 10726K/16327K, paused 1ms+4ms
D/GeckoApp( 3090): EDIT
I/GeckoApp( 3090): Got message: Content:StateChange
I/GeckoApp( 3090): State - 983041
I/GeckoApp( 3090): Got a document start
D/dalvikvm(  154): GC_EXPLICIT freed 1375K, 41% free 12781K/21319K, paused 2ms+5ms
I/GeckoApp( 3090): restart
W/GeckoApp( 3090): zerdatime 1324308358222 - onStart
I/GeckoApp( 3090): start
I/GeckoApp( 3090): resume
I/GeckoApp( 3090): Got message: Content:StateChange
I/GeckoApp( 3090): State - 196610
E/CursorWindow( 3090): Failed to read row 0, column 2 from a CursorWindow which has 0 rows, 5 columns.
E/GeckoApp( 3090): top level exception
E/GeckoApp( 3090): java.lang.IllegalStateException: Couldn't read row 0, col 2 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
E/GeckoApp( 3090): 	at android.database.CursorWindow.nativeGetString(Native Method)
E/GeckoApp( 3090): 	at android.database.CursorWindow.getString(CursorWindow.java:442)
E/GeckoApp( 3090): 	at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)
E/GeckoApp( 3090): 	at android.database.CursorWrapper.getString(CursorWrapper.java:114)
E/GeckoApp( 3090): 	at android.database.CursorWrapper.getString(CursorWrapper.java:114)
E/GeckoApp( 3090): 	at org.mozilla.gecko.AboutHomeContent$TopSitesViewBinder.updateTitle(AboutHomeContent.java:340)
E/GeckoApp( 3090): 	at org.mozilla.gecko.AboutHomeContent$TopSitesViewBinder.setViewValue(AboutHomeContent.java:358)
E/GeckoApp( 3090): 	at android.widget.SimpleCursorAdapter.bindView(SimpleCursorAdapter.java:146)
E/GeckoApp( 3090): 	at android.widget.CursorAdapter.getView(CursorAdapter.java:250)
E/GeckoApp( 3090): 	at android.widget.AbsListView.obtainView(AbsListView.java:2012)
E/GeckoApp( 3090): 	at android.widget.GridView.onMeasure(GridView.java:1026)
E/GeckoApp( 3090): 	at org.mozilla.gecko.AboutHomeContent$TopSitesGridView.onMeasure(AboutHomeContent.java:303)
E/GeckoApp( 3090): 	at android.view.View.measure(View.java:12723)
E/GeckoApp( 3090): 	at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:594)
E/GeckoApp( 3090): 	at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:376)
E/GeckoApp( 3090): 	at android.view.View.measure(View.java:12723)
E/GeckoApp( 3090): 	at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:594)
E/GeckoApp( 3090): 	at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:376)
E/GeckoApp( 3090): 	at android.view.View.measure(View.java:12723)
E/GeckoApp( 3090): 	at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1163)
E/GeckoApp( 3090): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
E/GeckoApp( 3090): 	at android.widget.ScrollView.onMeasure(ScrollView.java:312)
E/GeckoApp( 3090): 	at android.view.View.measure(View.java:12723)
E/GeckoApp( 3090): 	at android.widget.RelativeLayout.measureChild(RelativeLayout.java:579)
E/GeckoApp( 3090): 	at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:392)
E/GeckoApp( 3090): 	at android.view.View.measure(View.java:12723)
E/GeckoApp( 3090): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
E/GeckoApp( 3090): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369)
E/GeckoApp( 3090): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:660)
E/GeckoApp( 3090): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
E/GeckoApp( 3090): 	at android.view.View.measure(View.java:12723)
E/GeckoApp( 3090): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
E/GeckoApp( 3090): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
E/GeckoApp( 3090): 	at android.view.View.measure(View.java:12723)
E/GeckoApp( 3090): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:812)
E/GeckoApp( 3090): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:553)
E/GeckoApp( 3090): 	at android.view.View.measure(View.java:12723)
E/GeckoApp( 3090): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698)
E/GeckoApp( 3090): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:293)
E/GeckoApp( 3090): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2092)
E/GeckoApp( 3090): 	at android.view.View.measure(View.java:12723)
E/GeckoApp( 3090): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1442)
E/GeckoApp( 3090): 	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442)
E/GeckoApp( 3090): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/GeckoApp( 3090): 	at android.os.Looper.loop(Looper.java:137)
E/GeckoApp( 3090): 	at org.mozilla.gecko.GeckoApp$33.run(GeckoApp.java:1500)
E/GeckoApp( 3090): 	at android.os.Handler.handleCallback(Handler.java:605)
E/GeckoApp( 3090): 	at android.os.Handler.dispatchMessage(Handler.java:92)
E/GeckoApp( 3090): 	at android.os.Looper.loop(Looper.java:137)
E/GeckoApp( 3090): 	at android.app.ActivityThread.main(ActivityThread.java:4424)
E/GeckoApp( 3090): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoApp( 3090): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/GeckoApp( 3090): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/GeckoApp( 3090): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/GeckoApp( 3090): 	at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 3090): GC_CONCURRENT freed 489K, 34% free 10803K/16327K, paused 2ms+4ms
D/Zygote  (   81): Process 3090 exited cleanly (1)
I/WindowManager(  154): WIN DEATH: Window{41d41078 org.mozilla.fennec/org.mozilla.fennec.App paused=false}
I/ActivityManager(  154): Process org.mozilla.fennec (pid 3090) has died.
W/ActivityManager(  154): Force removing ActivityRecord{41754fd0 org.mozilla.fennec/.App}: app died, no saved state
I/WindowManager(  154): WIN DEATH: Window{41dc7c48 org.mozilla.fennec/org.mozilla.gecko.AwesomeBar paused=false}
I/WindowManager(  154): WIN DEATH: Window{416cfec0 SurfaceView paused=false}

--
Samsung Nexus S (Android 4.0.3)
Mozilla/5.0 (Android; Linux armv7l; rv:11.0a1) Gecko/20111219 Firefox/11.0a1 Fennec/11.0a1
Priority: -- → P5
Whiteboard: [native-crash, [ICS], strwanted → [native-crash], [ICS], strwanted
Not sure if this is useful info, but I don't have a data SIM card so have it disabled on the Galaxy Nexus, and my wifi connection has the proxy configured.
Nightly doesn't make any successful connections until I change the about:config proxy settings to match, which on the first startup hasn't been done yet.
I note that I can only reproduce the startup crash on a newly installed nightly and no existing profile beforehand.
Duplicate of this bug: 712598
Duplicate of this bug: 714097
Recommended for higher prioritization with STR, and dupes
Whiteboard: [native-crash], [ICS], strwanted → [native-crash], [ICS], strwanted, [QA^]
(In reply to Aaron Train [:aaronmt] from comment #5)
> Recommended for higher prioritization with STR, and dupes

STR in bug 714097.
and those STR are:
1) Open Fennec
2) Close Fennec using "Quit" from the menu
3) Reopen Fennec
4) Go to Setting->About Nightly
5) Crash reporter appears
Assignee: nobody → lucasr.at.mozilla
Priority: P5 → P3
Whiteboard: [native-crash], [ICS], strwanted, [QA^] → [native-crash], [ICS], [QA^]
I can no longer reproduce with the STR on ICS starting with the nightly from 2011-12-28
Sorry, that was 2011-12-27 (damn timezones)
Still reproducible; Nightly (01/03) - Samsung Nexus S (Android 4.0.3)
Attached patch patch v.1 (obsolete) — Splinter Review
Assignee: lucasr.at.mozilla → doug.turner
Attachment #585572 - Flags: review?(blassey.bugs)
Attachment #585572 - Attachment is obsolete: true
Attachment #585572 - Flags: review?(blassey.bugs)
Attached patch patch v.1Splinter Review
Attachment #585578 - Flags: review?(blassey.bugs)
Comment on attachment 585578 [details] [diff] [review]
patch v.1

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

::: widget/src/android/nsAppShell.cpp
@@ -471,5 @@
>  
> -        if (ae->Type() == AndroidGeckoEvent::DRAW) {
> -            mNumDraws++;
> -            mLastDrawEvent = ae;
> -        } else if (ae->Type() == AndroidGeckoEvent::VIEWPORT) {

I'm assuming this is an unrelated change, please remove
Attachment #585578 - Flags: review?(blassey.bugs) → review+
Comment on attachment 585578 [details] [diff] [review]
patch v.1

Don't you want to change all the | cursor.getColumnIndexOrThrow(...) |  to | cursor.getColumnIndex(...) | ?

See:  http://developer.android.com/reference/android/database/Cursor.html#getColumnIndexOrThrow%28java.lang.String%29

getColumnIndexOrThrow:
Returns the zero-based index for the given column name, or throws IllegalArgumentException if the column doesn't exist. If you're not sure if a column will exist or not use getColumnIndex(String) and check for -1, which is more efficient than catching the exceptions.
Attachment #585578 - Flags: review-
Comment on attachment 585578 [details] [diff] [review]
patch v.1

Also, cursor.getColumnIndex[OrThrow] should only fail if the column does not exist. Why are these columns not present?
Comment on attachment 585578 [details] [diff] [review]
patch v.1

We need an updated patch or more digging into why the problem exists.
Attachment #585578 - Flags: review+ → review-
tracking-fennec: --- → 11+
Duplicate of this bug: 716836
i am not working on these right now.  resetting assignee.
Assignee: doug.turner → nobody
Occurs for Long [at android.database.CursorWindow.nativeGetLong(Native Method)]; e1ddd6a3-c0cb-4548-8c11-52bb32120111, Strings [at android.database.CursorWindow.nativeGetString(Native Method)]; a606fe7e-ccf4-46b4-ad5e-c63d22120109, and blobs [at android.database.CursorWindow.nativeGetBlob(Native Method)] ; 1ab6eb8e-8595-4b05-a511-fb94a2120116
Crash Signature: [@ mozalloc_abort | core.odex@0xacb2a] [@ mozalloc_abort | dalvik-heap (deleted)@0x1aec56] [@ mozalloc_abort | dalvik-LinearAlloc (deleted)@0x3766]
Whiteboard: [native-crash], [ICS], [QA^] → [native-crash], [ICS], [QA^], startupcrash
I cannot reproduce the crash using the STR from c#7. From what I see there is some work left to do on this bug so I'll leave the bug open for now.

Build ID: Aurora 20120127042007
          Nightly 20120127031148
Samsung Samsung Nexus 4.0.1
Java crash; nom-ing as blocking.
blocking-fennec1.0: --- → ?
Arron if this is still reproducible renom.
blocking-fennec1.0: ? → beta+
I haven't seen in a while this nor can reproduce with STR in comment #7.
Status: NEW → RESOLVED
blocking-fennec1.0: beta+ → ---
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.