Skip to content

CrashUtils 部分崩溃收集不到吗 #1424

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

Open
CleverSJX opened this issue Jan 12, 2021 · 2 comments
Open

CrashUtils 部分崩溃收集不到吗 #1424

CleverSJX opened this issue Jan 12, 2021 · 2 comments
Assignees
Labels

Comments

@CleverSJX
Copy link

描述 Bug

在CrashUtils 中我做了处理, 崩溃后重启APP, 但是用户反馈APP闪退后没有重启
是某些崩溃收集不到? 有哪些? 有解决方案不?

  • AndroidUtilCode 的版本:com.blankj:utilcodex:1.30.5
  • 出现 Bug 的设备型号:长虹TV
  • 设备的 Android 版本:Android 5.1.1

相关代码

  CrashUtils.init(new CrashUtils.OnCrashListener() {
            @Override
            public void onCrash(CrashUtils.CrashInfo crashInfo) {
                logger.error(crashInfo.toString(), crashInfo.getThrowable());
                AppUtils.relaunchApp(true);
            }
        });

异常堆栈

在客户手中收集不到

@sanpark
Copy link

sanpark commented Jan 14, 2022

`
public void uncaughtException(@nonnull final Thread t, @nonnull final Throwable e) {

           final String time = new SimpleDateFormat("yyyy_MM_dd-HH_mm_ss").format(new Date());
            CrashInfo info = new CrashInfo(time, e);
            final String crashFile = dirPath + time + ".txt";
            UtilsBridge.writeFileFromString(crashFile, info.toString(), true);

            if (DEFAULT_UNCAUGHT_EXCEPTION_HANDLER != null) {
                DEFAULT_UNCAUGHT_EXCEPTION_HANDLER.uncaughtException(t, e);
            }
            if (onCrashListener != null) {
                onCrashListener.onCrash(info);
            }
        }`

onCrashListener 的回调写在系统uncaughtException后面 你确定能回调到?

@1Ezreal
Copy link

1Ezreal commented Apr 26, 2022

我的也是,收不到回调,断点直接到不了onCrashListener

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

No branches or pull requests

4 participants