在 Google Play 控制台中分析或收集 ANR 的 Xamarin 堆栈跟踪 [英] Analyze or collect Xamarin stack traces for ANR in google play console

查看:28
本文介绍了在 Google Play 控制台中分析或收集 ANR 的 Xamarin 堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在 google play 控制台中获取背景"(在广播接收器上)ANR 的一些堆栈跟踪.但所有看起来都是这样的:

We are getting some stack traces for "background" (on broadcast reciever) ANR's in google play console. But there are all looking something like this:

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 obj=0x7523b718 self=0xec085400
  | sysTid=13422 nice=0 cgrp=bg_non_interactive sched=0/0 handle=0xef6bb534
  | state=S schedstat=( 0 0 0 ) utm=74 stm=24 core=7 HZ=100
  | stack=0xff1ec000-0xff1ee000 stackSize=8MB
  | held mutexes=
  #00  pc 0000000000017520  /system/lib/libc.so (syscall+28)
  #01  pc 0000000000047cbd  /system/lib/libc.so (_ZL33__pthread_mutex_lock_with_timeoutP24pthread_mutex_internal_tbPK8timespec+520)
  #02  pc 000000000017e45c  /data/app/com.company.package-2/lib/arm/libmonosgen-2.0.so (???)

所以我们无法获得任何有用的信息 - 代码分析什么也没有.有没有办法在 ANR 事件上收集 C# 堆栈?

so we cannot get any useful information of what happens - analysis of code gives nothing. Is there any way of collecting C# stacks on ANR event?

推荐答案

有一个名为 Xamarin.ANRWatchDog 的包,可通过 Nuget 或来自 Github.它是一个线程,它监视 ANR,然后通过所有线程的堆栈跟踪引发错误.它从 Salomon Brys 的 ANR-WatchDog 移植到 Xamarin.

There is a package named Xamarin.ANRWatchDog that detects Android ANR errors (Application Not Responding) available via Nuget or from Github. It is a thread that watches for ANRs and then raises an error with stack traces for all of the threads. It was ported to Xamarin from Salomon Brys's ANR-WatchDog.

这篇关于在 Google Play 控制台中分析或收集 ANR 的 Xamarin 堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆