压力测试频繁开关摄像头,在最后crash在设置参数的位置上
代码如下:
mCameraId = Integer.parseInt(target);
mCamera = Camera.open(mCameraId);
mCamera.setErrorCallback(mErrorCallback);
Camera.Parameters param = mCamera.getParameters();
param.setPreviewSize(PICTURE_WIDTH, PICTURE_HEIGHT);
mCamera.setParameters(param);
日志如下:
开启前已经关闭摄像头了
--------- beginning of crash
03-30 23:12:59.467 F/libc ( 176): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 14537 (CameraCmdThread)
03-30 23:12:59.523 I/DEBUG ( 173): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-30 23:12:59.523 I/DEBUG ( 173): Build fingerprint: 'Android/rk3288_box/rk3288_box:5.1.1/LMY49F/sujl08101723:userdebug/test-keys'
03-30 23:12:59.523 I/DEBUG ( 173): Revision: '0'
03-30 23:12:59.523 I/DEBUG ( 173): ABI: 'arm'
03-30 23:12:59.523 W/NativeCrashListener( 467): Couldn't find ProcessRecord for pid 176
03-30 23:12:59.523 I/DEBUG ( 173): pid: 176, tid: 14537, name: CameraCmdThread >>> /system/bin/mediaserver <<<
03-30 23:12:59.523 E/DEBUG ( 173): AM write failure (32 / Broken pipe)
03-30 23:12:59.523 I/DEBUG ( 173): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
03-30 23:12:59.536 I/DEBUG ( 173): r0 00000006 r1 b79cc438 r2 00000078 r3 00000000
03-30 23:12:59.536 I/DEBUG ( 173): r4 00000000 r5 00000000 r6 b79cc431 r7 00000036
03-30 23:12:59.536 I/DEBUG ( 173): r8 00000006 r9 b6bc6efd sl 00000000 fp b2ef5dd0
03-30 23:12:59.536 I/DEBUG ( 173): ip 00000000 sp b2ef5370 lr b6e89dab pc b6e89dae cpsr 60000030
03-30 23:12:59.537 I/DEBUG ( 173):
03-30 23:12:59.537 I/DEBUG ( 173): backtrace:
03-30 23:12:59.537 I/DEBUG ( 173): #00 pc 0003bdae /system/lib/libc.so (strstr+21)
03-30 23:12:59.537 I/DEBUG ( 173): #01 pc 00025995 /system/lib/hw/camera.rk30board.so (android::CameraUSBAdapter::setParameters(android::CameraParameters const&, bool&)+84)
03-30 23:12:59.537 I/DEBUG ( 173): #02 pc 0002e8e1 /system/lib/hw/camera.rk30board.so (android::CameraHal::commandThread()+992)
03-30 23:12:59.537 I/DEBUG ( 173): #03 pc 0002ef5d /system/lib/hw/camera.rk30board.so
03-30 23:12:59.537 I/DEBUG ( 173): #04 pc 00010519 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+112)
03-30 23:12:59.537 I/DEBUG ( 173): #05 pc 00010089 /system/lib/libutils.so
03-30 23:12:59.537 I/DEBUG ( 173): #06 pc 0001659b /system/lib/libc.so (__pthread_start(void*)+30)
03-30 23:12:59.537 I/DEBUG ( 173): #07 pc 000144c3 /system/lib/libc.so (__start_thread+6)
03-30 23:12:59.862 I/SerialDataParser(31627): onDataReceived size:1 str:01
03-30 23:12:59.911 I/SerialDataParser(31627): onDataReceived size:1 str:05
03-30 23:12:59.965 I/SerialDataParser(31627): onDataReceived size:37 str:7b226d6f64756c65223a227770222c2266756e6374696f6e223a2277702e656e746572227d
03-30 23:13:00.004 I/DEBUG ( 173):
03-30 23:13:00.004 I/DEBUG ( 173): Tombstone written to: /data/tombstones/tombstone_04
03-30 23:13:00.005 I/BootReceiver( 467): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
03-30 23:13:00.008 I/ServiceManager( 167): service 'media.audio_flinger' died