While syncing (back- or foreground) the app keeps on crashing due to an uninitialized database cursor
Files should be synced to my server
Enable file syncing
************ CAUSE OF ERROR ************
java.lang.IllegalStateException: Couldn't read row 1984, col 1 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
at android.database.CursorWindow.nativeGetString(Native Method)
at android.database.CursorWindow.getString(CursorWindow.java:465)
at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)
at android.database.CursorWrapper.getString(CursorWrapper.java:137)
at com.owncloud.android.datamodel.UploadsStorageManager.createOCUploadFromCursor(UploadsStorageManager.java:320)
at com.owncloud.android.datamodel.UploadsStorageManager.getUploads(UploadsStorageManager.java:301)
at com.owncloud.android.datamodel.UploadsStorageManager.getFailedUploads(UploadsStorageManager.java:372)
at com.owncloud.android.files.services.FileUploader$UploadRequester.retryFailedUploads(FileUploader.java:405)
at com.owncloud.android.utils.FilesSyncHelper.lambda$restartJobsIfNeeded$0(FilesSyncHelper.java:251)
at com.owncloud.android.utils.-$$Lambda$FilesSyncHelper$kKNrggliFpEukU1kV4bap8ektCs.run(Unknown Source:12)
at java.lang.Thread.run(Thread.java:764)
************ APP INFORMATION ************
ID: com.nextcloud.client
Version: 30080190
Build flavor: gplay
************ DEVICE INFORMATION ************
Brand: OnePlus
Device: OnePlus6T
Model: ONEPLUS A6013
Id: PKQ1.180716.001
Product: OnePlus6T
************ FIRMWARE ************
SDK: 28
Release: 9
Incremental: 1909112330
Could this line be the root cause?
https://github.com/nextcloud/android/blob/50f07d635c92e66bf01dcd730d0a1d6e6e4d4704/src/main/java/com/owncloud/android/datamodel/UploadsStorageManager.java#L307
Maybe it's reading more rows than there are available?
This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
This is still an issue and its very annoying.
see my issue #4919
I'm currently using a version where I added a check of there's a next row to that while loop. I haven't had crashes since. Might open a PR tonight.
This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
No stalebot, you are not going to close this.
@Jigsaw5279 Please open a PR, that would be so nice.
I actually had to uninstall the nextcloud app from my device because it was so annoying.
This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
This is not stale but rather discussed in the linked PR.
Most helpful comment
I'm currently using a version where I added a check of there's a next row to that while loop. I haven't had crashes since. Might open a PR tonight.