StackOverflowError: stack size 8MB from Accessibility of Compose
Asked Answered
O

0

16

Starting from April we have StackOverflowError from compose. We didn't have compose or Kotlin version update.

The issue only happens on Android 8.

We cannot reproduce locally and according to our logs, the crash comes when different fragments are open. We have single activity with multiple fragments and we don't have any log to point out root cause.

How can we mitigate the crash, it is something internal for compose?

What can be the root cause of the crash?

Fatal Exception: java.lang.StackOverflowError: stack size 8MB
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1827)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.transformMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1822)
   at androidx.compose.ui.platform.CalculateMatrixToWindowApi21.calculateMatrixToWindow-EL8BTi8(AndroidComposeView.android.kt:1816)
   at androidx.compose.ui.platform.AndroidComposeView.recalculateWindowViewTransforms(AndroidComposeView.android.kt:1446)
   at androidx.compose.ui.platform.AndroidComposeView.recalculateWindowPosition(AndroidComposeView.android.kt:1410)
   at androidx.compose.ui.platform.AndroidComposeView.localToScreen-MK-Hz9U(AndroidComposeView.android.kt:1390)
   at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat.createNodeInfo(AndroidComposeViewAccessibilityDelegateCompat.android.kt:366)
   at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat.access$sendScrollEventIfNeeded(AndroidComposeViewAccessibilityDelegateCompat.android.kt)
   at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat.access$createNodeInfo(AndroidComposeViewAccessibilityDelegateCompat.android.kt)
   at androidx.compose.ui.platform.AndroidComposeViewAccessibilityDelegateCompat$MyNodeProvider.createAccessibilityNodeInfo(AndroidComposeViewAccessibilityDelegateCompat.android.kt:2424)
   at android.view.View.populateVirtualStructure(View.java:8103)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.populateVirtualStructure(View.java:8106)
   at android.view.View.onProvideVirtualStructure(View.java:7667)
   at android.view.View.dispatchProvideStructureForAssistOrAutofill(View.java:8171)
   at android.view.View.dispatchProvideStructure(View.java:8118)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3415)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.view.ViewGroup.dispatchProvideStructure(ViewGroup.java:3486)
   at android.app.assist.AssistStructure$WindowNode.<init>(AssistStructure.java:512)
   at android.app.assist.AssistStructure.<init>(AssistStructure.java:1912)
   at android.app.ActivityThread.handleRequestAssistContextExtras(ActivityThread.java:3599)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2254)
   at android.os.Handler.dispatchMessage(Handler.java:109)
   at android.os.Looper.loop(Looper.java:166)
   at android.app.ActivityThread.main(ActivityThread.java:7555)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Organology answered 12/5, 2023 at 13:16 Comment(6)
When I review the related track, I think it's about Talkback.Dumortierite
It is very unlikely that our users use TalkBack. This application is for delivery personal and used in car or on bike. I will try to add a tracker to find out TalkBack usage. What is not clear is why and how compose started crash. It is difficult to identify root cause.Organology
Also had this (seen in Crashlytics). Android 8. LG G6. targetSdk=33Emblazonment
Also Huawei P10 Lite (Android 8). Has anyone posted to the Android issuetracker?Emblazonment
Yes I also reported to them. issuetracker.google.com/issues/284274551Organology
same issue, happens for Android 8 only (motorola & huawei devices)Pshaw

© 2022 - 2024 — McMap. All rights reserved.