Repository: react-native-camera/react-native-camera

Issue #590: OutOfMemoryError on Android
Created: 2017-02-07T14:03:30Z
The react-native-camera package crashes my React Native Android app, the same app works fine with iOS version of the package.
The captured photo is in a very high resolution (3096 × 4128). A side effect is that the phone is overheating.
Steps to reproduce
1.Open an Android app with react-native-camera viewfinder attached to the main screen
Expected behaviour
The Android app should not crash after loading the screen, or taking a picture.
Actual behaviour


A java.lang.OutOfMemoryError and similar memory errors are shown with reference to RCTCameraModule


When a picture is taken for the 1st time after installing the app, the camera always crashes the app.


When a picture is taken for the 2nd+ time, the resulting image usually contains incomplete data (appearing as grey/white areas) (1 of 10 photos is good) and the app still crashes shortly after taking the photo.


Environment

Node.js version: v7.2.1
React Native version: 0.40.0, 0.39.2
React Native platform + platform version: Android 5.1.1 (compiled for Android 6.0)

react-native-camera
Version: 0.6.0, 0.4.0
Camera config
<Camera
  ref={(cam) => {
    this.props.setCamera(cam);
  }}
  style={{position:'absolute',left:0,top:0,right:0,bottom:0,height:this.props.width,width:this.props.width}}
  captureAudio={false}
  captureTarget={Camera.constants.CaptureTarget.memory}
  aspect={Camera.constants.Aspect.fill}>
</Camera>;

Example of an incomplete image:

Log with location of the error (react-native-camera  0.6.0)
E/AndroidRuntime(30695): FATAL EXCEPTION: main
E/AndroidRuntime(30695): Process: com.reactnativeapp, PID: 30695
E/AndroidRuntime(30695): java.lang.OutOfMemoryError: Failed to allocate a 51121164 byte allocation with 16777120 free bytes and 43MB until OOM
E/AndroidRuntime(30695): 	at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
E/AndroidRuntime(30695): 	at android.graphics.Bitmap.nativeCreate(Native Method)
E/AndroidRuntime(30695): 	at android.graphics.Bitmap.createBitmap(Bitmap.java:946)
E/AndroidRuntime(30695): 	at android.graphics.Bitmap.createBitmap(Bitmap.java:917)
E/AndroidRuntime(30695): 	at android.graphics.Bitmap.createBitmap(Bitmap.java:848)
E/AndroidRuntime(30695): 	at com.lwansbrough.RCTCamera.RCTCameraModule.rotate(RCTCameraModule.java:561)
E/AndroidRuntime(30695): 	at com.lwansbrough.RCTCamera.RCTCameraModule.fixOrientation(RCTCameraModule.java:580)
E/AndroidRuntime(30695): 	at com.lwansbrough.RCTCamera.RCTCameraModule.access$300(RCTCameraModule.java:45)
E/AndroidRuntime(30695): 	at com.lwansbrough.RCTCamera.RCTCameraModule$3.onPictureTaken(RCTCameraModule.java:671)
E/AndroidRuntime(30695): 	at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1165)
E/AndroidRuntime(30695): 	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(30695): 	at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime(30695): 	at android.app.ActivityThread.main(ActivityThread.java:6917)
E/AndroidRuntime(30695): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(30695): 	at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(30695): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
E/AndroidRuntime(30695): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Another log (react-native-camera  0.6.0):
$ adb logcat camer*:E
E/RCT_CAMERA(23477): CAPTURE STARTED
E/mm-camera-AEC(  358): aec_process_pack_output(539):OIS-frame_id(0), exp_index=333, real_gain=4.383379, linecnt=4297 , aec_settled 1, cur_luma(41), lux_idx(328.926605)
E/QCameraParameters(  339): InCall is not set
E/QCameraParameters(  339): maxZoom = 100 m_pCapability->zoom_ratio_tbl_cnt = 400
E/QCameraParameters(  339): OIS: setOISModes
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000e
E/mm-camera(  358): mct_pipeline_send_ctrl_events: Send Set Parm events
E/mm-camera(  358): stats_port_proc_downstream_set_parm pip recording hint value: 0
E/QCameraParameters(  339): InCall is not set
E/QCameraParameters(  339): maxZoom = 100 m_pCapability->zoom_ratio_tbl_cnt = 400
E/QCameraParameters(  339): OIS: setOISModes
E/mm-camera-AEC(  358): aec_process_pack_output(540):OIS-frame_id(0), exp_index=333, real_gain=4.383379, linecnt=4297 , aec_settled 1, cur_luma(40), lux_idx(328.926605)
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000e
E/mm-camera(  358): mct_pipeline_send_ctrl_events: Send Set Parm events
E/mm-camera(  358): stats_port_proc_downstream_set_parm pip recording hint value: 0
E/QCameraParameters(  339): InCall is not set
E/QCameraParameters(  339): maxZoom = 100 m_pCapability->zoom_ratio_tbl_cnt = 400
E/QCameraParameters(  339): OIS: setOISModes
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000e
E/mm-camera(  358): mct_pipeline_send_ctrl_events: Send Set Parm events
E/mm-camera(  358): stats_port_proc_downstream_set_parm pip recording hint value: 0
E/mm-camera-AEC(  358): aec_process_pack_output(541):OIS-frame_id(0), exp_index=333, real_gain=4.383379, linecnt=4297 , aec_settled 1, cur_luma(41), lux_idx(328.838135)
E/QCameraStream(  339): static void* qcamera::QCameraStream::dataProcRoutine(void*): Exit
E/QCameraStream(  339): static void* qcamera::QCameraStream::dataProcRoutine(void*): X
E/QCameraStream(  339): static void* qcamera::QCameraStream::dataProcRoutine(void*): Exit
E/QCameraStream(  339): static void* qcamera::QCameraStream::dataProcRoutine(void*): X
E/mm-camera-intf(  339): mm_stream_streamoff: E, my_handle = 0xc0601, fd = 75, state = 6
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000009
E/mm-camera(  358): mct_pipeline_process_set: stream_type = 1
E/mm-camera(  358): cpp_module_handle_streamoff_event:1887, info: doing stream-off for identity 0x20002
E/mm-camera-img(  358): faceproc_comp_abort:545] state 2
E/mm-camera-img(  358): Free Wmemory 0
E/mm-camera-img(  358): faceproc_comp_abort:572] X
E/mm-camera(  358): cpp_module_handle_streamoff_event:1933] iden:0x20002, linked_params:0x0
E/mm-camera(  358): cpp_hardware_process_streamoff:537] skip_iden:0x0, duplicate_stream_status:0x0
E/mm-camera(  358): cpp_module_handle_streamoff_event:1944, info: stream-off done for identity 0x20002
E/mm-camera(  358): isp_streamoff: E, session_id = 2
E/mm-camera(  358): isp_proc_async_command: E ISP_ASYNC_COMMAND_STREAMOFF = 2
E/mm-camera(  358): isp_proc_streamoff: E, session_id = 2, stream_id = 2, stream_type = 1
E/mm-camera(  358): isp_axi_util_subscribe_v4l2_event: event_type = 0x8000100, is_subscribe = 0
E/mm-camera-AEC(  358): aec_process_pack_output(542):OIS-frame_id(0), exp_index=333, real_gain=4.383379, linecnt=4297 , aec_settled 1, cur_luma(41), lux_idx(328.738525)
E/mm-camera(  358): stats_port_fwd_upstream_check: Stream OFF for this stream type had been received!
E/mm-camera(  358): stats_port_event: Blocking Upstream events!!!
E/mm-camera(  358): stats_port_fwd_upstream_check: Stream OFF for this stream type had been received!
E/mm-camera(  358): stats_port_event: Blocking Upstream events!!!
E/mm-camera(  358): stats_action_buf_config: cfg = 0, stats_mask = 0x798
E/mm-camera(  358): isp_proc_async_command: X ISP_ASYNC_COMMAND_STREAMOFF = 2
E/mm-camera(  358): isp_proc_async_command: X, session_id = 2, async_cmd_id = 2
E/mm-camera(  358): isp_streamoff: X, session_id = 2
E/mm-camera(  358): ispif_proc_streamoff: Enter
E/mm-camera(  358): ispif_proc_streamoff: Make ISPIF_CFG IOCTL!
E/mm-camera(  358): ispif_proc_streamoff: ISPIF_CFG IOCTL returns!
E/mm-camera(  358): ispif_proc_streamoff: X, rc = 0
E/mm-camera(  358): release_isp_resource <------
E/mm-camera(  358): release isp0 rdi
E/mm-camera(  358): release_isp_resource: isp_id = 0, camif_session_bit = 0x0
E/mm-camera-sensor(  358): led_flash_process:129 CAM Flash Off
E/mm-camera(  358): stop_sof_check_thread: Stopping/Joining SOF timeout thread
E/mm-camera-intf(  339): mm_camera_cmd_thread_stop: before join 0xb8779988, qsize = 1
E/mm-camera-intf(  339): mm_camera_cmd_thread: MM_CAMERA_CMD_TYPE_EXIT - cmd_pid = 0xb8779988
E/mm-camera-intf(  339): mm_camera_cmd_thread: X - cmd_pid = 0xb8779988
E/mm-camera-intf(  339): mm_stream_streamoff: E, my_handle = 0xc0500, fd = 72, state = 6
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000009
E/mm-camera(  358): mct_pipeline_process_set: stream_type = 7
E/mm-camera-intf(  339): mm_camera_cmd_thread_stop: before join 0xb87b3210, qsize = 1
E/mm-camera-intf(  339): mm_camera_cmd_thread: MM_CAMERA_CMD_TYPE_EXIT - cmd_pid = 0xb87b3210
E/mm-camera-intf(  339): mm_camera_cmd_thread: X - cmd_pid = 0xb87b3210
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000b
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000b
E/mm-camera(  358): cpp_port_check_caps_unreserve:170, identity=0x20002
E/mm-camera(  358): cpp_port_check_caps_unreserve:179, identity=0x20002, unreserved
E/mm-camera(  358): cpp_port_check_caps_unreserve:170, identity=0x20002
E/mm-camera(  358): cpp_port_check_caps_unreserve:179, identity=0x20002, unreserved
E/mm-camera-img(  358): faceproc_comp_abort:545] state 1
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=isp
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=isp
E/mm-camera(  358): mct_stream_check_name:mod=isp, name=isp
E/mm-camera(  358): mct_stream_get_module: module: 0xb886ad40
E/mm-camera(  358): q3a_thread_af_stop: start MSG_STOP_THREAD
E/mm-camera(  358): af_thread_handler: af thread returned
E/mm-camera(  358): afd_thread_en_q_msg thread -1198862736 is set to inactive
E/mm-camera(  358): q3a_port_unlink X refcnt 0
E/mm-camera(  358): stats_port_unlink: X
E/mm-camera(  358): stats_port_check_caps_unreserve E
E/mm-camera(  358): stats_port_check_reserved_stream: private->reserved_id=0x20000
E/mm-camera(  358): stats_port_check_caps_unreserve X
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000a
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000012
E/mm-camera(  358): mct_stream_start_link:CAM_STREAM_TYPE_METADATA
E/mm-camera-intf(  339): mm_stream_get_v4l2_fmt: Unknown fmt=78
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000004
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000a
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000012
E/mm-camera(  358): mct_stream_start_link: Regular snapshot
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=sensor
E/mm-camera(  358): mct_stream_get_module: module: 0xb88451a0
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=iface
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=iface
E/mm-camera(  358): mct_stream_get_module: module: 0xb88682f8
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=isp
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=isp
E/mm-camera(  358): mct_stream_check_name:mod=isp, name=isp
E/mm-camera(  358): mct_stream_get_module: module: 0xb886ad40
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=stats
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=stats
E/mm-camera(  358): mct_stream_check_name:mod=isp, name=stats
E/mm-camera(  358): mct_stream_check_name:mod=stats, name=stats
E/mm-camera(  358): mct_stream_get_module: module: 0xb886b068
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=pproc
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=pproc
E/mm-camera(  358): mct_stream_check_name:mod=isp, name=pproc
E/mm-camera(  358): mct_stream_check_name:mod=stats, name=pproc
E/mm-camera(  358): mct_stream_check_name:mod=pproc, name=pproc
E/mm-camera(  358): mct_stream_get_module: module: 0xb886dc80
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_create_stream_topology:469] feature mask 0x0 0x0
E/mm-camera(  358): cpp_port_check_caps_reserve:77, identity=0x20002
E/mm-camera(  358): cpp_port_check_caps_reserve:143, identity=0x20002, reserved
E/mm-camera(  358): cpp_module_set_output_duplication_flag:613, current stream w=4128, h=3096, st=4128, sc=3104, fmt=1, identity=0x20002
E/mm-camera(  358): cpp_module_set_output_duplication_flag:617, info: no linked stream
E/mm-camera(  358): cpp_module_notify_add_stream:1295, info: success, identity=0x20002
E/mm-camera(  358): afd_port_check_caps_reserve: X
E/mm-camera(  358): q3a_port_event: Stream type change event received!
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000004
E/mm-camera-intf(  339): mm_stream_request_buf: buf_num = 21, stream type = 7
E/mm-camera-intf(  339): mm_stream_streamon: E, my_handle = 0xc0800, fd = 72, state = 6
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000008
E/mm-camera(  358): mct_pipeline_process_set: stream_type = 7
E/mm-camera-intf(  339): mm_stream_request_buf: buf_num = 8, stream type = 3
E/mm-camera-intf(  339): mm_stream_streamon: E, my_handle = 0xc0901, fd = 75, state = 6
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000008
E/mm-camera(  358): mct_pipeline_process_set: stream_type = 3
E/mm-camera-sensor(  358): port_sensor_handle_stream_on:467 H/W revision = 2(2), Criterion ver = 0
E/mm-camera-sensor(  358): module_sensor_stream_on:2096 ide 20002 SENSOR_START_STREAM
E/mm-camera-sensor(  358): module_sensor_is_ready_for_stream_on:1306 s_bundle->stream_on_count 0
E/mm-camera-sensor(  358): module_sensor_is_ready_for_stream_on:1307 is_bundle_started 0
E/mm-camera-sensor(  358): modules_sensor_set_new_resolution:315 SENSOR_SET_RESOLUTION 4128*3096 mask 8
E/mm-camera-sensor(  358): sensor_set_resolution:2465 width 4128, height 3096
E/mm-camera-sensor(  358): sensor_set_resolution:2467 stream mask 8 hfr mode 0 fps 120.550003
E/mm-camera-sensor(  358): sensor_pick_resolution:2000 requested aspect ratio 133
E/mm-camera-sensor(  358): sensor_pick_resolution:2269 sup_asp_ratio =  133
E/mm-camera-sensor(  358): sensor_set_resolution:2586 
E/mm-camera-sensor(  358): sensor_set_resolution:2588 current_fps_div 1024
E/mm-camera-sensor(  358): sensor_set_resolution:2602 Sensor name : s5k3l2xx
E/mm-camera-sensor(  358): sensor_get_resolution_info:3093 skip 0 frames
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): sensor_get_resolution_info:3185 full 4128 3096 out 4128 3096 offset 0 0 scale 1
E/mm-camera-sensor(  358): eeprom_process:1459 eeprom_process:1459: event: 70 e_ctrl->fd: 31
E/mm-camera-sensor(  358): eeprom_process:1495 e_ctrl->dimension width= 4128, height = 3096
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_process:1459 eeprom_process:1459: event: 71 e_ctrl->fd: 31
E/mm-camera-sensor(  358): eeprom_process:1500 e_ctrl->rolloff_size full width= 4128, height = 3096
E/mm-camera-sensor(  358): 
E/mm-camera(  358): receive MCT_EVENT_MODULE_SET_STREAM_CONFIG
E/mm-camera(  358): ispif_util_dump_sensor_cfg: sensor dim: width = 4128, heght = 3096, fmt = 29, is_bayer = 1
E/mm-camera(  358): ispif_util_dump_sensor_cfg: camif_crop: first_pix = 0, last_pix = 4127, first_line = 0, last_line = 3095, max_fps = 30
E/mm-camera(  358): ispif_sink_port_config <-----
E/mm-camera(  358): reserve_camif_resource: is_ispif = 1, sess_idx = 0, fps = 30, num_isps = 1 op clk: 428500000
E/mm-camera(  358): isp_sink_port_stream_config: E, session_id = 2, stream_id = 2, stream_type = 3
E/mm-camera(  358): isp_sink_port_stream_config: session_id = 2, stream_id = 2, is_split = 0
E/mm-camera(  358): isp_sink_port_stream_config: old vfe_id_mask = 0x1, new vfe_id_mask = 0x1
E/mm-camera(  358): TsAf_set_parameters: ###### wrapper_in: initial #1 ######
E/mm-camera(  358): TsAf_configure_af_stats: wrapper_in: offset_h:v[236:236] w:h[3654:1848] num_h:v[18:14] fvmin_r:gr:gb:b[80:80:80:80]
E/mm-camera(  358): TsAf_update_output_data: wrapper_out: output:
E/mm-camera(  358): TsAf_set_parameters: ###### wrapper_out: initial #2 ######
E/mm-camera(  358): after port_ispif_forward_event_to_peer
E/mm-camera-sensor(  358): chromatix name libchromatix_s5k3l2xx_snapshot.so
E/mm-camera-sensor(  358): chromatix_load_library:50 libchromatix_s5k3l2xx_snapshot.so load from phone
E/mm-camera-sensor(  358): [mm]hwinfo_make_chromatix_name:1742 hw info U13QL
E/mm-camera-sensor(  358): [mm]hwinfo_make_chromatix_name:1753 chromatix name libchromatix_s5k3l2xx_snapshot.so => libchromatix_s5k3l2xx_snapshot.so
E/mm-camera-sensor(  358): chromatix_load_library:54 chromatix from phone libchromatix_s5k3l2xx_snapshot.so
E/mm-camera-sensor(  358): load_chromatix:34 load_chromatix:34- AAA chromatix_s5k3l2xx_snapshot
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): load_chromatix:48 load_chromatix:48-chromatix_s5k3l2xx_parms header
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): sensor_set_chromatix, chx : 0xb8a022f8, common chx : 0xb8a1cf04
E/mm-camera-sensor(  358): actuator_load_lib:371 name=ak7345, mode=camera
E/mm-camera-sensor(  358): eeprom_process:1459 eeprom_process:1459: event: 72 e_ctrl->fd: 31
E/mm-camera-sensor(  358): eeprom_process:1513 e_ctrl->eeprom_lib.func_tbl =0xb6738004
E/mm-camera-sensor(  358): eeprom_process:1514 e_ctrl->eeprom_params.is_supported =0x3FF
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1034 e_ctrl->eeprom_data.afc.infinity_pos1 = 0
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1035 e_ctrl->eeprom_data.afc.infinity_pos2 = 131
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1036 e_ctrl->eeprom_data.afc.macro_pos1 = 0
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1037 e_ctrl->eeprom_data.afc.macro_pos2 = 309
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1038 e_ctrl->eeprom_data.afc.panfocus_pos = 131
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1039 e_ctrl->eeprom_data.afc.pid_coeff = 255
E/mm-camera-sensor(  358): eeprom_do_calibration:436 eeprom_do_calibration: Enter
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_do_calibration:438 eeprom_do_calibration: e_items->is_wbc = 1, e_items->is_lsc = 1
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_whitebalance_calibration:242 eeprom_whitebalance_calibration: min_gain: 0.998291
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_whitebalance_calibration:248 eeprom_whitebalance_calibration: gb_gain: 0.998291, gr_gain: 1.000000
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_whitebalance_calibration:250 eeprom_whitebalance_calibration: [Caldata]gr: 0.505849, gb: 0.585079
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_do_calibration:457 Exit
E/mm-camera-sensor(  358): module_sensor_stream_on:2696 reload_bin : 0, RELOAD_PROPERTY_VALUE=3757
E/mm-camera(  358): cpp_module_handle_chromatix_ptr_event:627 calling cpp_module_util_get_asf_wnr_params for normal
E/mm-camera(  358): awb_port_proc_downstream_ctrl: AWB Gains: r_gain: 1.198929 g_gain: 1.000000 b_gain: 1.869278 color_temp: 3845
E/mm-camera(  358): cpp_module_handle_streamon_event:1761, identity=0x20002, stream-on done
E/mm-camera(  358): cpp_module_handle_streamon_event:1811] CPP chromatix_wnr:0xb8a04bb4
E/mm-camera(  358): cpp_module_handle_streamon_event:1830] CPP chromatix_asf:0xb8a0321c
E/mm-camera(  358): isp_streamon: E, session_id = 2
E/mm-camera(  358): isp_proc_async_command: E ISP_ASYNC_COMMAND_STREAMON = 2
E/mm-camera(  358): isp_proc_streamon: E, session_id = 2, stream_id = 2, stream_type = 3 num_bufs 8
E/mm-camera(  358): isp_hw_proc_set_recording_hint: recording_hint: 0
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): wb_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): mce_set_params: param_id is not supported in this module
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): wb_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): mce_set_params: param_id is not supported in this module
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): wb_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): mce_set_params: param_id is not supported in this module
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): mesh_rolloff_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 9, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 9, is not supported in this module
E/mm-camera(  358): isp_proc_streamon: set_all_saved_params done, session_id = 2
E/mm-camera(  358): isp_proc_streamon: sending dim downstream done, session_id = 2
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): wb_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): mce_set_params: param_id is not supported in this module
E/mm-camera(  358): isp_pipeline_util_trigger_update: No active streams
E/mm-camera(  358): isp_axi_util_subscribe_v4l2_event: event_type = 0x8000100, is_subscribe = 1
E/mm-camera(  358): isp_proc_async_command: X ISP_ASYNC_COMMAND_STREAMON = 2
E/mm-camera(  358): isp_streamon: X, session_id = 2
E/mm-camera(  358): isp_proc_async_command: X, session_id = 2, async_cmd_id = 1
E/mm-camera(  358): start_sof_check_thread: Starting SOF timeout thread
E/QCamera2HWI(  339): getExifData: getExifGpsProcessingMethod null
E/QCamera2HWI(  339): getExifData: getExifLatitude null
E/QCamera2HWI(  339): getExifData: getExifLongitude null
E/QCamera2HWI(  339): getExifData: getExifAltitude null
E/QCamera2HWI(  339): getExifData: GPS not enalbe
E/qomx_image_core(  339): OMX_GetHandle:236] get instance pts is 0xb87f6618
E/mm-still(  339): OMX_ERRORTYPE qomx_component_set_callbacks(OMX_HANDLETYPE, OMX_CALLBACKTYPE*, OMX_PTR): 181: This ptr addr 0xb87f6618
E/qomx_image_core(  339): OMX_GetHandle:260] Success
E/QCameraPostProc(  339):  encodeData : No thumbnail stream using main image!
E/mm-jpeg-intf(  339): mm_jpeg_start_job:1999] session_idx 0 client idx 0
E/mm-jpeg-intf(  339): mm_jpeg_session_config_main_buffer_offset:619] yOffset = 0, cbcrOffset = (0 0), totalSize = 19222528,cbcrStartOffset = (12813312 6406656)
E/mm-jpeg-intf(  339): mm_jpeg_encoding_mode:666] encoding mode = 1 
E/jpeg_hw (  339): open /dev/jpeg0: fd = 194
E/jpeg_hw (  339): jpege_lib_init:390] handler 0x0 0x0 0x0
E/jpeg_hw (  339): jpege_lib_init:430] Successful
E/mm-jpeg-intf(  339): processAAAInfo:376]: ###QExif Add the awb value
E/mm-jpeg-intf(  339): processAAAInfo:396]: ###QExif Add the alsc value
E/mm-jpeg-intf(  339): processAAAInfo:406]: ###QExif Add the aec value
E/mm-jpeg-intf(  339): process_meta_data: exp_Time:17.000000, Br value:0.452884, shutter_speed:4.058858, iso:320 flash_mode 0 0
E/mm-jpeg-intf(  339): mm_jpeg_session_config_thumbnail:860] encode_thumbnail 1
E/mm-jpeg-intf(  339): mm_jpeg_configure_job_params:1432] Work buffer 60 0xab0ff000 WorkBufSize 20000768
E/mm-still(  339): virtual OMX_ERRORTYPE OMXJpegEncoder::startEncode():398] startEncode()
E/jpeg_hw (  339): ioctl MSM_JPEG_IOCTL_RESET: rc = 0
E/jpeg_hw (  339): jpege_lib_hw_config:568] result 0
E/jpeg_hw (  339): jpege_lib_hw_config:573] Version 30020000
E/jpeg_hw (  339): jpege_cmd_core_cfg: core cfg value = 10a005b
E/jpeg_hw (  339): ioctl jpege_cmd_core_cfg: rc = 0
E/jpeg_hw (  339): Input cbcr order = 1
E/jpeg_hw (  339): FE_CFG: Num of input planes = 2, Memory format = 1
E/jpeg_hw (  339): FE_CFG = a03b170
E/jpeg_hw (  339): ioctl jpege_lib_hw_fe_cfg: rc = 0
E/jpeg_hw (  339): jpege_lib_hw_fe_buffer_cfg:300] w 4128 h 3096 stride 4128 scanline 3104
E/jpeg_hw (  339): jpege_lib_hw_fe_buffer_cfg: numofplanes = 2, chroma height = 1548, chroma width = 4128
E/jpeg_hw (  339): ioctl jpege_lib_hw_fe_buffer_cfg: rc = 0
E/jpeg_hw (  339): ioctl jpege_lib_hw_we_cfg: rc = 0
E/jpeg_hw (  339): we_buffer_cfg PLN0_WR_BUFFER_SIZE = 67128396
E/jpeg_hw (  339): we_buffer_cfg PLN0_WR_STRIDE = 19532
E/jpeg_hw (  339): we_buffer_cfg PLN0_WR_HSTEP = 19532
E/jpeg_hw (  339): we_buffer_cfg PLN0_WR_VSTEP = 1024
E/jpeg_hw (  339): ioctl jpege_lib_hw_we_buffer_cfg: rc = 0
E/jpeg_hw (  339): InputFormat =3, Encode cfg = 83
E/jpeg_hw (  339): width = 4128, padded_height = 3104
E/jpeg_hw (  339): encoded_height = 193 , c1, encoded_width = 257, 101
E/jpeg_hw (  339): nRegVal = c10101
E/jpeg_hw (  339): ioctl jpege_lib_hw_encode_cfg: rc = 0
E/jpeg_hw (  339): ioctl jpege_lib_hw_default_scale_cfg: rc = 0
E/jpeg_hw (  339): ioctl jpeg_lib_hw_encode_state: rc = 0
E/jpeg_hw (  339): ioctl jpege_lib_hw_read_quant_tables: rc = 0
E/jpeg_hw (  339): jpege_lib_hw_config:720] success
E/jpeg_hw (  339): jpege_lib_output_buf_enq:795] output_buf: 0x0xab0ff000 enqueue 20000768, fd 60, result 0
E/jpeg_hw (  339): jpege_lib_input_buf_enq:756] input_buf: 0x0xa5fcb000 enqueue 12813312, offset 0,fd 145 
E/jpeg_hw (  339): jpege_lib_input_buf_enq:761] y_off=0x0 cbcr_off=0x0 num_of_mcu_rows=0,cr_len=0, cb_len =6390144
E/jpeg_hw (  339): ioctl /dev/jpeg0: rc = 0
E/mm-still(  339): bool QImageHybridEncoder::IsAvailable(QIEncodeParams&):203] scale input 4128x3096 crop (0, 0) output 512x384 rotation 0
E/mm-still(  339): virtual int QImageHybridEncoder::setEncodeParams(QIEncodeParams&):539] Rotation 0 Quality 35
E/mm-still(  339): virtual int QImageHybridEncoder::addInputImage(QImage&):699] Y addr 0xa5fcb000 len 12813312 fd 145
E/mm-still(  339): virtual int QImageHybridEncoder::addInputImage(QImage&):717] CbCr addr 0xa6c03400 len 6406656 fd 145
E/jpeg_hw (  339): jpege_lib_get_event:137] MSM_JPEG_IOCTL_EVT_GET rc = 0
E/jpeg_hw (  339): jpege_lib_get_input:158] MSM_JPEG_IOCTL_INPUT_GET rc = 0
E/jpeg_hw (  339): jpege_lib_get_output:185] MSM_JPEG_IOCTL_OUTPUT_GET rc = 0
E/mm-still(  339): void QImageHybridEncoder::Encode():1056] Encode done : output_size 5769
E/mm-still(  339): virtual int OMXJpegEncoder::EncodeComplete(QImage*):557] Exif length: 10207
E/mm-still(  339): virtual int QImageHybridEncoder::Stop():907] Stop 
E/mm-jpeg-intf(  339): mm_jpeg_fbd:2377] count 0 
E/mm-jpeg-intf(  339): [KPI Perf] : PROFILE_JPEG_FBD
E/mm-jpeg-intf(  339): mm_jpeg_queue_remove_job_by_job_id:2550] found matching job id
E/QCameraPostProc(  339): [KPI Perf] processJpegEvt: PROFILE_JPEG_CB 
E/QCameraPostProc(  339): releaseJpegJobData: DEBUG : src_reproc_frame 1139
E/jpeg_hw (  339): jpege_lib_release:496] closed /dev/jpeg0
E/qomx_image_core(  339): OMX_FreeHandle:331] 
E/qomx_image_core(  339): get_idx_from_handle:290] comp_idx 0 inst_idx 0
E/qomx_image_core(  339): OMX_FreeHandle:366] Success
E/QCameraStream(  339): static void* qcamera::QCameraStream::dataProcRoutine(void*): Exit
E/QCameraStream(  339): static void* qcamera::QCameraStream::dataProcRoutine(void*): X
E/QCameraStream(  339): static void* qcamera::QCameraStream::dataProcRoutine(void*): Exit
E/QCameraStream(  339): static void* qcamera::QCameraStream::dataProcRoutine(void*): X
E/mm-camera-intf(  339): mm_stream_streamoff: E, my_handle = 0xc0901, fd = 75, state = 6
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000009
E/mm-camera(  358): mct_pipeline_process_set: stream_type = 3
E/mm-camera(  358): cpp_module_handle_streamoff_event:1887, info: doing stream-off for identity 0x20002
E/mm-camera(  358): cpp_module_handle_streamoff_event:1933] iden:0x20002, linked_params:0x0
E/mm-camera(  358): cpp_hardware_process_streamoff:537] skip_iden:0x0, duplicate_stream_status:0x0
E/mm-camera(  358): cpp_module_handle_streamoff_event:1944, info: stream-off done for identity 0x20002
E/mm-camera(  358): isp_streamoff: E, session_id = 2
E/mm-camera(  358): isp_proc_async_command: E ISP_ASYNC_COMMAND_STREAMOFF = 2
E/mm-camera(  358): isp_proc_streamoff: E, session_id = 2, stream_id = 2, stream_type = 3
E/mm-camera(  358): isp_axi_util_subscribe_v4l2_event: event_type = 0x8000100, is_subscribe = 0
E/mm-camera(  358): isp_proc_async_command: X ISP_ASYNC_COMMAND_STREAMOFF = 2
E/mm-camera(  358): isp_proc_async_command: X, session_id = 2, async_cmd_id = 2
E/mm-camera(  358): isp_streamoff: X, session_id = 2
E/mm-camera(  358): ispif_proc_streamoff: Enter
E/mm-camera(  358): ispif_proc_streamoff: Make ISPIF_CFG IOCTL!
E/mm-camera(  358): ispif_proc_streamoff: ISPIF_CFG IOCTL returns!
E/mm-camera(  358): ispif_proc_streamoff: X, rc = 0
E/mm-camera(  358): release_isp_resource <------
E/mm-camera(  358): release isp0 rdi
E/mm-camera(  358): release_isp_resource: isp_id = 0, camif_session_bit = 0x0
E/mm-camera-sensor(  358): led_flash_process:129 CAM Flash Off
E/mm-camera(  358): stop_sof_check_thread: Stopping/Joining SOF timeout thread
E/mm-camera-intf(  339): mm_camera_cmd_thread_stop: before join 0xb8844c50, qsize = 1
E/mm-camera-intf(  339): mm_camera_cmd_thread: MM_CAMERA_CMD_TYPE_EXIT - cmd_pid = 0xb8844c50
E/mm-camera-intf(  339): mm_camera_cmd_thread: X - cmd_pid = 0xb8844c50
E/mm-camera-intf(  339): mm_stream_streamoff: E, my_handle = 0xc0800, fd = 72, state = 6
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000009
E/mm-camera(  358): mct_pipeline_process_set: stream_type = 7
E/mm-camera-intf(  339): mm_camera_cmd_thread_stop: before join 0xb86f12c0, qsize = 1
E/mm-camera-intf(  339): mm_camera_cmd_thread: MM_CAMERA_CMD_TYPE_EXIT - cmd_pid = 0xb86f12c0
E/mm-camera-intf(  339): mm_camera_cmd_thread: X - cmd_pid = 0xb86f12c0
E/mm-camera-intf(  339): mm_camera_cmd_thread_stop: before join 0xb875a378, qsize = 1
E/mm-camera-intf(  339): mm_camera_cmd_thread: MM_CAMERA_CMD_TYPE_EXIT - cmd_pid = 0xb875a378
E/mm-camera-intf(  339): mm_camera_cmd_thread: X - cmd_pid = 0xb875a378
E/mm-camera-intf(  339): mm_camera_cmd_thread_stop: before join 0xb884b030, qsize = 1
E/mm-camera-intf(  339): mm_camera_cmd_thread: MM_CAMERA_CMD_TYPE_EXIT - cmd_pid = 0xb884b030
E/mm-camera-intf(  339): mm_camera_cmd_thread: X - cmd_pid = 0xb884b030
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000b
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000b
E/mm-camera(  358): cpp_port_check_caps_unreserve:170, identity=0x20002
E/mm-camera(  358): cpp_port_check_caps_unreserve:179, identity=0x20002, unreserved
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=isp
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=isp
E/mm-camera(  358): mct_stream_check_name:mod=isp, name=isp
E/mm-camera(  358): mct_stream_get_module: module: 0xb886ad40
E/mm-camera(  358): q3a_thread_af_stop: start MSG_STOP_THREAD
E/mm-camera(  358): af_thread_handler: af thread returned
E/mm-camera(  358): afd_thread_en_q_msg thread -1196257176 is set to inactive
E/mm-camera(  358): q3a_port_unlink X refcnt 0
E/mm-camera(  358): stats_port_unlink: X
E/mm-camera(  358): stats_port_check_caps_unreserve E
E/mm-camera(  358): stats_port_check_reserved_stream: private->reserved_id=0x20000
E/mm-camera(  358): stats_port_check_caps_unreserve X
E/ShotCommon(  339): parseDebugInfo
E/ShotCommon(  339): no makernote tag in the exif IFD. We don't need to copy debug info.
E/QCameraPostProc(  339): releaseNotifyData: DEBUG : frame, 1072
E/art     (23477): Throwing OutOfMemoryError "Failed to allocate a 2095116 byte allocation with 714389 free bytes and 697KB until OOM"
E/art     (23477): Throwing OutOfMemoryError "Failed to allocate a 2095116 byte allocation with 714389 free bytes and 697KB until OOM"
E/art     (23477): Throwing OutOfMemoryError "Failed to allocate a 1046540 byte allocation with 722165 free bytes and 705KB until OOM"
E/art     (23477): Throwing OutOfMemoryError "Failed to allocate a 1046540 byte allocation with 722165 free bytes and 705KB until OOM"
E/art     (23477): Throwing OutOfMemoryError "Failed to allocate a 819435 byte allocation with 721845 free bytes and 704KB until OOM"
E/art     (23477): Throwing OutOfMemoryError "Failed to allocate a 819435 byte allocation with 721845 free bytes and 704KB until OOM"
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000a
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000012
E/mm-camera(  358): mct_stream_start_link:CAM_STREAM_TYPE_METADATA
E/mm-camera-intf(  339): mm_stream_get_v4l2_fmt: Unknown fmt=78
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000004
E/QCamera2HWI(  339): [BeautyShot_dbg] getBufNumRequired =8
E/QCamera2HWI(  339): [BeautyShot_dbg] getBufNumRequired =8
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=800000a
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000012
E/mm-camera(  358): mct_stream_start_link: PREVIEW
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=sensor
E/mm-camera(  358): mct_stream_get_module: module: 0xb88451a0
E/mm-camera(  358): mct_stream_start_link: sensor=0xb88426c8
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=iface
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=iface
E/mm-camera(  358): mct_stream_get_module: module: 0xb88682f8
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=isp
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=isp
E/mm-camera(  358): mct_stream_check_name:mod=isp, name=isp
E/mm-camera(  358): mct_stream_get_module: module: 0xb886ad40
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=stats
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=stats
E/mm-camera(  358): mct_stream_check_name:mod=isp, name=stats
E/mm-camera(  358): mct_stream_check_name:mod=stats, name=stats
E/mm-camera(  358): mct_stream_get_module: module: 0xb886b068
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=pproc
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=pproc
E/mm-camera(  358): mct_stream_check_name:mod=isp, name=pproc
E/mm-camera(  358): mct_stream_check_name:mod=stats, name=pproc
E/mm-camera(  358): mct_stream_check_name:mod=pproc, name=pproc
E/mm-camera(  358): mct_stream_get_module: module: 0xb886dc80
E/mm-camera(  358): mct_stream_check_name:mod=sensor, name=faceproc
E/mm-camera(  358): mct_stream_check_name:mod=iface, name=faceproc
E/mm-camera(  358): mct_stream_check_name:mod=isp, name=faceproc
E/mm-camera(  358): mct_stream_check_name:mod=stats, name=faceproc
E/mm-camera(  358): mct_stream_check_name:mod=pproc, name=faceproc
E/mm-camera(  358): mct_stream_check_name:mod=faceproc, name=faceproc
E/mm-camera(  358): mct_stream_get_module: module: 0xb886de30
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_sink_check_caps_reserve:823] error because caps Type:1 not supported.
E/mm-camera(  358): pproc_port_create_stream_topology:469] feature mask 0x0 0x0
E/mm-camera(  358): cpp_port_check_caps_reserve:77, identity=0x20002
E/mm-camera(  358): cpp_port_check_caps_reserve:143, identity=0x20002, reserved
E/mm-camera(  358): cpp_module_set_output_duplication_flag:613, current stream w=1920, h=1080, st=1920, sc=1080, fmt=1, identity=0x20002
E/mm-camera(  358): cpp_module_set_output_duplication_flag:617, info: no linked stream
E/mm-camera(  358): cpp_module_notify_add_stream:1295, info: success, identity=0x20002
E/mm-camera(  358): cpp_port_check_caps_reserve:77, identity=0x20002
E/mm-camera(  358): cpp_port_check_caps_reserve:143, identity=0x20002, reserved
E/mm-camera(  358): module_faceproc_client_create:1503] Face proc feature mask 2a 0
E/mm-camera(  358): afd_port_check_caps_reserve: X
E/mm-camera(  358): q3a_port_event: Stream type change event received!
E/mm-camera(  358): mct_pipeline_send_ctrl_events: Send Set Parm events
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000004
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=4
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=4
E/mm-camera(  358): mct_pipeline_send_ctrl_events: Send Set Parm events
E/mm-camera-sensor(  358): module_sensor_event_control_get_parm:3895 [FW_DBG] CAM_INTF_PARM_FW_CL_NUMBER
E/mm-camera-sensor(  358): eeprom_process:1459 eeprom_process:1459: event: 79 e_ctrl->fd: 31
E/mm-camera-sensor(  358): eeprom_process:1544 [FW_DBG] EEPROM_GET_FW_CL_NUMBER
E/mm-camera-sensor(  358): eeprom_get_cl_number:718 [FW_DBG] load from PHONE => cl_number : PCL CALU13QLIA00SM CRC3FF
E/mm-camera-intf(  339): mm_stream_request_buf: buf_num = 21, stream type = 7
E/mm-camera-intf(  339): mm_stream_streamon: E, my_handle = 0xc0b00, fd = 73, state = 6
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000008
E/mm-camera(  358): mct_pipeline_process_set: stream_type = 7
E/QCameraHWI_Mem(  339): DBG_PATCH:setWindowInfo mWindow=0xb86e7ef8
E/mm-camera-intf(  339): mm_stream_request_buf: buf_num = 8, stream type = 1
E/mm-camera-intf(  339): mm_stream_streamon: E, my_handle = 0xc0c01, fd = 76, state = 6
E/mm-camera(  358): server_process_hal_event:__DBG__ E event id=3
E/mm-camera(  358): server_process_hal_event:__DBG__ X sucess event id=3
E/mm-camera(  358): mct_pipeline_process_set:command=8000008
E/mm-camera(  358): mct_pipeline_process_set: stream_type = 1
E/mm-camera-sensor(  358): port_sensor_handle_stream_on:467 H/W revision = 2(2), Criterion ver = 0
E/mm-camera-sensor(  358): module_sensor_stream_on:2096 ide 20002 SENSOR_START_STREAM
E/mm-camera-sensor(  358): module_sensor_is_ready_for_stream_on:1306 s_bundle->stream_on_count 0
E/mm-camera-sensor(  358): module_sensor_is_ready_for_stream_on:1307 is_bundle_started 0
E/mm-camera-sensor(  358): modules_sensor_set_new_resolution:315 SENSOR_SET_RESOLUTION 1920*1080 mask 2
E/mm-camera-sensor(  358): sensor_set_resolution:2465 width 1920, height 1080
E/mm-camera-sensor(  358): sensor_set_resolution:2467 stream mask 2 hfr mode 0 fps 120.550003
E/mm-camera-sensor(  358): sensor_pick_resolution:2000 requested aspect ratio 177
E/mm-camera-sensor(  358): sensor_pick_resolution:2269 sup_asp_ratio =  133
E/mm-camera-sensor(  358): sensor_pick_resolution:2269 sup_asp_ratio =  133
E/mm-camera-sensor(  358): sensor_pick_resolution:2269 sup_asp_ratio =  177
E/mm-camera-sensor(  358): sensor_set_resolution:2568 set_fps=120.550003 > max_fps=30.120001, capping to max
E/mm-camera-sensor(  358): sensor_set_resolution:2580 
E/mm-camera-sensor(  358): sensor_set_resolution:2583 current_fps_div 1024
E/mm-camera-sensor(  358): sensor_set_resolution:2602 Sensor name : s5k3l2xx
E/mm-camera-sensor(  358): sensor_get_resolution_info:3093 skip 0 frames
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): sensor_get_resolution_info:3185 full 4128 3096 out 4128 2322 offset 0 388 scale 1
E/mm-camera-sensor(  358): eeprom_process:1459 eeprom_process:1459: event: 70 e_ctrl->fd: 31
E/mm-camera-sensor(  358): eeprom_process:1495 e_ctrl->dimension width= 4144, height = 2332
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_process:1459 eeprom_process:1459: event: 71 e_ctrl->fd: 31
E/mm-camera-sensor(  358): eeprom_process:1500 e_ctrl->rolloff_size full width= 4128, height = 3096
E/mm-camera-sensor(  358): 
E/mm-camera(  358): receive MCT_EVENT_MODULE_SET_STREAM_CONFIG
E/mm-camera(  358): ispif_util_dump_sensor_cfg: sensor dim: width = 4144, heght = 2332, fmt = 29, is_bayer = 1
E/mm-camera(  358): ispif_util_dump_sensor_cfg: camif_crop: first_pix = 8, last_pix = 4135, first_line = 4, last_line = 2325, max_fps = 30
E/mm-camera(  358): ispif_sink_port_config <-----
E/mm-camera(  358): reserve_camif_resource: is_ispif = 1, sess_idx = 0, fps = 30, num_isps = 1 op clk: 329600000
E/mm-camera(  358): isp_sink_port_stream_config: E, session_id = 2, stream_id = 2, stream_type = 1
E/mm-camera(  358): isp_sink_port_stream_config: session_id = 2, stream_id = 2, is_split = 0
E/mm-camera(  358): isp_sink_port_stream_config: old vfe_id_mask = 0x1, new vfe_id_mask = 0x1
E/mm-camera(  358): TsAf_set_parameters: ###### wrapper_in: initial #1 ######
E/mm-camera(  358): after port_ispif_forward_event_to_peer
E/mm-camera(  358): TsAf_configure_af_stats: wrapper_in: offset_h:v[236:236] w:h[3654:1848] num_h:v[18:14] fvmin_r:gr:gb:b[80:80:80:80]
E/mm-camera-sensor(  358): chromatix name libchromatix_s5k3l2xx_preview.so
E/mm-camera-sensor(  358): chromatix_load_library:50 libchromatix_s5k3l2xx_preview.so load from phone
E/mm-camera(  358): TsAf_update_output_data: wrapper_out: output:
E/mm-camera-sensor(  358): [mm]hwinfo_make_chromatix_name:1742 hw info U13QL
E/mm-camera(  358): TsAf_set_parameters: ###### wrapper_out: initial #2 ######
E/mm-camera-sensor(  358): [mm]hwinfo_make_chromatix_name:1753 chromatix name libchromatix_s5k3l2xx_preview.so => libchromatix_s5k3l2xx_preview.so
E/mm-camera-sensor(  358): chromatix_load_library:54 chromatix from phone libchromatix_s5k3l2xx_preview.so
E/mm-camera-sensor(  358): load_chromatix:34 load_chromatix:34- AAA chromatix_s5k3l2xx_preview
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): load_chromatix:48 load_chromatix:48-chromatix_s5k3l2xx_parms header
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): sensor_set_chromatix, chx : 0xb8a022f8, common chx : 0xb8a1cf04
E/mm-camera-sensor(  358): actuator_load_lib:371 name=ak7345, mode=camera
E/mm-camera-sensor(  358): eeprom_process:1459 eeprom_process:1459: event: 72 e_ctrl->fd: 31
E/mm-camera-sensor(  358): eeprom_process:1513 e_ctrl->eeprom_lib.func_tbl =0xb6738004
E/mm-camera-sensor(  358): eeprom_process:1514 e_ctrl->eeprom_params.is_supported =0x3FF
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1034 e_ctrl->eeprom_data.afc.infinity_pos1 = 0
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1035 e_ctrl->eeprom_data.afc.infinity_pos2 = 131
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1036 e_ctrl->eeprom_data.afc.macro_pos1 = 0
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1037 e_ctrl->eeprom_data.afc.macro_pos2 = 309
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1038 e_ctrl->eeprom_data.afc.panfocus_pos = 131
E/mm-camera-sensor(  358): m24128sv1_format_afdata:1039 e_ctrl->eeprom_data.afc.pid_coeff = 255
E/mm-camera-sensor(  358): eeprom_do_calibration:436 eeprom_do_calibration: Enter
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_do_calibration:438 eeprom_do_calibration: e_items->is_wbc = 1, e_items->is_lsc = 1
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_whitebalance_calibration:242 eeprom_whitebalance_calibration: min_gain: 0.998291
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_whitebalance_calibration:248 eeprom_whitebalance_calibration: gb_gain: 0.998291, gr_gain: 1.000000
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_whitebalance_calibration:250 eeprom_whitebalance_calibration: [Caldata]gr: 0.505849, gb: 0.585079
E/mm-camera-sensor(  358): 
E/mm-camera-sensor(  358): eeprom_do_calibration:457 Exit
E/mm-camera-sensor(  358): module_sensor_stream_on:2696 reload_bin : 0, RELOAD_PROPERTY_VALUE=3757
E/mm-camera(  358): [cgAF] ---------------------------------------------------------------------
E/mm-camera(  358): [cgAF] AF Version : 0x9009
E/mm-camera(  358): [cgAF] AF Cal: PAN: 0x83, MAC: 0x135, OFFSET: 0, PHASE-HEAD: 0x0(0)
E/mm-camera(  358): [cgAF] Check OCR mode : Enabled(0), Dir(0)
E/mm-camera(  358): [cgAF] AF Mode: 0x3 PREVIEW CAF
E/mm-camera(  358): [cgAF] Sensor image size ( 4128 2322 )
E/mm-camera(  358): [cgAF] lens position (100)
E/mm-camera(  358): TsAf_configure_af_stats: wrapper_in: offset_h:v[237:237] w:h[3654:1848] num_h:v[18:14] fvmin_r:gr:gb:b[80:80:80:80]
E/mm-camera(  358): TsAf_update_output_data: wrapper_out: output:
E/mm-camera(  358): [cgAF] AF status: 0x1 AFM_CAF_RESTARTCHK
E/mm-camera(  358): cpp_module_handle_chromatix_ptr_event:627 calling cpp_module_util_get_asf_wnr_params for normal
E/mm-camera(  358): [cgAF] ---------------------------------------------------------------------
E/mm-camera(  358): [cgAF] AF Version : 0x9009
E/mm-camera(  358): [cgAF] AF Cal: PAN: 0x83, MAC: 0x135, OFFSET: 0, PHASE-HEAD: 0x0(0)
E/mm-camera(  358): [cgAF] Check OCR mode : Enabled(0), Dir(0)
E/mm-camera(  358): [cgAF] AF Mode: 0x3 PREVIEW CAF
E/mm-camera(  358): [cgAF] Sensor image size ( 4128 2322 )
E/mm-camera(  358): [cgAF] lens position (100)
E/mm-camera(  358): TsAf_configure_af_stats: wrapper_in: offset_h:v[237:237] w:h[3654:1848] num_h:v[18:14] fvmin_r:gr:gb:b[80:80:80:80]
E/mm-camera(  358): TsAf_update_output_data: wrapper_out: output:
E/mm-camera(  358): awb_port_proc_downstream_ctrl: AWB Gains: r_gain: 1.198929 g_gain: 1.000000 b_gain: 1.869278 color_temp: 3845
E/mm-camera-img(  358): faceproc_comp_cfg_debug:237] FaceProc cfg max_face_size 1000
E/mm-camera-img(  358): faceproc_comp_cfg_debug:240] FaceProc cfg max_num_face_to_detect 10
E/mm-camera-img(  358): faceproc_comp_cfg_debug:243] FaceProc cfg min_face_size 90
E/mm-camera-img(  358): faceproc_comp_eng_config:1394] Face proc number of faces set 10 
E/mm-camera(  358): cpp_module_handle_streamon_event:1761, identity=0x20002, stream-on done
E/mm-camera(  358): cpp_hw_params_update_wnr_params:3601 invalid trigger input -0.000000
E/mm-camera(  358): isp_streamon: E, session_id = 2
E/mm-camera(  358): isp_proc_async_command: E ISP_ASYNC_COMMAND_STREAMON = 2
E/mm-camera(  358): isp_proc_streamon: E, session_id = 2, stream_id = 2, stream_type = 1 num_bufs 8
E/mm-camera(  358): isp_hw_proc_set_recording_hint: recording_hint: 0
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): wb_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): mce_set_params: param_id is not supported in this module
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): wb_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): mce_set_params: param_id is not supported in this module
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): wb_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): mce_set_params: param_id is not supported in this module
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): mesh_rolloff_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 9, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 9, is not supported in this module
E/mm-camera(  358): isp_proc_streamon: set_all_saved_params done, session_id = 2
E/mm-camera(  358): module_faceproc_port_event_func:617] MCT_EVENT_MODULE_ISP_OUTPUT_DIM, w = 1920, h = 1080
E/mm-camera(  358): isp_proc_streamon: sending dim downstream done, session_id = 2
E/mm-camera(  358): linearization_set_params: param_id is not supported in this module
E/mm-camera(  358): wb_set_params: param_id is not supported in this module
E/mm-camera(  358): demosaic_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): demux_set_params: param_id 7, is not supported in this module
E/mm-camera(  358): mce_set_params: param_id is not supported in this module
E/mm-camera(  358): isp_pipeline_util_trigger_update: No active streams
E/mm-camera(  358): rs_stats_config: Tao, demosaic_width = 4128, demosaic_height = 2322, max_h_reg_num = 8, calculated_h_reg_num = 4
E/mm-camera(  358): stats_action_buf_config: cfg = 1, stats_mask = 0x798
E/mm-camera(  358): stats_action: stats mask = 0x798
E/mm-camera(  358): isp_axi_util_subscribe_v4l2_event: event_type = 0x8000100, is_subscribe = 1
E/mm-camera(  358): isp_proc_async_command: X ISP_ASYNC_COMMAND_STREAMON = 2
E/mm-camera(  358): isp_proc_async_command: X, session_id = 2, async_cmd_id = 1
E/mm-camera(  358): isp_streamon: X, session_id = 2
E/mm-camera-sensor(  358): sensor_set_aec_init_settings:803 no valid entries in aec_get
E/mm-camera-sensor(  358): sensor_set_exposure:1473 failed: invalid params g 0.000000 lc 0
E/mm-camera(  358): start_sof_check_thread: Starting SOF timeout thread
E/mm-camera-sensor(  358): module_sensor_stream_on:2437 OIS SETTING PREVIEW MODE!!
E/mm-camera-sensor(  358): [E]
E/mm-camera-sensor(  358): [OIS_SET_MODE][data :: 3]
E/mm-camera-sensor(  358): [Enter]
E/mm-camera-sensor(  358): [ois_set_mode][modes :: 3]
E/AndroidRuntime(23477): FATAL EXCEPTION: main
E/AndroidRuntime(23477): Process: com.reactnativeapp, PID: 23477
E/AndroidRuntime(23477): java.lang.NullPointerException: Attempt to get length of null array
E/AndroidRuntime(23477): 	at android.util.Base64.encode(Base64.java:494)
E/AndroidRuntime(23477): 	at android.util.Base64.encodeToString(Base64.java:456)
E/AndroidRuntime(23477): 	at com.lwansbrough.RCTCamera.RCTCameraModule$3.onPictureTaken(RCTCameraModule.java:681)
E/AndroidRuntime(23477): 	at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1165)
E/AndroidRuntime(23477): 	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(23477): 	at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime(23477): 	at android.app.ActivityThread.main(ActivityThread.java:6917)
E/AndroidRuntime(23477): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(23477): 	at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(23477): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
E/AndroidRuntime(23477): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
^C

Duplicate issue #659: Flash causes App to crash on Android 4.4
Created: 2017-04-05T00:44:07Z
Steps to reproduce

Take a picture with flash mode on (using Android 4.4 device)
App will crash

Expected behaviour
Should start flash light and take a picture.
Actual behaviour
App crashes.
Environment

Node.js version: 7.x
React Native version: 0.42
React Native platform + platform version: Android 4.4

react-native-camera
Version: "master"

Closing comment (2017-04-20T11:55:24Z): Is this only happening when using the Flash? The crash happens when the library tries to fix orientation after the image is taken. So related to #590 #638.
If you are using RN < 0.40 you can use react-native-camera@0.4.0 (which doesn't have the rotation fix for front facing camera).