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

发生一次anr会生成多个崩溃文件。 #131

Open
wenqiaoqqq opened this issue Sep 8, 2023 · 0 comments
Open

发生一次anr会生成多个崩溃文件。 #131

wenqiaoqqq opened this issue Sep 8, 2023 · 0 comments

Comments

@wenqiaoqqq
Copy link

wenqiaoqqq commented Sep 8, 2023

测试发现发生了一次anr,本地会生成两个或者三个甚至更多的崩溃文件,导致anr会重复上报。看源码发现xc_trace_dumper函数这里判断的问题。
//Keep only one current trace.
if(0 != xc_trace_logs_clean()) continue;

这里的逻辑是当接收到重复信号时,如果发现有trace文件就删除,这样只保留一份trace文件最后转为anr文件。

我有两个问题。
第一,这里为什么要保留最后一份trace,而不是保留第一份trace?
第二,在第二次接收到信号前,如果第一份trace已经转为anr文件了,那这个逻辑就有问题了。一个anr会出现多个anr崩溃文件。

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

1 participant