Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recording: capture touch interaction off of main thread to avoid ANRs #165

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

marandaneto
Copy link
Member

💡 Motivation and Context

"main" tid=1 Native
#00 pc 0x000000000009eeb8 /apex/com.android.runtime/lib64/bionic/libc.so (fsync+8)
#1 pc 0x0000000000004700 /apex/com.android.art/lib64/libopenjdkjvm.so (JVM_Sync+20)
#2 pc 0x0000000000022404 /apex/com.android.art/lib64/libopenjdk.so (FileDescriptor_sync+40)
#3 pc 0x0000000000351e30 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144)
#4 pc 0x00000000005b9a30 /apex/com.android.art/lib64/libart.so (nterp_helper+4016)
#5 pc 0x000000000043c184 /system/framework/framework.jar (android.os.FileUtils.sync+12)
at
#7 pc 0x00000000005ba854 /apex/com.android.art/lib64/libart.so (nterp_helper+7636)
at
#9 pc 0x00000000005b99d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924)
at
#11 pc 0x00000000005b99d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924)
at
#13 pc 0x00000000005baecc /apex/com.android.art/lib64/libart.so (nterp_helper+9292)
at
#15 pc 0x00000000005baecc /apex/com.android.art/lib64/libart.so (nterp_helper+9292)
at
#17 pc 0x00000000005b99d4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924)
at
#19 pc 0x00000000005ba7f4 /apex/com.android.art/lib64/libart.so (nterp_helper+7540)
at
#21 pc 0x00000000005b8ab4 /apex/com.android.art/lib64/libart.so (nterp_helper+52)
at
#23 pc 0x00000000005ba7f4 /apex/com.android.art/lib64/libart.so (nterp_helper+7540)
at
#25 pc 0x00000000005baecc /apex/com.android.art/lib64/libart.so (nterp_helper+9292)
at
#27 pc 0x000000000033b3a4 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
#28 pc 0x0000000000339404 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithVarArgsart::ArtMethod*+772)
#29 pc 0x0000000000560f80 /apex/com.android.art/lib64/libart.so (art::JNI::CallVoidMethodV+192)
#30 pc 0x00000000000af5e8 /system/lib64/libandroid_runtime.so (_JNIEnv::CallVoidMethod+120)
#31 pc 0x0000000000119e2c /system/lib64/libandroid_runtime.so (android::NativeInputEventReceiver::consumeEvents+364)
#32 pc 0x0000000000119bec /system/lib64/libandroid_runtime.so (android::NativeInputEventReceiver::handleEvent+180)
#33 pc 0x0000000000016bb0 /system/lib64/libutils.so (android::Looper::pollInner+912)
#34 pc 0x00000000000167b8 /system/lib64/libutils.so (android::Looper::pollOnce+112)
#35 pc 0x000000000014e3ec /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce+44)
#36 pc 0x0000000000351e30 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144)
at
#38 pc 0x000000000033b680 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640)
#39 pc 0x000000000037cb18 /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<8>+1556)
#40 pc 0x000000000037c4f4 /apex/com.android.art/lib64/libart.so (art::Method_invoke +32)
#41 pc 0x0000000000351e30 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+144)
at
#43 pc 0x00000000005ba854 /apex/com.android.art/lib64/libart.so (nterp_helper+7636)
#44 pc 0x0000000000268b10 /system/framework/framework.jar (com.android.internal.os.ZygoteInit.main+632)
#45 pc 0x000000000033b680 /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+640)
#46 pc 0x00000000004e2b58 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>+728)
#47 pc 0x000000000057abe0 /apex/com.android.art/lib64/libart.so (art::JNI::CallStaticVoidMethodV+156)
#48 pc 0x00000000000b0b28 /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod+120)
#49 pc 0x00000000000bc22c /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start+948)
#50 pc 0x0000000000002580 /system/bin/app_process64 (main+1320)
#51 pc 0x00000000000489e0 /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96)
at java.io.FileDescriptor.sync (Native method)
at android.os.FileUtils.sync (FileUtils.java:256)
at android.app.SharedPreferencesImpl.writeToFile (SharedPreferencesImpl.java:807)
at android.app.SharedPreferencesImpl.access$900 (SharedPreferencesImpl.java:59)
at android.app.SharedPreferencesImpl$2.run (SharedPreferencesImpl.java:672)
at android.app.SharedPreferencesImpl.enqueueDiskWrite (SharedPreferencesImpl.java:691)
at android.app.SharedPreferencesImpl.access$100 (SharedPreferencesImpl.java:59)
at android.app.SharedPreferencesImpl$EditorImpl.commit (SharedPreferencesImpl.java:604)
at
at android.app.Activity.dispatchTouchEvent (Activity.java:4241)
at
at curtains.internal.WindowCallbackWrapper$dispatchTouchEvent$dispatch$1.invoke (WindowCallbackWrapper.kt:1)
at curtains.internal.WindowCallbackWrapper$dispatchTouchEvent$dispatch$1.invoke (WindowCallbackWrapper.kt:1)
at curtains.OnTouchEventListener$DefaultImpls.intercept (Listeners.kt:1)
at com.posthog.android.replay.PostHogReplayIntegration$onTouchEventListener$1.intercept (PostHogReplayIntegration.kt:1)

Input dispatching timed out

from google sdk console

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@marandaneto marandaneto requested a review from a team August 23, 2024 13:15
@marandaneto marandaneto marked this pull request as ready for review August 23, 2024 13:15
Copy link

@neilkakkar neilkakkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok 🙈 , looks like code

@marandaneto marandaneto merged commit 9b7a872 into main Aug 26, 2024
5 checks passed
@marandaneto marandaneto deleted the chore/mouse-int branch August 26, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants