android icon indicating copy to clipboard operation
android copied to clipboard

App crashes after selection for deletion

Open sebastiencastermans opened this issue 1 year ago • 2 comments

⚠️ Before posting ⚠️

  • [X] This is a bug, not a question or an enhancement.
  • [X] I've searched for similar issues and didn't find a duplicate.
  • [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • [X] I agree to follow Nextcloud's Code of Conduct.

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

  • ID: com.nextcloud.client
  • Version: 30290290
  • Build flavor: gplay

Device information

  • Brand: OnePlus
  • Device: OP594DL1
  • Model: CPH2449
  • Id: TP1A.220905.001
  • Product: CPH2449EEA

Firmware

  • SDK: 34
  • Release: 14
  • Incremental: T.R4T3.18a85e7-d6ab-48d90

Server error logs

No response

Additional information

No response

sebastiencastermans avatar Jul 29 '24 21:07 sebastiencastermans

@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?

alperozturk96 avatar Aug 01 '24 08:08 alperozturk96

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 :)

sebastiencastermans avatar Aug 14 '24 14:08 sebastiencastermans

Similar: #13001

joshtrichards avatar Aug 30 '24 23:08 joshtrichards