Status Update
Comments
ra...@google.com <ra...@google.com>
ra...@google.com <ra...@google.com> #2
I'm seeing this as well, and it's happening after navigating to a screen that does not even use compose dependencies. Our flow is:
Non Compose fragment -> Compose fragment -> Non compose fragment -> This crash immediately
Currently troubleshooting, but coming up empty and cannot reproduce on my device, but seeing crashes on client devices.
Non Compose fragment -> Compose fragment -> Non compose fragment -> This crash immediately
Currently troubleshooting, but coming up empty and cannot reproduce on my device, but seeing crashes on client devices.
ra...@google.com <ra...@google.com>
vi...@farfetch.com <vi...@farfetch.com> #3
What devices and API levels are you seeing this issue?
ra...@google.com <ra...@google.com> #4
Compose version: 1.2.1
Devices: Various devices, seen across Samsung/Pixels/Moto/etc.
Device API levels: Seen on Android 8-13
Devices: Various devices, seen across Samsung/Pixels/Moto/etc.
Device API levels: Seen on Android 8-13
ap...@google.com <ap...@google.com> #5
In my scenario in which I can reproduce this crash it seems to be related to Dialogs: I have a UI where I send off a network request and show a ProgressDialog while the request is being processed. Once the response is there, I dismiss the ProgressDialog and navigate back/remove the Composable that contains the ProgressDialog from the composition.
When the request takes some time to complete, it works perfectly fine. However, if the request is completed really quickly (i.e. when the device is in airplane mode) it crashes quite reliably. So my uneducated guess is that there's a race condition between the Dialog being 'fully initialized' and the Composable which houses the Dialog being removed from the composition.
Tested on:
Compose 1.3.1
Pixel 4 Emulator with API 29
When the request takes some time to complete, it works perfectly fine. However, if the request is completed really quickly (i.e. when the device is in airplane mode) it crashes quite reliably. So my uneducated guess is that there's a race condition between the Dialog being 'fully initialized' and the Composable which houses the Dialog being removed from the composition.
Tested on:
Compose 1.3.1
Pixel 4 Emulator with API 29
vi...@farfetch.com <vi...@farfetch.com> #6
Can you try to produce a project that reproduces this bug?
ra...@google.com <ra...@google.com> #7
It's a bit more complicated than I thought, but I managed to make a small project that reproduces the exact scenario from my app. What I left out before: The UI where the ProgressDialog is shown is a BottomSheetDialogFragment hosting a ComposeView. When the network request is done, I navigate back using the Navigation library.
See the attached project and most of the time it will crash when triggering the async work in the bottom sheet.
See the attached project and most of the time it will crash when triggering the async work in the bottom sheet.
Description
Basic Information
Component used: WorkManger
Version used: 2.5.0
Devices/Android versions reproduced on: Emulator created by AVD Manger (Pixel 4 XL - Android API 24 - X86) Affected Android version: Android Nougat.
Attachment: Bug reproduce sample:https://github.com/Vigroid/WorkMangerCrashDemo
Exception stack:
Steps to produce:
StackOverflowError
will be thrown byConstraintTrackingWorker
.Related issue
This bug seems to be related to this issue https://issuetracker.google.com/issues/172946965#comment10
PTAL, Thanks ;)