Crash: "Parameter must be a descendant of this view"
Description
I am currently seeing this crash in production but unfortunately cannot reproduce it yet.
Fatal Exception: java.lang.IllegalArgumentException: parameter must be a descendant of this view
at android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:6335)
at android.view.ViewGroup.offsetDescendantRectToMyCoords(ViewGroup.java:6264)
at androidx.core.widget.NestedScrollView.isWithinDeltaOfScreen(NestedScrollView.java:1580)
at androidx.core.widget.NestedScrollView.onSizeChanged(NestedScrollView.java:2135)
at android.view.View.sizeChange(View.java:23739)
at android.view.View.setFrame(View.java:23691)
at android.view.View.layout(View.java:23547)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at com.google.android.material.appbar.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:149)
at com.google.android.material.appbar.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:43)
at com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:2376)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:918)
at android.view.View.layout(View.java:23550)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at androidx.coordinatorlayout.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1213)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:899)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:919)
at android.view.View.layout(View.java:23550)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:23550)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at com.sothree.slidinguppanel.SlidingUpPanelLayout.onLayout(SlidingUpPanelLayout.java:861)
at android.view.View.layout(View.java:23550)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at androidx.coordinatorlayout.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1213)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:899)
at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:919)
at android.view.View.layout(View.java:23550)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:23550)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
at android.view.View.layout(View.java:23550)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:23550)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
at android.view.View.layout(View.java:23550)
at android.view.ViewGroup.layout(ViewGroup.java:6452)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:866)
at android.view.View.layout(View.java:23550)
...
Versions, Devices
- All kinds of devices, Samsung, Xiamo etc.
- Android 10 upwards (but does not have to mean much, these are the most popular versions on the market)
- SlidingUpPanel version: 4.4.2
If it's still an issue then you should share the sample code
If it's still an issue then you should share the sample code
yeah I'm really sorry, I know this is a horrible bugticket as it stands. But I have no reproduction steps at the moment and it doesn't originate in a line of code that is from me, so I can't even quote the code there. It must be happening during a view restore of some kind, maybe during navigation
I'll keep an eye out on this and amend this ticket with any information if I find something. Until then I was just hoping maybe somebody here already knows this problem or has seen something similar