Closed Bug 713580 Opened 13 years ago Closed 12 years ago

java.lang.IllegalStateException: this should only be called when the cursor is valid at android.widget.CursorAdapter.getView(CursorAdapter.java:240)

Categories

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

12 Branch
ARM
Android
defect

Tracking

(fennec11+)

RESOLVED WORKSFORME
Tracking Status
fennec 11+ ---

People

(Reporter: nhirata, Assigned: lucasr)

References

Details

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

Crash Data

From socorro https://crash-stats.mozilla.com/report/index/0acd3cf6-0666-4fef-b2c6-774b72111226:

AdapterDescription: 'Android, Model: 'GT-P7510', Product: 'GT-P7510', Manufacturer: 'samsung', Hardware: 'p3''.

java.lang.IllegalStateException: this should only be called when the cursor is valid
	at android.widget.CursorAdapter.getView(CursorAdapter.java:240)
	at android.widget.AbsListView.obtainView(AbsListView.java:2142)
	at android.widget.GridView.makeAndAddView(GridView.java:1360)
	at android.widget.GridView.makeRow(GridView.java:365)
	at android.widget.GridView.fillSpecific(GridView.java:566)
	at android.widget.GridView.layoutChildren(GridView.java:1260)
	at android.widget.GridView.setSelectionInt(GridView.java:1511)
	at android.widget.AbsListView.resurrectSelection(AbsListView.java:5451)
	at android.widget.AbsListView.onWindowFocusChanged(AbsListView.java:2583)
	at android.view.View.dispatchWindowFocusChanged(View.java:4703)
	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:752)
	at android.view.ViewGr
Seems to be a bunch of cursor related issues and awesomebar/Android Widget.

https://crash-stats.mozilla.com/report/index/7861279b-a64a-454d-9347-51fb02111226

java.lang.RuntimeException: Unable to resume activity {org.mozilla.fennec/org.mozilla.fennec.App}: java.lang.IllegalStateException: trying to requery an already closed cursor  org.mozilla.gecko.db.AndroidBrowserDB$AndroidDBCursor@40788018

	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2291)
Assignee: nobody → lucasr.at.mozilla
Priority: -- → P2
Hard to figure out what's going on here without knowing what part of the UI is using this cursor...
tracking-fennec: --- → 11+
Also, some info about calling stopManagingCursor when resuming an activity:
http://groups.google.com/group/android-developers/browse_thread/thread/658133bec901d7e?pli=1
If it helps, I have steps to reproduce what I reported in bug 716218.

Turns out I was doing something stupid.

1. Install yesterday's nightly build.
2. Launch it and go to the about page and check for updates.
3. download/install/and open.
4. When it opens go to Settings -> About to see what the build date is

This is dumb because this page is already loading via session restore in a background tab.

SO i think i am triggering this by trying to load the About page at the same time system restore is trying to load it in a different tab.
(In reply to Naoki Hirata :nhirata from comment #0)
> java.lang.IllegalStateException: this should only be called when the cursor
> is valid

I presume the bad wording here (Illegal vs, Invalid) is from JAVA and not us?

I doubt there is really a legal issue here.  I would hope no one is going to be arrested. ;-)
Looks like the crash from comment 6 seems to work now.  Maybe the bug got arrested.
(In reply to Naoki Hirata :nhirata from comment #9)
> Looks like the crash from comment 6 seems to work now.  Maybe the bug got
> arrested.

Failed for me updating form yesterday's nightly to today's.  so maybe it only fails for certain people or devices.

My issue is on a Smamsung Galaxy Tab 8.9.
Crash ids that show this Java crash:

25d8362a-ca60-4e3d-85fc-7353e2111229
a790c6e4-1a9b-4297-8e4b-ddd7a2120105
0acd3cf6-0666-4fef-b2c6-774b72111226
f56450df-fc2b-45b2-ac99-e7c1b2120112
7f2e9ccf-9259-4301-bc98-4ecc22111227
37c0ebe6-a65c-46d7-8d90-954ce2111226
8094963f-439a-4489-8a24-284e22111230
I'm not being able to reproduce this crash at all. Will only work on a fix once we find a reliable way to reproduce it.
I was not able to reproduce this using the steps in comment 6 today.  I also notice the reports of this seem to be dwindling in the crash stats.  Perhaps it has already been fixed.
Closing it for now. Feel free to re-open if you get to reliably reproduce it. Thanks!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.