[TIMOB-8899] Android: showCamera - does not work on htc sensation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-05-04T08:22:35.000+0000 |
Affected Version/s | Release 1.8.2, Release 2.0.1 |
Fix Version/s | n/a |
Components | Android |
Labels | api |
Reporter | Jon Alter |
Assignee | Ping Wang |
Created | 2012-04-26T14:55:05.000+0000 |
Updated | 2017-03-09T23:26:45.000+0000 |
Description
showCamera does not work on the HTC Sensation with no sd card
Steps to repro:
Step 1: run the code below on an HTC Sensation 2.3.3 with no sd card Step 2: tap the blue window (nothing will happen) Step 3: check logcat Step 4: you will see the error posted below
var win = Ti.UI.createWindow({backgroundColor: 'blue'});
win.open();
win.addEventListener('click', function(){
var params = {
success:function(e){
Ti.API.info('SUCCESS');
},
error:function(e){
Ti.API.info('ERROR '+e);
},
cancel:function(e){
Ti.API.info('CANCEL '+e);
},
allowEditing:true,
mediaTypes:[Ti.Media.MEDIA_TYPE_PHOTO]
};
Ti.Media.showCamera(params);
});
Console
D/CameraService(20431): CameraService::connect E (pid 23291, id 0), max 2
I/CameraService(20431): cameraId:0
I/CameraService(20431): 2D mode only
I/QualcommCameraHardware3D(20431): openCameraHardware: call createInstance cameraId 0
I/QualcommCameraHardware3D(20431): createInstance: E
I/QualcommCameraHardware3D(20431): QualcommCameraHardware constructor E
I/QualcommCameraHardware3D(20431): 2D mode only
I/QualcommCameraHardware3D(20431): QualcommCameraHardware constructor EX
I/QualcommCameraHardware3D(20431): createInstance: created hardware=0xc1290
I/mm-camera(20431): set sensor selection :0
D/mm-camera(20431): mm_camera_init, open FD: 27
D/QualcommCameraHardware3D(20431): startCamera: 2D mode
I/ (20431): [AWB Calibration] from kernel: fuse_id: 0x0, 0x0, 0x1, 0x6c76dc
D/mm-camera(20431): sensor_load_chromatix: Sensor name: s5k3h1gx cnt=7
D/mm-camera(20431): sensor_load_chromatix:1746:chromatix library Name = libchromatix_s5k3h1gx_preview.so
D/mm-camera(20431): sensor_load_chromatix:1771: dlclose(libchromatix_handle) refcount 0
I/mm-camera-s5k3h1gx_u(20431): Inside s5k3h1gx_process_start
I/mm-camera-s5k3h1gx_u(20431): s5k3h1gx_process_start: prev_res=SENSOR_FULL_SIZE
I/mm-camera(20431): [LSC Calibration]Sensor_set_mesh
I/mm-camera(20431): [LSC Calibration] : call awb_get_fuseid
I/mm-camera(20431): Read /data/lsc_cal fail
I/mm-camera(20431): Read from file OK: /data/lsc_cal or /sys/android_camera_awb_cal/awb_cal
I/mm-camera(20431): [LSC Calibration]: lsc_checksum=49913beb, lsc_verify=c1b
I/mm-camera(20431): [LSC Calibration]: fuseid_1=0,fuseid_2=0,fuseid_3=1,fuseid_4=6c76dc, sfuse.fuse_id_word1=0,sfuse.fuse_id_word2=0,sfuse.fuse_id_word3=1,sfuse.fuse_id_word4=6c76dc
I/mm-camera(20431): LSC_Calibration: addr=a77b403c, & addr=a77b403c
I/mm-camera(20431): LSC_Calibration: addr=a77b4e10, & addr=a77b4e10
I/mm-camera(20431): LSC_Calibration: addr=a77b5be4, & addr=a77b5be4
I/mm-camera(20431): LSC_Calibration: addr=a77b69b8, & addr=a77b69b8
I/mm-camera(20431): LSC_Calibration: addr=a77b778c, & addr=a77b778c
I/mm-camera-s5k3h1gx_u(20431): s5k3h1gx_process_start: [LSC Calibration] LSC is valid and set NEW mesh value
I/ (20431): [AWB Calibration] fuse_id : 0x0, 0x0, 0x1, 0x6c76dc
I/ (20431): [AWB Calibration] fail to read /data/awb_cal, try another file
I/ (20431): [AWB Calibration] read from file OK: /sys/android_camera_awb_cal/awb_cal
I/ (20431): [AWB Calibration] nandflash data: 0xc1b, 0x30a, 0x2a3, 0x0, 0x0, 0x1, 0x6c76dc, 0x593227b6
I/ (20431): [AWB Calibration] check sum=593227b6, OK
I/ (20431): [AWB Calibration] valid bit and fuseID pass, use new white points
I/ (20431): [AWB Calibration] use light version: v3
I/mm-camera-s5k3h1gx_u(20431): s5k3h1gx_register: table = 0xa77af7c0
I/mm-camera-s5k3h1gx_u(20431): get snapshot size pointer:0xa772f659
D/mm-camera(20431): af_init_process_exhaustive_search sensor->af_exhaust_downhill_allowance 2, sensor->af_exhaust_fv_drop_allowance 0.750000
I/mm-camera(20431): sctrl:0xa77aeba8
I/mm-camera(20431): sctrl->fn_table:0xa7730231
I/mm-camera(20431): sctrl->fn_table.get_snapshot_sizes:0xa772f659
I/mm-camera-s5k3h1gx_u(20431): get table
I/QualcommCameraHardware3D(20431): initDefaultParameters E
D/mm-camera(20431): dimension.cam_mode = 0
D/mm-camera(20431): config_proc_CAMERA_SET_PARM_DIMENSION:107: chromatixType=0
I/mm-camera(20431): set sensor selection :0
I/mm-camera(20431): set sensor selection :0
E/mm-camera(20431): camera_issue_ctrl_cmd: error (I/O error): type 48, length 364, status 60704, FD: 27 27
E/QualcommCameraHardware3D(20431): Failed to get maximum zoom value...setting max zoom to zero
I/mm-camera(20431): set sensor selection :0
I/mm-camera(20431): set sensor selection :0
D/GPUPostEffect(20431): SIMON: void* mlabs::GPUPostEffect::threadMain() E.
I/GEManager(20431): [GEManager] enter
D/GEManager(20431): [GEManager] m_eglDisplay successfully
D/GEManager(20431): [GEManager] eglInitialize successfully
D/GEManager(20431): [GEManager] eglChooseConfig successfully
E/Adreno200-ES20(20431): rb verson is SBA #24
D/QualcommCameraHardware3D(20431): setFrontCameraMode(), flip-video = -1
I/QualcommCameraHardware3D(20431): requested preview frame rate is 31
D/mm-camera(20431): config_proc_CAMERA_SET_PARM_FPS: 31
D/ (20431): [GECameraParameters::getGPUEffect] enter
D/ (20431): [GECameraParameters::getGPUEffect] leave. no key GPU-effect
D/ (20431): [GECameraParameters::getGPUEffectParam] leave. no key GE-param0
D/ (20431): [GECameraParameters::getGPUEffectParam] leave. no key GE-param1
D/ (20431): [GECameraParameters::getGPUEffectParam] leave. no key GE-param3
D/GEManager(20431): [GEManager] eglCreateContext successfully
D/GEManager(20431): [GEManager] eglCreatePbufferSurface successfully
D/GEManager(20431): [GEManager] eglMakeCurrent successfully
I/GEManager(20431): [GEManager] leave
I/GPUPostEffect(20431): SIMON: int mlabs::GPUPostEffect::setParameters(mlabs::GPUPostEffect::GPUTask*): old effect = 0, new effect = -1.
D/GPUPostEffect(20431): SIMON: setParameters: isGEInit == false: no call to ChooseEffect.
I/QualcommCameraHardware3D(20431): initDefaultParameters X
I/QualcommCameraHardware3D(20431): createInstance: X
D/CameraService(20431): Client::Client E (pid 23291)
I/AudioSystem(20431): getting audio flinger
I/AudioSystem(20431): returning new audio session id
D/AudioFlinger(20431): nextUniqueId, current 179
I/StagefrightPlayer(20431): setDataSource('/system/media/audio/ui/camera_click.ogg')
I/OMXCodec(20431): [Stagefright] use software codec=VorbisDecoder
I/AudioSystem(20431): getting audio flinger
I/AudioSystem(20431): returning new audio session id
D/AudioFlinger(20431): nextUniqueId, current 180
I/StagefrightPlayer(20431): setDataSource('/system/media/audio/ui/VideoRecord.ogg')
I/OMXCodec(20431): [Stagefright] use software codec=VorbisDecoder
D/CameraService(20431): getOrientation: degrees = 0, mirror = 0
D/CameraService(20431): CameraService::loadSound ref=0
I/AudioSystem(20431): getting audio flinger
I/AudioSystem(20431): returning new audio session id
D/AudioFlinger(20431): nextUniqueId, current 181
I/StagefrightPlayer(20431): setDataSource('/system/media/audio/ui/camera_click.ogg')
I/OMXCodec(20431): [Stagefright] use software codec=VorbisDecoder
I/AudioSystem(20431): getting audio flinger
I/AudioSystem(20431): returning new audio session id
D/AudioFlinger(20431): nextUniqueId, current 182
I/StagefrightPlayer(20431): setDataSource('/system/media/audio/ui/VideoRecord.ogg')
I/OMXCodec(20431): [Stagefright] use software codec=VorbisDecoder
D/CameraService(20431): Client::Client X (pid 23291)
D/CameraService(20431): CameraService::connect X
D/Camera-JNI(23291): native_release: context=0x340db8 camera=0xb1f18
D/CameraService(20431): setPreviewCallbackFlag(0) (pid 23291)
D/CameraService(20431): disconnect E (pid 23291)
D/CameraService(20431): hardware teardown
I/QualcommCameraHardware3D(20431): stopPreviewInternal E: 0
D/QualcommCameraHardware3D(20431): mPreviewIsoPollingThread -1
I/QualcommCameraHardware3D(20431): stopPreviewInternal X: 0
I/QualcommCameraHardware3D(20431): release E
D/mm-camera(20431): config_proc_CAMERA_STOP_SNAPSHOT: ctrl->state = 0
D/ (20431): SIMON:GM: mlabs::GPUPostEffect::GPUTask* mlabs::GPUPostEffect::get(): cancel 0 tasks.
I/GEManager(20431): [~GEManager] enter
I/GEManager(20431): [Deinit] enter
I/GEManager(20431): [Deinit] delete m_pCurrShader
I/GEManager(20431): [Deinit] delete m_pShaderBypass
I/GEManager(20431): [Deinit] delete m_pSrcTexture
I/GEManager(20431): [Deinit] delete m_pDstFbo
I/GEManager(20431): [Deinit] leave
I/GEManager(20431): [~GEManager] eglMakeCurrent
I/GEManager(20431): [~GEManager] eglDestroySurface
I/GEManager(20431): [~GEManager] eglDestroyContext
I/GEManager(20431): [~GEManager] eglTerminate
I/GEManager(20431): [~GEManager] leave
D/GPUPostEffect(20431): SIMON: void* mlabs::GPUPostEffect::threadMain() X.
I/QualcommCameraHardware3D(20431): release: mCameraRunning = 0
I/QualcommCameraHardware3D(20431): release: clearing resources done.
D/mm-camera(20431): cam_conf: CAMERA_EXIT
I/QualcommCameraHardware3D(20431): release:deinit camera done.
D/mm-camera(20431): mm_camera_destroy ++
D/mm-camera(20431): mm_camera_destroy FD: 27
D/mm-camera(20431): mm_camera_destroy --
I/QualcommCameraHardware3D(20431): release X: mCameraRunning = 0, mFrameThreadRunning = 0
I/QualcommCameraHardware3D(20431): mVideoThreadRunning = 0, mSnapshotThreadRunning = 0, mJpegThreadRunning = 0
I/QualcommCameraHardware3D(20431): camframe_timeout_flag = 0, mAutoFocusThreadRunning = 0
I/QualcommCameraHardware3D(20431): ~QualcommCameraHardware E tid 20431
I/QualcommCameraHardware3D(20431): ~QualcommCameraHardware X
D/CameraService(20431): CameraService::removeClient E (pid 23291)
D/CameraService(20431): removeClient: clear camera 0
D/CameraService(20431): CameraService::removeClient X (pid 23291)
D/CameraService(20431): disconnect X (pid 23291)
W/TiMedia (23291): (KrollRuntimeThread) [22031,52433] Attempt to create '/sdcard/dcim/Camera/Test7' failed silently.
W/TiFileHlpr(23291): (KrollRuntimeThread) [0,52433] getTempFile: Directory '/sdcard/dcim/Camera/Test7' does not exist. Call to File.createTempFile() will fail.
E/TiMedia (23291): (KrollRuntimeThread) [0,52433] Unable to create temp file
E/TiMedia (23291): java.io.IOException: Permission denied
E/TiMedia (23291): at java.io.File.createNewFileImpl(Native Method)
E/TiMedia (23291): at java.io.File.createNewFile(File.java:1257)
E/TiMedia (23291): at java.io.File.createTempFile(File.java:1322)
E/TiMedia (23291): at org.appcelerator.titanium.util.TiFileHelper.getTempFile(TiFileHelper.java:568)
E/TiMedia (23291): at ti.modules.titanium.media.MediaModule.showCamera(MediaModule.java:204)
E/TiMedia (23291): at ti.modules.titanium.media.MediaModulePrototype.showCamera(MediaModulePrototype.java:337)
E/TiMedia (23291): at ti.modules.titanium.media.MediaModulePrototype.execIdCall(MediaModulePrototype.java:522)
E/TiMedia (23291): at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
E/TiMedia (23291): at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1701)
E/TiMedia (23291): at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
E/TiMedia (23291): at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
E/TiMedia (23291): at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2520)
E/TiMedia (23291): at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:300)
E/TiMedia (23291): at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:129)
E/TiMedia (23291): at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
E/TiMedia (23291): at org.appcelerator.kroll.runtime.rhino.js.events._c_anonymous_2(/tmp/events.js:51)
E/TiMedia (23291): at org.appcelerator.kroll.runtime.rhino.js.events.call(/tmp/events.js)
E/TiMedia (23291): at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
E/TiMedia (23291): at org.appcelerator.kroll.runtime.rhino.js.events._c_anonymous_3(/tmp/events.js:101)
E/TiMedia (23291): at org.appcelerator.kroll.runtime.rhino.js.events.call(/tmp/events.js)
E/TiMedia (23291): at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
E/TiMedia (23291): at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3177)
E/TiMedia (23291): at org.appcelerator.kroll.runtime.rhino.js.events.call(/tmp/events.js)
E/TiMedia (23291): at org.appcelerator.kroll.runtime.rhino.RhinoObject.fireEvent(RhinoObject.java:73)
E/TiMedia (23291): at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:441)
E/TiMedia (23291): at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:602)
E/TiMedia (23291): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347)
E/TiMedia (23291): at android.os.Handler.dispatchMessage(Handler.java:95)
E/TiMedia (23291): at android.os.Looper.loop(Looper.java:143)
E/TiMedia (23291): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:102)
I/TiAPI (23291): ERROR [object Object]
D/CameraService(20431): Client::~Client E (pid 20431, this 0x79378)
D/CameraService(20431): disconnect E (pid 20431)
D/CameraService(20431): CameraService::releaseSound ref=1
D/CameraService(20431): Client::~Client X (pid 20431, this 0x79378)
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
I/Kineto::main(20003): WCMGetLinkMetricsCbk iRSSI:-74
E/KINETO (20003): KLOG004- IPA_LinkMetric: -74 -74 0 18 0 0x00
E/KINETO (20003): KLOG0B4- IPA_ZoneMetric: 8 8 -74 -75 -85 1 0x001 0 0
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
I/Kineto::main(20003): WCMGetLinkMetricsCbk iRSSI:-74
E/KINETO (20003): KLOG004- IPA_LinkMetric: -74 -74 0 18 0 0x00
E/KINETO (20003): KLOG0B4- IPA_ZoneMetric: 8 8 -74 -75 -85 1 0x001 0 0
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
E/KINETO (20003): KLOG082- select returned. retVal = 0
E/KINETO (20003):
E/KINETO (20003): KLOG082- send INFORMATIONAL exchange
E/KINETO (20003):
E/KINETO (20003): KLOG084-
E/KINETO (20003):
E/KINETO (20003): KLOG084- 04-26-2012 14:53:02.365 IKE 28 bytes 0.0.0.0 --> 208.54.5.1
E/KINETO (20003): KLOG084- IKEv2 INFO IQ 49 HDR [DPD]
E/KINETO (20003): KLOG082- Send from 0.0.0.0[4500] to 208.54.5.1[4500] using socket 30
E/KINETO (20003):
E/KINETO (20003): KLOG084-
E/KINETO (20003):
E/KINETO (20003): KLOG084- 04-26-2012 14:53:02.365 IKE 80 bytes 0.0.0.0 --> 208.54.5.1
E/KINETO (20003): KLOG084- IKEv2 INFO IQ 49 HDR ENCR
E/KINETO (20003): KLOG082- send len 80 persend 1
E/KINETO (20003):
E/KINETO (20003): KLOG082- select returned. retVal = 1
E/KINETO (20003):
E/KINETO (20003): KLOG084-
E/KINETO (20003):
E/KINETO (20003): KLOG084- 04-26-2012 14:53:02.389 IKE 80 bytes 0.0.0.0 <-- 208.54.5.1
E/KINETO (20003): KLOG084- IKEv2 INFO RR 49 HDR ENCR
E/KINETO (20003): KLOG084-
E/KINETO (20003):
E/KINETO (20003): KLOG084- 04-26-2012 14:53:02.390 IKE 28 bytes 0.0.0.0 <-- 208.54.5.1
E/KINETO (20003): KLOG084- IKEv2 INFO RR 49 HDR [DPD]
E/KINETO (20003): KLOG082- Processing incoming packet type 37
E/KINETO (20003): KLOG082- Delete ph2 spid 0 for ->
E/KINETO (20003):
E/KINETO (20003): KLOG082- After Calling ikev2_main
E/KINETO (20003):
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
I/Kineto::main(20003): WCMGetLinkMetricsCbk iRSSI:-73
E/KINETO (20003): KLOG004- IPA_LinkMetric: -73 -73 0 18 0 0x00
E/KINETO (20003): KLOG0B4- IPA_ZoneMetric: 8 8 -73 -75 -85 1 0x001 0 0
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
D/dalvikvm( 434): GC_EXPLICIT freed 2K, 50% free 4442K/8839K, external 6892K/8606K, paused 86ms
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
I/wpa_supplicant(20467): Reset vh_switch_to_mobile_counter due to receive LINKSPEED cmd
I/Kineto::main(20003): WCMGetLinkMetricsCbk iRSSI:-72
PR https://github.com/appcelerator/titanium_mobile/pull/2102
Closing ticket as invalid.