如果你的报错堆栈中包含以下信息,其中的关键信息是 anon:dalvik-classes2.dex extracted in memory
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x3c in tid 8619 (eplabv3plusncnn), pid 8619 ()
2023-10-07 15:48:31.395 9793-9793 DEBUG crash_dump64 A pid: 8619, tid: 8619, name: eplabv3plusncnn >>> com.tencent.deeplabv3plusncnn <<<
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #00 pc 000000000017c644 /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #01 pc 000000000017c470 /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #02 pc 0000000000205b90 /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #03 pc 0000000000169f50 /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #04 pc 000000000016a074 /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #05 pc 000000000016a074 /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #06 pc 000000000016a750 /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #07 pc 000000000016a750 /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #08 pc 000000000016f680 /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #09 pc 000000000016eefc /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #10 pc 0000000000137a4c /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.669 9793-9793 DEBUG crash_dump64 A #11 pc 00000000001367cc /data/app/com.tencent.deeplabv3plusncnn-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!libdeeplabv3plusncnn.so (offset 0x3c8e000) (Java_com_tencent_deeplabv3plus_Deeplabv3plusNcnn_YoloFaceDetect+176) (BuildId: f7ce76fecaedbe3885c2cbe6ef2143adf91ff757)
2023-10-07 15:48:31.670 9793-9793 DEBUG crash_dump64 A #19 pc 0000000000000a92 [anon:dalvik-classes2.dex extracted in memory from /data/app/com.xxx.xxxx-1L2ULzYH_2mgLQF9zeq2wA==/base.apk!classes2.dex]
出现了这个说明是误用了GPU加速,参考 stackoverflow 禁用硬件加速
此时的 opt.use_vulkan_compute应该设置成 false,即使用CPU不使用GPU加速