yodaos-project / yoda.js

Application Framework that powered YodaOS
Apache License 2.0
187 stars 48 forks source link

ANR: trace information before application be killed #872

Closed algebrait closed 4 years ago

algebrait commented 5 years ago

Is your feature request related to a problem? Please describe. If ANR occurs, application will be kill by runtime. There is little information to help debug.

Describe the solution you'd like Before application be killed, trace application status such as CPU, memory, stack trace, etc. Reference implementation: https://developer.android.com/topic/performance/vitals/anr http://androidxref.com/9.0.0_r3/xref/frameworks/base/services/core/java/com/android/server/am/AppErrors.java#885

Describe alternatives you've considered Add a ANR trigger, such as via system property. When debug, turn ANR off, which would cause application hang and perhaps the scene would be saved.

issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.94. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

yorkie commented 5 years ago

The android seems always collects these info when ANR at http://androidxref.com/9.0.0_r3/xref/frameworks/base/services/core/java/com/android/server/am/AppErrors.java#993?

legendecas commented 4 years ago

https://github.com/yodaos-project/yodart/pull/875 made the app coredump on ANR. Closing.