Report bug

未关闭
#18,067 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
领域
mobile, mobile-dev

调研方向

Start by tracing deletion and back navigation in FileDisplayActivity and the OCFileListAdapter named in the crash, then inspect how list updates are sent to RecyclerView. Reproduce by deleting items and navigating back before they disappear. The issue is fixed when the list updates without the reported invalid item position exception; the payload does not identify a test to run.

由索引模型根据 Issue 内容生成。

描述

0. Needs triage 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
Cause of error
Exception in thread "main" java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 0(offset:-1).state:7 com.owncloud.android.ui.EmptyRecyclerView{358bb52 VFED..... ......ID 0,0-1200,2146 #7f0a0349 app:id/list_root}, adapter:com.owncloud.android.ui.adapter.OCFileListAdapter@1836103, layout:androidx.recyclerview.widget.LinearLayoutManager@946ee23, context:com.owncloud.android.ui.activity.FileDisplayActivity@645eaf3
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6821)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6757)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6753)
    at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2362)
    at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1662)
    at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1622)
    at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:697)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:4591)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4346)
    at androidx.recyclerview.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:2106)
    at androidx.recyclerview.widget.RecyclerView$1.run(RecyclerView.java:468)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:2088)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:2097)
    at android.view.Choreographer.doCallbacks(Choreographer.java:1572)
    at android.view.Choreographer.doFrame(Choreographer.java:1429)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:2051)
    at android.os.Handler.handleCallback(Handler.java:1029)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:274)
    at android.os.Looper.loop(Looper.java:369)
    at android.app.ActivityThread.main(ActivityThread.java:10106)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:616)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1137)

App information
  • ID: com.nextcloud.client
  • Version: 350000290
  • Build flavor: gplay
Device information
  • Brand: Xiaomi
  • Device: houji
  • Model: 23127PN0CC
  • Id: BP2A.250605.031.A3
  • Product: houji
Firmware
  • SDK: 36
  • Release: 16
  • Incremental: OS3.0.307.0.WNCCNXM
Expected behaviour

J'étais en train de supprimer des éléments et j'ai fais flèche retour pour revenir en arrière dans le menu de nextcloud (avant qu'il ne finisse de fzire disparaitre tout les éléments que j'avais supprimer)

Actual behaviour

.

Android version

Hyper OS3.0.307.0.WNCCNXM

Device brand and model

Xiaomi 14 houji

Stock or custom OS?

Stock

Nextcloud android app version

OS3.0.307.0.WNCCNXM

Nextcloud server version

16

Using a reverse proxy?

No

Android logs

No response

Server error logs

Additional information

No response

主要语言
Kotlin
星标
5.7k
派生
2.1k
平均合并
2 天 7 小时
30 天内合并 PR
149

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/android 的其他 Issue

查看 nextcloud/android 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。