On Wed, Jun 24, 2026 at 7:40 PM seal2002 <
phann...@gmail.com> wrote:
>
> Hi everyone,
>
> I'am seeing ANR rates on the main thread that consistently exceed my game threshold in production (via Play Console / crash reporting), but I cannot reproduce the issue locally or in test environment at all.
>
> Some context:
> - The ANRs are reported on the main thread
> - I'm using Android NDK 27.3 with Native target API is 29
> - The ANR rate is high enough to trigger alerts, but the stack traces don't point to an obvious bottleneck
> - I have not been able to reproduce it on any device or emulator in-house. ( The tester team cannot reproduce it as well)
>
> So my questions:
> 1. Can I trust that the ANR signals from Play Console are genuinely triggering on the main thread, or could there be false positives / misattribution from the NDK layer?
i'm not aware of any issues there, no.
> 2. What are the best strategies to debug ANRs that only appear in production and cannot be reproduced locally — especially when native code is involved? Please note that I used the Firebase Crashlytic before and transitioned to Backtrace last year, but nothing help. And I'm switching back to Firebase because it has some cool feature now.
> 3. Are there any NDK-specific pitfalls (e.g., JNI calls blocking the main thread, mutex contention from native threads) that could silently cause ANRs without being obvious in traces?
i'm a bit confused: your trace below shows you blocked waiting on a
lock in your _MainThreadOnNativeWindowDestroyed() function... why
don't you believe that?
> --
> You received this message because you are subscribed to the Google Groups "android-ndk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
android-ndk...@googlegroups.com.
> To view this discussion visit
https://groups.google.com/d/msgid/android-ndk/935d3d91-e0b8-47e6-9048-e12556735f83n%40googlegroups.com.