1

15% of times that I stop recording video, app stops wich Fatal signal 11.

videoRecorder.stop();//video recorder is MediaRecorder object
videoRecorder.release();                

if (camera != null) {
    camera.stopPreview();
    camera.setPreviewDisplay(null);
    camera.setPreviewCallbackWithBuffer(null);
    camera.release();
    camera = null;
}

04-04 22:55:16.907: D/CrashAnrDetector(4860): backtrace:

04-04 22:55:16.907: D/CrashAnrDetector(4860): #00 pc 00061278 /system/lib/libmedia.so (android::MediaRecorder::stop()+3)

04-04 22:55:16.907: D/CrashAnrDetector(4860): #01 pc 0001ac4d /system/lib/libmedia_jni.so

04-04 22:55:16.907: D/CrashAnrDetector(4860): #02 pc 0001dc4c /system/lib/libdvm.so (dvmPlatformInvoke+112)

04-04 22:55:16.907: D/CrashAnrDetector(4860): #03 pc 0004e113 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)

04-04 22:55:16.907: D/CrashAnrDetector(4860): #04 pc 00027060 /system/lib/libdvm.so

04-04 22:55:16.907: D/CrashAnrDetector(4860): #05 pc 0002e010 /system/lib/libdvm.so (dvmMterpStd(Thread*)+76)

04-04 22:55:16.907: D/CrashAnrDetector(4860): #06 pc 0002b6bc /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)

04-04 22:55:16.907: D/CrashAnrDetector(4860): #07 pc 0006053f /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+338)

04-04 22:55:16.907: D/CrashAnrDetector(4860): #08 pc 00060563 /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)

04-04 22:55:16.907: D/CrashAnrDetector(4860): #09 pc 00055253 /system/lib/libdvm.so

04-04 22:55:16.907: D/CrashAnrDetector(4860): #10 pc 0000d208 /system/lib/libc.so (__thread_entry+72)

04-04 22:55:16.907: D/CrashAnrDetector(4860): #11 pc 0000d3a4 /system/lib/libc.so (pthread_create+240)

Any idea how to solve?

user3782779
  • 1,669
  • 3
  • 22
  • 36
  • MediaRecorder is very picky about the order of operations to the point that you can't even stop() twice in a row; Make sure you aren't calling each function more than once until you reset() or recreate it. Log every call. See also: https://stackoverflow.com/q/11863488/738196 – Keilaron Mar 26 '18 at 18:16

0 Answers0