My Nextcloud apps always Crashed

Open
#17,672 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
android, kotlin
Domain
databases, mobile

Research direction

Start by reproducing the crash while opening or moving media in a folder with more than 8,000 items, then inspect the stack trace entry for FileDao_Impl.getFolderContentSuspended and its Room database access. Done means the Nextcloud Android app no longer crashes when opening, moving, or copying media in this scenario.

Written by the indexing model from the issue text.

Description

bug needs info
⚠️ Before posting ⚠️
  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.
Steps to reproduce
  1. I Open My Folder
  2. My folder have 8000+ Media
  3. When I Open or Move the Media to other Folder, the apps suddenly crash
Expected behaviour

It should be Open the Media and Move it easily

Actual behaviour

When I Open the Media or Moving and Copy it to another Folder, it suddenly Crash

Android version

14

Device brand and model

Tecno LH8n

Stock or custom OS?

Stock

Nextcloud android app version

34.1.1

Nextcloud server version

33.0.3.2

Using a reverse proxy?

I don't know

Android logs
Cause of error
Exception in thread "DefaultDispatcher-worker-5" java.lang.IllegalStateException: Couldn't read row 537, 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 androidx.sqlite.driver.SupportSQLiteStatement$RowSQLiteStatement.getLong(SupportSQLiteStatement.android.kt:363)
    at com.nextcloud.client.database.dao.FileDao_Impl.getFolderContentSuspended$lambda$0(FileDao_Impl.kt:3589)
    at com.nextcloud.client.database.dao.FileDao_Impl$$ExternalSyntheticLambda23.invoke(D8$$SyntheticClass:0)
    at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1.invokeSuspend(DBUtil.kt:173)
    at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1.invoke(DBUtil.kt:8)
    at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1.invoke(DBUtil.kt:4)
    at androidx.room.coroutines.PassthroughConnectionPool$useConnection$2.invokeSuspend(PassthroughConnectionPool.kt:59)
    at androidx.room.coroutines.PassthroughConnectionPool$useConnection$2.invoke(PassthroughConnectionPool.kt:8)
    at androidx.room.coroutines.PassthroughConnectionPool$useConnection$2.invoke(PassthroughConnectionPool.kt:4)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatched(Undispatched.kt:66)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:43)
    at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:497)
    at kotlinx.coroutines.BuildersKt.withContext(dex-id-31121b340192384674c05724be12a8c16f860c05:1)
    at androidx.room.coroutines.PassthroughConnectionPool.useConnection(PassthroughConnectionPool.kt:59)
    at androidx.room.RoomConnectionManager.useConnection(RoomConnectionManager.android.kt:138)
    at androidx.room.RoomDatabase.useConnection(RoomDatabase.android.kt:619)
    at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$$inlined$compatCoroutineExecute$DBUtil__DBUtil_androidKt$1.invokeSuspend(DBUtil.android.kt:261)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1100)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:1571)

App information
  • ID: com.nextcloud.client
  • Version: 340010190
  • Build flavor: gplay
Device information
  • Brand: TECNO
  • Device: TECNO-LH8n
  • Model: TECNO LH8n
  • Id: UP1A.231005.007
  • Product: LH8n-GL
Firmware
  • SDK: 34
  • Release: 14
  • Incremental: 250606V834
Server error logs

Additional information

No response

Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
1d 23h
Merged PRs (30d)
101

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/android

All issues in nextcloud/android

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.