PostHog / posthog-android

PostHog Android SDK
https://posthog.com/docs/libraries/android
MIT License
43 stars 23 forks source link

PostHogReplayThread #203

Open xemniz opened 17 hours ago

xemniz commented 17 hours ago

Version

3.9.0

Steps to Reproduce

  1. I use compose in fragments a lot
  2. It's really ocassional but im just switching tab bars, scrolling lazylists
  3. App just crashes
  4. previousThreadName from the stacktrace is PostHogReplayThread
  5. when i switch off the replay, can't reproduce this

Expected Result

App works

Actual Result

java.lang.IllegalArgumentException: Detected multithreaded access to : previousThreadId=158), currentThread={id=2, name=main}. Note that observation on multiple threads in layout/draw is not supported. Make sure your measure/layout/draw for each Owner (AndroidComposeView) is executed on the same thread. at androidx.compose.runtime.PreconditionsKt.throwIllegalArgumentException(Preconditions.kt:26) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:708) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133) at androidx.compose.ui.node.OwnerSnapshotObserver.observeMeasureSnapshotReads$ui_release(OwnerSnapshotObserver.kt:113)