Analyze or collect Xamarin stack traces for ANR in google play console

元气小坏坏 提交于 2019-12-25 00:08:58

问题


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 (???)

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?


回答1:


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.



来源:https://stackoverflow.com/questions/47767706/analyze-or-collect-xamarin-stack-traces-for-anr-in-google-play-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!