Skip to content

Crash: "Called attach on a child which is not detached" #108

@avalanchas

Description

@avalanchas

Description

Has anybody maybe seen this issue before? (Shortened, full stack trace here)

Fatal Exception: java.lang.IllegalArgumentException: Called attach on a child which is not detached: b{13946ee position=0 id=-1, oldPos=-1, pLpos:-1 no parent} androidx.recyclerview.widget.RecyclerView{2c505a6 VF.D..... ......I. 16,98-704,188 #7f0a0390 app:id/recView}, adapter:zf.h@a002be7, layout:com.google.android.flexbox.FlexboxLayoutManager@b1d4394, context:de.radio.android.AppActivity@18c3ce1
       at androidx.recyclerview.widget.RecyclerView$5.attachViewToParent(RecyclerView.java:953)
       at androidx.recyclerview.widget.ChildHelper.attachViewToParent(ChildHelper.java:239)
      ...
       at android.view.View.measure(View.java:25792)
       ...
       at com.sothree.slidinguppanel.SlidingUpPanelLayout.onMeasure(SlidingUpPanelLayout.java:801)
       at android.view.View.measure(View.java:25792)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7065)
       ...
       at android.view.View.measure(View.java:25792)
       at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3788)
       at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2546)
      ...
       at android.app.ActivityThread.main(ActivityThread.java:8288)

How to reproduce

Unclear, will add steps here when I find them. Seems to have to do with the ViewHolder of either the RecyclerView being null or the child being measured being null

Devices, OS

So far only seen once, on the following:
Device: OPPO A53s
Orientation: Portrait
RAM free: 1.44 GB
Disk free: 79.68 GB
OS Version: Android 11
Rooted: No

Library version

4.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions