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

XCrash.init() 必须在attachBaseContext里调用吗? 必须是主线程调用吗? #30

Closed
yzhiw opened this issue Dec 19, 2019 · 2 comments
Labels
question Further information is requested

Comments

@yzhiw
Copy link

yzhiw commented Dec 19, 2019

XCrash.init() 必须在attachBaseContext里调用吗? 必须是主线程调用吗?
目前发现如果是后台线程调用init会抓取不到ANR信息。

@caikelun caikelun added the question Further information is requested label Dec 19, 2019
@caikelun
Copy link
Collaborator

最好是在 attachBaseContext 中初始化,xCrash 初始化越早越好。(在 xCrash 初始化之前执行的 app 逻辑如果发生了崩溃,xCrash 是无法捕获到的)

目前 xCrash 使用的 SIGQUIT 拦截方案,只支持在主线程中调用。

@yzhiw
Copy link
Author

yzhiw commented Dec 19, 2019

好的,感谢答复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants