nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.17k stars 1.75k forks source link

App crashes after selection for deletion #13339

Open sebastiencastermans opened 1 month ago

sebastiencastermans commented 1 month ago

⚠️ Before posting ⚠️

Steps to reproduce

  1. Select items (photos and vidéos for me)
  2. Delete items
  3. Crash 🥲 (with only 3 items deleted)

Expected behaviour

All items deleted

Actual behaviour

Only 3

Android version

14

Device brand and model

OnePlus 11

Stock or custom OS?

Stock

Nextcloud android app version

3.29.2

Nextcloud server version

29.0.4

Using a reverse proxy?

Yes

Android logs

Cause of error

Exception in thread "main" java.lang.IllegalStateException: Couldn't read row 593, col 20 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
    at android.database.CursorWindow.nativeGetLong(Native Method)
    at android.database.CursorWindow.getLong(CursorWindow.java:539)
    at android.database.AbstractWindowedCursor.getLong(AbstractWindowedCursor.java:78)
    at com.nextcloud.client.database.dao.FileDao_Impl.getFolderContent(FileDao_Impl.java:2025)
    at com.owncloud.android.datamodel.FileDataStorageManager.getFolderContent(FileDataStorageManager.java:919)
    at com.owncloud.android.datamodel.FileDataStorageManager.getFolderContent(FileDataStorageManager.java:227)
    at com.owncloud.android.ui.adapter.OCFileListAdapter.swapDirectory(OCFileListAdapter.java:733)
    at com.owncloud.android.ui.fragment.OCFileListFragment.listDirectory(OCFileListFragment.java:1359)
    at com.owncloud.android.ui.fragment.OCFileListFragment.listDirectory(OCFileListFragment.java:1308)
    at com.owncloud.android.ui.fragment.OCFileListFragment.listDirectory(OCFileListFragment.java:1297)
    at com.owncloud.android.ui.activity.FileDisplayActivity.updateListOfFilesFragment(FileDisplayActivity.java:672)
    at com.owncloud.android.ui.activity.FileDisplayActivity.onRemoveFileOperationFinish(FileDisplayActivity.java:1690)
    at com.owncloud.android.ui.activity.FileDisplayActivity.onRemoteOperationFinish(FileDisplayActivity.java:1632)
    at com.owncloud.android.services.OperationsService.lambda$dispatchResultToOperationListeners$0(OperationsService.java:786)
    at com.owncloud.android.services.OperationsService$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
    at android.os.Handler.handleCallback(Handler.java:958)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:255)
    at android.os.Looper.loop(Looper.java:364)
    at android.app.ActivityThread.main(ActivityThread.java:8938)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1053)

App information

Device information

Firmware

Server error logs

No response

Additional information

No response

alperozturk96 commented 1 month ago

@sebastiencastermans Thanks for the report.

To help us debug the issue, could you please provide more details on the following:

  1. Does this error occur every time you try to delete a file, or is it happening randomly?
  2. Were the files you attempted to delete already downloaded or not?
  3. What were the sizes of the files you were trying to delete?
  4. Where were these files located? Were they in the root directory or within a subfolder?
  5. Were the files encrypted or not?
sebastiencastermans commented 1 month ago

Hi @alperozturk96, you're welcome ;). Sorry for the delay in my response 😅...

  1. This error occurs every time I try to delete a lot of files, if I want to delete just one file it works but when I select more than 5 (+/-), it crashes! And the first 3 files of my selection are deleted perfectly, but not the others. It's a bit annoying 😶‍🌫️.
  2. Yes, those files are synced with my phone, but I don't think that is the source of the problem...
  3. 3MB to 2GB
  4. Within a subfolder, it is the folder with all my photos and videos and I think Nextcloud App (and web app too) doesn't like a folder with this amount of files. Sometimes, the web app crashes too because it tries to get all the preview (but this is an other problem) 🥲.
  5. No

Have a good day :)

joshtrichards commented 2 weeks ago

Similar: #13001