https://kotlinlang.org logo
Title
d

Dean Djermanović

07/01/2022, 12:49 PM
What does the error
Something went wrong while getting root views
    java.lang.IllegalArgumentException: Failed requirement.
imply? I’m using an
AndroidView
composable in which I create an instance of a custom view from 3rd party library. The error happens when I quickly navigate to/from that
AndroidView
composable.
a

Adam Powell

07/01/2022, 1:04 PM
Got any more of the stack trace for that exception?
d

Dean Djermanović

07/01/2022, 1:08 PM
@Adam Powell Here’s the link to the full stack trace: https://elmah.io/tools/stack-trace-formatter/29b8129422134d0ba8977e166191c672/
a

Adam Powell

07/01/2022, 1:18 PM
It looks like something about an instabug library is trying to draw the contents of your window from off of the window's UI thread; I see it getting dispatched from what looks like a HandlerThread in there
That's always going to be unsafe on Android with or without compose; you need to configure that library to not do that
It looks like it's trying to draw the window contents after receiving a PixelCopy result, which generally means you are getting a bitmap output delivered to you. I'm not sure why it would be trying to draw additional content at that point if it already is receiving that bitmap
d

Dean Djermanović

07/01/2022, 1:26 PM
I’ve verified that issue doesn’t occur when I disable Instabug. Thank you, I’ll look into this further.
👍 1