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

关于 UIThreadMonitor 的疑问 #851

Open
tennkou opened this issue Jun 16, 2023 · 6 comments
Open

关于 UIThreadMonitor 的疑问 #851

tennkou opened this issue Jun 16, 2023 · 6 comments

Comments

@tennkou
Copy link

tennkou commented Jun 16, 2023

版本:2.1.0

现象是 DefaultPluginListener 里打印出来的 Issue 里 stack 为空,我看了一下,可能是 UIThreadMonitor 没有init导致的(METHOD_ID_DISPATCH 我看是在UIThreadMonitor 里被push到 sBuffer 里的)。这个init我看是只在 24版本以下才会被自动调用,所以感到很疑惑?
UIThreadMonitor 已经被 Deprecated 了,它应不应该 init呢? Issue 的 stack 为空跟这个有关系吗?

@smilehyb
Copy link

同问 这个。为什么这样啊

@tennkou
Copy link
Author

tennkou commented Jun 27, 2023

@smilehyb 估计是一个bug,我试了下手动调用UIThreadMonitor的init后就可以了。然后另外还有个 pull request 也是关于这个问题 link

@smilehyb
Copy link

@tennkou 主要现在UIThreadMonitor 也注解废弃了啊,那现在用什么啊 ?

@TYZRPVX
Copy link

TYZRPVX commented Aug 7, 2023

UIThreadMonitor

Its replaced by LooperAnrTracer

@tennkou
Copy link
Author

tennkou commented Sep 4, 2023

UIThreadMonitor

Its replaced by LooperAnrTracer

感觉这个并不能代替 UIThreadMonitor,里面并没有 METHOD_ID_DISPATCH 的处理

@yangjie10930
Copy link

UIThreadMonitor

Its replaced by LooperAnrTracer

LooperAnrTracer 里没有调用:
if (config.isAppMethodBeatEnable()) {
AppMethodBeat.i(AppMethodBeat.METHOD_ID_DISPATCH);
}

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

No branches or pull requests

4 participants