android - 致命信号 11 (SIGSEGV),代码 1 (SEGV_MAPERR),tid 22274 (hwuiTask1) 中的故障地址 0x0
问题描述
当我将 exoplayer 用于视频并收到此错误“致命信号 11 (SIGSEGV),代码 1 (SEGV_MAPERR),tid 22274 (hwuiTask1) 中的故障地址 0x0”时,应用程序崩溃了。当我使用它时android:hardwareAccelerated="false"
,它只能工作,但是在我的情况下, false 正在创建问题以显示内容。所以我所做的,我将 layertype 实现为仅用于视频查看的软件,但它不显示视频。我检查了许多解决方案,例如0x636f7d89 (code=1) 处的 Android Fatal signal 11 (SIGSEGV)。如何追踪它? 但仍然没有解决问题,谁能帮我解决这个问题。这是我的堆栈跟踪
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: Cause: null pointer dereference 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: x0 00000073d1a1f448 x1 0000007433421820 x2 0000000000000020 x3 0000000000000002 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: x4 00000073d03c65a0 x5 00000073d03c65c0 x6 000000743708e940 x7 000000743708e760 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: x8 00000073d1a1f3c0 x9 0000000000000088 x10 000000000000000f x11 00000073c0000000 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: x12 0000000000000020 x13 0000000000011bb8 x14 0000000000000001 x15 0000000000000000 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: x16 00000074c54ee890 x17 00000074c6a6b640 x18 00000073b76de000 x19 0000000000000000 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: x20 0000007433421820 x21 00000073d1a1f448 x22 00000074c54e9b28 x23 0000007432b9c020 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: x24 00000074c54e9b78 x25 0000000000000000 x26 0000000000000001 x27 0000000000000003 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: x28 0000000000000000 x29 0000007432b99e20 2021-09-02 18:45:35.646 22280-22280/? A/DEBUG: sp 0000007432b99e00 lr 00000074c54b10c0 pc 00000074c6a6b65c 2021-09-02 18:45:35.932 22280-22280/? A/DEBUG: backtrace: 2021-09-02 18:45:35.932 22280-22280/? A/DEBUG: #00 pc 000000000000f65c /system/lib64/libutils.so (android::RefBase::decStrong(void const*) const+28) (BuildId: e694ec4393425b1d99ea7621766c5862) 2021-09-02 18:45:35.932 22280-22280/? A/DEBUG: #01 pc 00000000000a70bc /system/lib64/libgui.so (android::Vector<android::ComposerState>::do_destroy(void*, unsigned long) const+32) (BuildId: 7a4120ceec9f946dbd431c5623be1c15) 2021-09-02 18:45:35.933 22280-22280/? A/DEBUG: #02 pc 000000000001610c /system/lib64/libutils.so (android::VectorImpl::finish_vector()+80) (BuildId: e694ec4393425b1d99ea7621766c5862)
解决方案
我解决了这个问题,可能会对其他人有所帮助。android:hardwareAccelerated="true"
当我使用表面视图为moto e(7) plus、One Plus 6 等设备播放视频时,问题出在 exoplayer 上。所以,我app:surface_type="texture_view"
在 exoplayer 布局文件中添加了这样
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/video_player"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="0dp"
android:background="@color/black"
android:padding="0dp"
app:surface_type="texture_view"
app:resize_mode="fixed_height">
</com.google.android.exoplayer2.ui.PlayerView>
推荐阅读
- javascript - 如何获取对象的属性名称并在 javascript 中使用该属性名称
- reactjs - You may need an appropriate loader to handle this file type.
- ssl - 如果我要反向代理子域,我应该使用什么 SSL 证书?
- c# - OWIN Authentication.GetExternalLoginInfo() 不适用于linkedin,但适用于其他人
- java - 我在 okhttp 库中没有看到我与 Picasso 一起使用的照片?
- angular - PrimeNg
排序 - python - Pandas 只在 excel 中编写部分代码
- xaml - 如何通过在 Xamarin 中调用 API 在 UI 上显示数据
- string - 如何在 Bash 脚本中连接字符串变量
- c - 我在 C 程序中对数组进行排序时出错