Wednesday, September 8, 2010

[android-developers] Camera Issues on Samsung Galaxy S

Hello!

I'm stuck on this one: On Samsung Galaxy S - Camera preview starts but
call to autofocus or takePicture fails returning 0 in the onError
callback.

Some things I tried (with no luck)
* Not adjusting Camera Parameters - some people reported that this
helped them.
* compiling at different Android levels - up to 2.2

Not sure what else I can really try. My app has been around for a year
and works on all other Android phones I've tested on.


Here's some logcat:
09-07 21:00:36.461: DEBUG/Camera-JNI(11125): dataCallback(16,
0x38d290)
09-07 21:00:36.541: DEBUG/Camera-JNI(11125): release camera
09-07 21:00:36.546: DEBUG/dalvikvm(11125): GC freed 2452 objects /
138792 bytes in 85ms
09-07 21:00:36.656: INFO/dalvikvm-heap(11125): Grow heap (frag case)
to 5.151MB for 460816-byte allocation
09-07 21:00:36.836: DEBUG/dalvikvm(11125): GC freed 535 objects /
28208 bytes in 174ms
09-07 21:00:36.866: INFO/NotificationService(2263): enqueueToast
pkg=....... callback=android.app.ITransientNotification$Stub
$Proxy@47d2a8d0 duration=0
09-07 21:00:36.866: DEBUG/CameraService(2207): getParameters(anti-
shake=0;antibanding=auto;antibanding-values=auto, 50hz, 60hz,
off;beauty-shot=0;blur=0;brightness=4;camera-
id=1;chk_dataline=0;contrast=2;digi-zoom=0;effect=none;effect-
values=none, mono, negative, sepia;flash-mode=off;flash-mode-
values=off;focus-mode=auto;focus-mode-values=auto, infinity,
macro;iso=auto;jpeg-quality=100;jpeg-thumbnail-height=192;jpeg-
thumbnail-quality=100;jpeg-thumbnail-size-values=160x120;jpeg-
thumbnail-width=256;metering=center;picture-format=jpeg;picture-format-
values=jpeg;picture-size=2560x1920;picture-size-
values=2560x1920,2048x1536,1600x1200,640x480,2560x1536,2048x1232,1600x960,800x480;preview-
format=yuv420sp;preview-format-values=yuv420sp;preview-frame-
rate=30;preview-frame-rate-values=15, 30;preview-size=640x480;preview-
size-values=640x480,800x480;rotation=0;saturation=2;scene-
mode=auto;scene-mode-values=auto, portrait, landscape, night, beach,
snow, sunset, fireworks, sports, party,
candlelight;sharpness=2;slow_ae=off;smart-
auto=0;video_recording_gamma=off;vintag
09-07 21:00:36.871: DEBUG/CameraService(2207): setParameters(anti-
shake=0;picture-size-
values=2560x1920,2048x1536,1600x1200,640x480,2560x1536,2048x1232,1600x960,800x480;antibanding=auto;blur=0;digi-
zoom=0;metering=center;sharpness=2;contrast=2;brightness=4;whitebalance=auto;jpeg-
thumbnail-height=192;scene-mode=auto;jpeg-quality=100;preview-format-
values=yuv420sp;rotation=0;jpeg-thumbnail-quality=100;focus-
mode=auto;beauty-shot=0;preview-
format=yuv420sp;vintagemode=off;preview-
size=640x480;iso=auto;slow_ae=off;picture-format-values=jpeg;camera-
id=1;flash-mode-values=off;preview-frame-rate-values=15,
30;chk_dataline=0;preview-frame-rate=15;flash-mode=off;effect-
values=none, mono, negative, sepia;focus-mode-values=auto, infinity,
macro;picture-size=1600x1200;effect=none;saturation=2;jpeg-thumbnail-
width=256;whitebalance-values=auto, incandescent, fluorescent,
daylight, cloudy-daylight;scene-mode-values=auto, portrait, landscape,
night, beach, snow, sunset, fireworks, sports, party,
candlelight;picture-format=jpeg;vtmode=0;jpeg-thumbnail-size-
values=160x120;
09-07 21:00:36.871: DEBUG/CameraHardwareSec(2207): frame rate:15,
mPreviewFrameRateMicrosec:66666
09-07 21:00:36.871: ERROR/SecCamera(2207): SetRotate(angle(0))
09-07 21:00:36.871: ERROR/SecCamera(2207):
setRecordingSize(width(640), height(480))
09-07 21:00:37.741: WARN/PowerManagerService(2263): Timer 0x7->0x3|0x3
09-07 21:00:37.741: INFO/PowerManagerService(2263): ULight 7->3 f0
09-07 21:00:38.046: VERBOSE/SettingsProvider(2263): system <- value=0
name=volume_system
09-07 21:00:38.046: VERBOSE/SettingsProvider(2263): property:
sys.settings_system_version=4176
09-07 21:00:38.081: VERBOSE/SettingsProvider(2263): notifying:
content://settings/system/volume_system
09-07 21:00:38.091: INFO/AudioHardwareALSA(2207): Output standby
called!!. Turn off PCM device.
09-07 21:00:38.126: VERBOSE/SettingsProvider(2263): system <- value=1
name=volume_system_last_audible
09-07 21:00:38.126: VERBOSE/SettingsProvider(2263): property:
sys.settings_system_version=4177
09-07 21:00:38.146: VERBOSE/SettingsProvider(2263): notifying:
content://settings/system/volume_system_last_audible
09-07 21:00:38.411: DEBUG/dalvikvm(2606): GC freed 1972 objects /
62984 bytes in 177ms
09-07 21:00:38.561: DEBUG/dalvikvm(2263): GC freed 13213 objects /
659224 bytes in 174ms
09-07 21:00:47.161: DEBUG/dalvikvm(2440): GC freed 4489 objects /
295576 bytes in 169ms
09-07 21:00:48.021: VERBOSE/InputDevice(2263): ID[0]=0 Dn (0=>1)
09-07 21:00:48.026: VERBOSE/WindowManager(2263): Dsptch 0 x777.0
y140.0 > Window{47eeca40 ..........CaptureActivity paused=false}
09-07 21:00:48.221: VERBOSE/InputDevice(2263): ID[0]=0 Up (1=>0)
09-07 21:00:48.221: INFO/PowerManagerService(2263): ULight 3->7 f0
09-07 21:00:48.246: VERBOSE/WindowManager(2263): Dsptch 1 x777.0
y140.0 > Window{47eeca40 ...........CaptureActivity paused=false}
09-07 21:00:48.261: WARN/System.err(11125): /sdcard/.......
09-07 21:00:48.956: DEBUG/CameraService(2207): autoFocus (pid 11125)
09-07 21:00:48.961: ERROR/CameraHardwareSec(2207): autoFocusThread()
09-07 21:00:51.244: WARN/PowerManagerService(2263): Timer 0x7->0x3|0x3
09-07 21:00:51.244: INFO/PowerManagerService(2263): ULight 7->3 f0
09-07 21:00:52.171: DEBUG/dalvikvm(2340): GC freed 54 objects / 1864
bytes in 179ms
09-07 21:00:52.426: ERROR/CameraHardwareSec(2207):
(autoFocusThread)For loop: af_status = 0x0, count = 325
09-07 21:00:52.431: DEBUG/CameraService(2207): takePicture (pid 11125)
09-07 21:00:52.487: ERROR/SecCamera(2207): stopPreview()
09-07 21:00:52.487: ERROR/SecCamera(2207): fimc_v4l2_streamoff()
09-07 21:00:52.501: DEBUG/SecCamera(2207): passed fmt = 1498831189
found pixel format[3]: YUV 4:2:2 packed, CbYCrY
09-07 21:00:52.506: ERROR/CameraService(2207): width(640),
height(480), format:jpeg
09-07 21:00:53.286: ERROR/SecCamera(2207): fimc_v4l2_streamoff()
09-07 21:00:53.361: DEBUG/Camera-JNI(11125): dataCallback(64,
0x37e6d8)
09-07 21:00:53.416: DEBUG/dalvikvm(11125): GC freed 875 objects /
511352 bytes in 52ms
09-07 21:00:53.416: INFO/dalvikvm-heap(11125): Grow heap (frag case)
to 5.315MB for 614416-byte allocation
09-07 21:00:53.471: DEBUG/Camera-JNI(11125): dataCallback(256,
0x37e6d8)
09-07 21:00:53.471: DEBUG/dalvikvm(11125): GC freed 67 objects / 3072
bytes in 54ms
09-07 21:00:53.476: DEBUG/CameraService(2207): startPreview (pid
11125)
09-07 21:00:53.476: DEBUG/CameraService(2207): startCameraMode(0) (pid
11125)
09-07 21:00:53.476: DEBUG/CameraService(2207): startPreviewMode (pid
11125)
09-07 21:00:53.476: ERROR/SecCamera(2207): stopPreview()
09-07 21:00:53.481: ERROR/SecCamera(2207): stopPreview:
m_flag_camera_start is zero
09-07 21:00:53.481: DEBUG/SecCamera(2207): passed fmt = 825382478
found pixel format[9]: YUV 4:2:0 planar, Y/CrCb
09-07 21:00:53.481: ERROR/SecCamera(2207):
startPreview()m_preview_width: 640 m_preview_height: 480 m_angle: 0
09-07 21:00:53.888: ERROR/SecCamera(2207): startPreview: get the first
frame of the preview
09-07 21:00:53.888: ERROR/CameraHardwareSec(2207): startPreview :
return startPreview 0
09-07 21:00:53.888: DEBUG/CameraHardwareSec(2207):
MemoryHeapBase(fd(37), size(3686464), width(640), height(480))
09-07 21:00:53.888: ERROR/CameraHardwareSec(2207): CameraHardwareSec:
mPostViewWidth = 640 mPostViewHeight = 480 mPostViewSize = 614400
09-07 21:00:53.888: ERROR/CameraHardwareSec(2207): CameraHardwareSec:
mRawHeap : MemoryHeapBase(previewHeapSize(614408))
09-07 21:00:53.896: ERROR/Camera(11125): Error 0
09-07 21:00:53.896: WARN/System.err(11125): ERROR:
CaptureView.onError()
09-07 21:00:53.896: DEBUG/CameraService(2207): cancelAutoFocus (pid
11125)
09-07 21:00:53.936: DEBUG/CameraService(2207): stopPreview (pid 11125)
09-07 21:00:53.971: DEBUG/Camera-JNI(11125): dataCallback(16,
0x37e6d8)
09-07 21:00:53.981: ERROR/SecCamera(2207): stopPreview()

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

1 comment: