三星设备上的本机崩溃高峰 [英] Native crash peak on Samsung devices

查看:750
本文介绍了三星设备上的本机崩溃高峰的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上个月,我在Google Play控制台上看到了本机崩溃的高峰,这些崩溃来自三星设备,其中98%主要是Android 10(90%),其次是Android 9(10%).超过一半的案例是关于三星S9设备的,而其余的案例是关于相当新的设备型号(三星s10 +,Note9等)的.

In the last month I saw a strong peak of native crashes on Google Play Console and they are coming from Samsung devices at 98% mostly Android 10 (90%) and secondarily Android 9 (10%). More than the half of cases are about Samsung S9 devices, while the rest is about a pretty recent device models (Samsung s10+, Note9, etc).

有堆栈跟踪:

#00  pc 0000000000083360  /apex/com.android.runtime/lib64/bionic/libc.so (abort+176)
  #01  pc 0000000000008a74  /system/lib64/liblog.so (__android_log_assert+324)
  #02  pc 00000000003fb0dc  /system/lib64/libhwui.so (android::uirenderer::renderthread::EglManager::swapBuffers(android::uirenderer::renderthread::Frame const&, SkRect const&)+276)
  #03  pc 00000000003fae4c  /system/lib64/libhwui.so (android::uirenderer::skiapipeline::SkiaOpenGLPipeline::swapBuffers(android::uirenderer::renderthread::Frame const&, bool, SkRect const&, android::uirenderer::FrameInfo*, bool*)+92)
  #04  pc 0000000000407c8c  /system/lib64/libhwui.so (android::uirenderer::renderthread::CanvasContext::draw()+716)
  #05  pc 0000000000406d38  /system/lib64/libhwui.so (_ZNSt3__110__function6__funcIZN7android10uirenderer12renderthread13DrawFrameTask11postAndWaitEvE3$_0NS_9allocatorIS6_EEFvvEEclEv$c303f2d2360db58ed70a2d0ac7ed911b+216)
  #06  pc 0000000000417a44  /system/lib64/libhwui.so (android::uirenderer::WorkQueue::process()+228)
  #07  pc 0000000000417770  /system/lib64/libhwui.so (android::uirenderer::renderthread::RenderThread::threadLoop()+80)
  #08  pc 00000000000137a4  /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+284)
  #09  pc 00000000000e3b14  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #10  pc 0000000000085330  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

此外,仅三星设备和仅Android 10上也出现了另一个问题(设备模型分布似乎很随机):无需采取任何特殊措施即可解决此问题

In addition, also another issue appeared on Samsung devices only and Android 10 only (device model distribution seems pretty random): this was solved without any particular action taken

#00  pc 0000000002cfeadc  /data/app/com.google.android.webview-8w0eiuwFhdVaEviNzD1U7g==/base.apk!libmonochrome.so (offset 0x15b000)

我对导致此问题的原因一无所知,但我还附加了我的 build.gradle 文件依赖项,因为这些问题通常与Google库相关联.

I have no clue on what is causing the issue, but I also attach my build.gradle file dependencies because these problems are usually linked to Google libraries.

dependencies {

    implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'
    implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04'
    implementation 'androidx.preference:preference:1.1.0'
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.google.android.material:material:1.1.0-alpha06'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.browser:browser:1.2.0'
    implementation 'com.github.smarteist:autoimageslider:1.3.2'

    implementation 'com.android.billingclient:billing:2.1.0'
    implementation 'com.nononsenseapps:filepicker:4.2.1'
    implementation 'com.simplecityapps:recyclerview-fastscroll:2.0.0'
    implementation 'com.github.AppIntro:AppIntro:5.1.0'
    implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
    implementation 'com.github.faruktoptas:FancyShowCaseView:1.0.0'
    implementation 'me.drakeet.support:toastcompat:1.1.0'
    implementation 'com.github.hkk595:Resizer:v1.5'

    implementation 'com.github.bumptech.glide:glide:4.11.0'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'com.google.firebase:firebase-analytics:17.2.1'
    implementation 'com.google.firebase:firebase-messaging:20.0.1'
    implementation 'com.google.firebase:firebase-ads:18.2.0'
    implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01'
    implementation 'com.google.firebase:firebase-crashlytics-ndk:17.0.0-beta01'

}

有人见过同样的问题吗?

Did anyone see the same issue?

更新关于第一个问题,我对发生崩溃的应用程序活动进行的主要更改之一是关于较新的Android View绑定.由于崩溃似乎与UI有关,因此可能是这种情况.有人也使用视图绑定吗?

UPDATE Regarding the first issue, one of the major changes I applied to the app activity in which crashes happen, is about the newer Android View Binding. Since the crash seems to be related to UI, maybe this is the case. Does anyone use View Binding as well?

更新2 看起来,切换到旧的 findViewById (仅在崩溃时处于活动状态的Activity中)而不是使用视图绑定使问题消失了.目前,我正在使用一小部分Beta测试人员进行测试,但此时我应该已经看到了一些崩溃报告.我将保持此帖子的更新.

UPDATE 2 It looks like that switching to the old findViewById (just in the Activity that was active at the time of the crash) instead of using View Binding made the problem disappear. For the moment I'm testing it on a small pool of beta testers but at this time I should have already seen some crash report. I will keep this post updated.

推荐答案

即使我在应用程序中的某些广告中也遇到了此崩溃问题.即使您能够通过调用webview.loadUrl("chrome://crash")来重现webview崩溃,这也应该会使您的webview崩溃,并且您也可以重现该场景.

Even I've experienced this crash in some of the ads in the app. Even you would be able to reproduce the webview crash by calling webview.loadUrl("chrome://crash"), this should crash your webview and you would be able to reproduce the scenario.

抑制这些崩溃的唯一方法是覆盖

The only way to supress these crashes is to override onRenderProcessGone in webview client and handle the crash by yourself in this case Ads SDK have to handle as the webview is implemented by them.

参考: https://github.com/mopub/mopub-android-sdk/issues/312

这篇关于三星设备上的本机崩溃高峰的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆