开发者

Android Taking picture crashes on HTC Desire

开发者 https://www.devze.com 2023-01-18 17:21 出处:网络
I have done a small camera app with autofocus in Android. On my nexus one everything works fine but on the htc desire it crashes when i call takePicture() from a Camera object. Here is the stacktrace:

I have done a small camera app with autofocus in Android. On my nexus one everything works fine but on the htc desire it crashes when i call takePicture() from a Camera object. Here is the stacktrace:

10-02 11:53:58.476: DEBUG/QualcommCameraHardware(19448): takePicture(479)
10-02 11:53:58.476: DEBUG/QualcommCameraHardware(19448): val_ril_status = 0,val_wimax_status = 0,val_hotspot_status = 0,val_low_temp_limit = 5.000000,val_batt_temp = 34.000000,val_low_temp_limit = 15,val_batt_cap  = 63
10-02 11:53:58.476: DEBUG/QualcommCameraHardware(19448): FLASHLIGHT is ENABLED
10-02 11:53:58.476: ERROR/mm-camera-config-proc(19448): liboemcamera: config_proc_ctrl_command: SEVERE ERROR: attempt to override pending command 13
10-02 11:53:58.586: INFO/DEBUG(19299): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-02 11:53:58.586: INFO/DEBUG(19299): Build fingerprint: 'htc_wwe/htc_bravo/bravo/bravo:2.2/FRF91/226611:user/release-keys'
10-02 11:53:58.586: INFO/DEBUG(19299): pid: 19448, tid: 19628 >>> /system/bin/mediaserver <<<
10-02 11:53:58.586: INFO/DEBUG(19299): signal 11 (SIGSEGV), fault addr c0debadd
10-02 11:53:58.586: INFO/DEBUG(19299):  r0 c0debadd  r1 deadbeef  r2 17a3a85e  r3 17a3a85e
... and so on, and so on....

i have continous autofocus, but i call takePicture() in the callback function of autofocus, so autofocus should be finished when i am calling takePicture() after this error the following happens:

10-02 11:53:58.916: WARN/Camera(19604): Camera server died!
10-02 11:53:58.916: WARN/Camera(1960开发者_StackOverflow中文版4): ICamera died
10-02 11:53:58.916: WARN/AudioSystem(92): AudioFlinger server died!
10-02 11:53:58.916: WARN/AudioSystem(92): AudioPolicyService server died!
10-02 11:53:58.916: ERROR/Camera(19604): Error 100 

and then i get really a lot of MPlayer errors.

So i am guessing, that there is some kind of race condition or something. Can someone explain what the pending command 13 is the error message is talking about?

there is another stackoverflow question about this: https://stackoverflow.com/questions/2277149/nexus-1-taking-photo-severe-error-in-config-proc-ctrl-command-liboemcamera but there is no answer over there.

can someone help me?

much obliged, Anton


I'm not positive, but I believe command 13 is take a picture, and 54 is something like "focus".

I was able to solve my problem by calling camera.cancelAutoFocus();

immediately before

camera.takePicture();

0

精彩评论

暂无评论...
验证码 换一张
取 消