gpt4 book ai didi

android - tgkill - Android 8.0 Samsung S8 上的 native 错误

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:28:44 25 4
gpt4 key购买 nike

最近我开始遇到 Android native 崩溃(在 Google Play vitals 中报告)。它们仅发生在搭载 Android 8 的三星 Galaxy S8 或 S8+ 手机上。

根据堆栈跟踪,它与 UI 渲染器线程有关。但是我不知道如何修复它,甚至不知道它在应用程序中的确切位置。

知道如何找出应用程序中发生这种情况的位置吗?为什么只有搭载 Android 8 的 Galaxy S8 受到影响?谢谢。

backtrace:
#00 pc 0000000000071854 /system/lib64/libc.so (tgkill+8)
#01 pc 000000000001e058 /system/lib64/libc.so (abort+88)
#02 pc 0000000000008248 /system/lib64/liblog.so (__android_log_assert+328)
#03 pc 0000000000052430 /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread10EglManager11damageFrameERKNS1_5FrameERK6SkRect+320)
#04 pc 000000000004f9dc /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread14OpenGLPipeline4drawERKNS1_5FrameERK6SkRectS8_RKNS0_12FrameBuilder13LightGeometryEPNS0_16LayerUpdateQueueERKNS0_4RectEbRKNS0_15BakedOpRenderer9LightInfoERKNSt3__16vectorINS_2spINS0_10RenderNodeEEENSM_9allocatorISQ_EEEEPNS0_19FrameInfoVisualizerE+76)
#05 pc 000000000004d7e0 /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread13CanvasContext4drawEv+176)
#06 pc 00000000000511e8 /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread13DrawFrameTask3runEv+184)
#07 pc 0000000000058494 /system/lib64/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+356)
#08 pc 0000000000011c58 /system/lib64/libutils.so (_ZN7android6Thread11_threadLoopEPv+280)
#09 pc 00000000000fd688 /system/lib64/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+136)
#10 pc 000000000006de44 /system/lib64/libc.so (_ZL15__pthread_startPv+36)
#11 pc 000000000001f9a4 /system/lib64/libc.so (__start_thread+68)

最佳答案

Logcat 分析

这就是您的代码崩溃的地方 EglManager.cpp :

void EglManager::damageFrame(const Frame& frame, const SkRect& dirty) {
#ifdef EGL_KHR_partial_update
if (EglExtensions.setDamage && mSwapBehavior == SwapBehavior::BufferAge) {
EGLint rects[4];
frame.map(dirty, rects);
if (!eglSetDamageRegionKHR(mEglDisplay, frame.mSurface, rects, 1)) {
LOG_ALWAYS_FATAL("Failed to set damage region on surface %p, error=%s",
(void*)frame.mSurface, egl_error_str());
}
}
#endif
}

SkiaOpenGLPipeline.cpp 调用:

SkiaOpenGLPipeline::draw //method

mEglManager.damageFrame(frame, dirty);

为什么?

看起来你可能有一个“Failed to set damage region on surface”,可能是在 onResume() 之后 screen rotationonPause() 在你的 Activity 中。参见 fixing-common-android-lifecycle-issues

修复

I started getting this crash after updating to Oreo, every-time I started my app, with the message "Failed to set damage region on surface" followed by all those lines about libhwui.so and EglManager And it turned out that, for some obscure reason, it was somehow caused by a totally unrelated problem in my app (too many open files [forgot to close them]). After fixing this my own bug, no more crashes on the EglManager. [also note that crashes only happen if hardware acceleration is turned on] Ref: issuetracker.google.com { issue 70259031}

另请参阅:eglCreateWindowSurface {SO problem} , Logging , native-crashes-on-abort-in-developer-console-with-oreo-8-1 {SO problem} , hardware-acceleration , opengl , GLSurfaceView

关于android - tgkill - Android 8.0 Samsung S8 上的 native 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50360227/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com