Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when deleting many instances #1351

Closed
lognaturel opened this issue Aug 17, 2017 · 16 comments
Closed

Crash when deleting many instances #1351

lognaturel opened this issue Aug 17, 2017 · 16 comments

Comments

@lognaturel
Copy link
Member

lognaturel commented Aug 17, 2017

Software and hardware versions

Collect v1.9.1

Problem description

Crash when deleting many instances. Discovered when verifying #1348. This doesn't happen every time but is reproducible.

Steps to reproduce the problem

  1. Copy a bunch of instances into /sdcard/odk/instances (e.g. backup1249.zip from @mmarciniak90)
  2. Tap on "Delete Saved Form"
  3. Select All Saved Forms, Delete

Expected behavior

No crash.

Other information

android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 1802)
	at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)
	at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:845)
	at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)
	at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
	at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:143)
	at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:132)
	at android.database.CursorWrapper.getCount(CursorWrapper.java:60)
	at org.odk.collect.android.activities.MainMenuActivity.updateButtons(MainMenuActivity.java:574)
	at org.odk.collect.android.activities.MainMenuActivity.access$100(MainMenuActivity.java:79)
	at org.odk.collect.android.activities.MainMenuActivity$IncomingHandler.handleMessage(MainMenuActivity.java:704)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6123)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
   Force finishing activity org.odk.collect.android/.activities.FileManagerTabs
@lognaturel lognaturel added the bug label Aug 17, 2017
@lognaturel
Copy link
Member Author

@srv-twry or @Yurii-Laguta, one of you may be interested in this one.

@grzesiek2010
Copy link
Member

grzesiek2010 commented Aug 18, 2017

Really strange. I asked @mmarciniak90 to check this scenario when she was testing #1249 and everything was ok... I'm not sure but I think that I tested it too.

@YuraLaguta
Copy link
Contributor

@lognaturel given that crash happened in different activity: MainMenuActivity, the reproduction route doesn't seem to be correct.
A bit of looking at SO seems like it's a database access issue.
I've tried it few times on emulator and wasn't able to reproduce.

@lognaturel
Copy link
Member Author

@Yurii-Laguta That's a good point. I know that the first time I saw the crash I tapped the back button while the instance scanning was happening. I thought I had reproduced it without tapping the back button but it's possible that wasn't the case. Could you try tapping the back button immediately when the scanning starts and seeing if you can trigger it that way?

@YuraLaguta
Copy link
Contributor

looks very similar to #1350 "disk I/O error (code 1802)"

@lognaturel
Copy link
Member Author

@Yurii-Laguta I do think they're related and I did get them back to back. I wonder whether I may have initiated the delete while the scan was still ongoing?

Like I said, I do see a number of these kinds of errors in Firebase Crash. Is there a more graceful way to handle them across the board, perhaps?

@grzesiek2010
Copy link
Member

@opendatakit-bot claim

@lognaturel
Copy link
Member Author

@grzesiek2010 Were you able to reproduce this?

@grzesiek2010
Copy link
Member

@lognaturel I took a quick look but I wasn't able I'll try again when I'm free.

@getodk-bot
Copy link
Member

Hello @grzesiek2010, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 7 days. Are you still working on this issue?

If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 3 days.

If you've decided to work on something else, simply comment @opendatakit-bot unclaim so that someone else can claim it and continue from where you left off.

Thank you for your valuable contributions to Open Data Kit!

@lognaturel
Copy link
Member Author

This might be a good one to try with a slower device and fast activity changes when you have a chance, @grzesiek2010. If you can't reproduce like that we can close.

@getodk-bot
Copy link
Member

Hello @grzesiek2010, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 7 days. Are you still working on this issue?

If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 3 days.

If you've decided to work on something else, simply comment @opendatakit-bot unclaim so that someone else can claim it and continue from where you left off.

Thank you for your valuable contributions to Open Data Kit!

@grzesiek2010
Copy link
Member

@lognaturel
I wasn't able to reproduce it.

@mmarciniak90
Copy link
Contributor

I also was not able to reproduce this crash.
I checked on Collect v1.9.1 and v1.11.1
@lognaturel, maybe it is a good idea to add a progress dialog and block other actions when instances are scanned and loaded.

@getodk-bot
Copy link
Member

getodk-bot commented Dec 29, 2017

Hello @grzesiek2010, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 10 days.

You can reclaim this issue or claim any other issue by commenting @opendatakit-bot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

@shobhitagarwal1612
Copy link
Contributor

Unable to reproduce the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants