集成百度ORC 识别报 Fatal signal 11 (SIGSEGV) (RenderThread) 错误(已解决)

错误日志:

 

09-17 16:34:14.052 1422-1519/com.dcqtech.syl A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 1519 (RenderThread)
09-17 16:34:14.157 287-287/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-17 16:34:14.158 287-287/? A/DEBUG: Build fingerprint: 'Xiaomi/cancro_wc_lte/cancro:6.0.1/MMB29M/8.9.6:user/release-keys'
09-17 16:34:14.159 287-287/? A/DEBUG: Revision: '0'
    ABI: 'arm'
    pid: 1422, tid: 1519, name: RenderThread  >>> com.dcqtech.syl <<<
    signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
09-17 16:34:14.220 287-287/? A/DEBUG:     r0 95f92e90  r1 0000812f  r2 0000812f  r3 00000001
        r4 9cde21f4  r5 a93a80c0  r6 00000001  r7 00000000
        r8 9cde240c  r9 aed1ef00  sl 9cde2550  fp 00000000
        ip 00000000  sp 9cde2108  lr b5d74de1  pc 00000000  cpsr 200e0010
09-17 16:34:14.237 287-287/? A/DEBUG: backtrace:
09-17 16:34:14.241 287-287/? A/DEBUG:     #00 pc 00000000  
09-17 16:34:14.242 287-287/? A/DEBUG:     #01 pc 00019ddf  /system/lib/libhwui.so
09-17 16:34:14.243 287-287/? A/DEBUG:     #02 pc 00040d4f  /system/lib/libhwui.so
09-17 16:34:14.244 287-287/? A/DEBUG:     #03 pc 00044975  /system/lib/libhwui.so
09-17 16:34:14.246 287-287/? A/DEBUG:     #04 pc 0002aa63  /system/lib/libhwui.so
        #05 pc 00027b8f  /system/lib/libhwui.so
09-17 16:34:14.247 287-287/? A/DEBUG:     #06 pc 00028e83  /system/lib/libhwui.so
        #07 pc 0003f14d  /system/lib/libhwui.so
09-17 16:34:14.248 287-287/? A/DEBUG:     #08 pc 0001aa79  /system/lib/libhwui.so
        #09 pc 0001c82b  /system/lib/libhwui.so
        #10 pc 0001f871  /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+80)
        #11 pc 00010075  /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
09-17 16:34:14.249 287-287/? A/DEBUG:     #12 pc 00063bff  /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+70)
        #13 pc 0003f567  /system/lib/libc.so (_ZL15__pthread_startPv+30)
        #14 pc 00019c37  /system/lib/libc.so (__start_thread+6)
09-17 16:34:14.625 337-468/? E/ThermalEngine: Failed to set desired CPU[1] frequency limit to 2457600
09-17 16:34:14.625 337-468/? E/ThermalEngine: Failed to set desired CPU[2] frequency limit to 2457600
09-17 16:34:14.882 337-468/? E/ThermalEngine: Failed to set desired CPU[1] frequency limit to 1728000
09-17 16:34:14.883 337-468/? E/ThermalEngine: Failed to set desired CPU[2] frequency limit to 1728000
09-17 16:34:15.717 337-468/? E/ThermalEngine: Failed to set desired CPU[1] frequency limit to 2457600
09-17 16:34:15.717 337-468/? E/ThermalEngine: Failed to set desired CPU[2] frequency limit to 2457600
09-17 16:34:16.003 287-287/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_04
09-17 16:34:16.003 287-287/? E/DEBUG: AM write failed: Broken pipe
09-17 16:34:16.137 2169-5062/system_process E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=452, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
09-17 16:34:16.137 2169-5062/system_process E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ id=451, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]
09-17 16:34:16.164 337-468/? E/ThermalEngine: Failed to set desired CPU[1] frequency limit to 1728000
09-17 16:34:16.164 337-468/? E/ThermalEngine: Failed to set desired CPU[2] frequency limit to 1728000
09-17 16:34:16.325 2621-2621/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.089 2630-2630/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.160 2634-2634/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.223 2637-2637/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.301 2639-2639/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.361 2643-2643/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.424 2645-2645/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.510 2650-2650/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.571 2655-2655/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.635 2658-2658/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:17.716 2661-2661/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/data@[email protected]@[email protected] getppid=2603: Permission denied
09-17 16:34:18.163 25411-25411/com.xiaomi.smarthome:core E/scan2: MSG_SCAN_WIFI

错误原因:调用以下初始化代码:

//  调用身份证扫描必须加上 intent.putExtra(CameraActivity.KEY_NATIVE_MANUAL, true); 关闭自动初始化和释放本地模型
CameraNativeHelper.init(MainActivity.this, OCR.getInstance(MainActivity.this).getLicense(),
        new CameraNativeHelper.CameraNativeInitCallback() {
            @Override
            public void onError(int errorCode, Throwable e) {
                String msg;
                switch (errorCode) {
                    case CameraView.NATIVE_SOLOAD_FAIL:
                        msg = "加载so失败,请确保apk中存在ui部分的so";
                        break;
                    case CameraView.NATIVE_AUTH_FAIL:
                        msg = "授权本地质量控制token获取失败";
                        break;
                    case CameraView.NATIVE_INIT_FAIL:
                        msg = "本地质量控制";
                        break;
                    default:
                        msg = String.valueOf(errorCode);
                }
                //btnSubmit.setText("本地质量控制初始化错误,错误原因: " + msg);
            }
        });

初始化的时候应该只初始化一次,最好放到Application 里面,不然容易出现上述错误。

你可能感兴趣的:(集成百度ORC 识别报 Fatal signal 11 (SIGSEGV) (RenderThread) 错误(已解决))