Hmm, that's strange ... I hope it's not a problem on all 2.1
devices :)

It does work in the emulator (SDK 2.1) though.

-- Jo

On 21 apr, 22:32, Bob Kerns <r...@acm.org> wrote:
> The camera preview API demo crashes on my N1 (2.1-Update 1) as well.
> I've been meaning to investigate (debugger, bugs database) but haven't
> gotten around to it yet.
>
> On Apr 21, 2:18 am, Jo Vermeulen <jo.vermeu...@gmail.com> wrote:
>
> > Yeah, I also noticed that. No idea what the lines about a 'camera
> > switch' are about ...
>
> > I also tried the API demos (one of the samples that came with the
> > Android SDK), and found to my surprise that Google's own camera
> > preview example also crashed on the HTC Desire. Hope it's not a bug in
> > the Desire's firmware ... The camera and camcorder apps that came with
> > the device work perfectly though.
>
> > It would be great if other people with a HTC Desire could try the
> > Camera Preview API demo to verify that they experience the same
> > problem.
>
> > Cheers,
>
> > -- Jo
>
> > On 20 apr, 23:45, Streets Of Boston <flyingdutc...@gmail.com> wrote:
>
> > > mmmmmm that looks strange.
>
> > > From the stack-trace it (almost) looks like you're trying to access a
> > > 2ndcameraon the device. I have no idea of how that could happen or
> > > why it would even try to do so.
> > > But, then again, i could be completely wrong and of no help to you at
> > > all.. :)
>
> > > ============
> > > W/CameraSwitch( 3801): open maincamera
> > > W/CameraSwitch( 3801): no file - can't switchcamera
> > > E/CameraSwitch( 3801): setSwitchFile failed: /sys/android_camera2/
> > > htcwc
> > > E/CameraSwitch( 3801): java.io.FileNotFoundException: /sys/
> > > android_camera2/htcwc
> > > ============
>
> > > On Apr 20, 10:32 am, Jo Vermeulen <jo.vermeu...@gmail.com> wrote:
>
> > > > Hi,
>
> > > > I have a problem with a simple application that captures images from
> > > > thecamera. It works on the emulator, but throws an exception when I
> > > > run it on the HTC Desire.
>
> > > > Here are the relevant log messages:
>
> > > > W/CameraSwitch( 3801): open maincamera
> > > > W/CameraSwitch( 3801): no file - can't switchcamera
> > > > E/CameraSwitch( 3801): setSwitchFile failed: /sys/android_camera2/
> > > > htcwc
> > > > E/CameraSwitch( 3801): java.io.FileNotFoundException: /sys/
> > > > android_camera2/htcwc
>
> > > > E/CameraSwitch( 3801):  at
> > > > org.apache.harmony.luni.platform.OSFileSystem.open(OS
> > > > FileSystem.java:244)
> > > > E/CameraSwitch( 3801):  at
> > > > java.io.FileOutputStream.<init>(FileOutputStream.java
> > > > :97)
> > > > E/CameraSwitch( 3801):  at java.io.FileWriter.<init>(FileWriter.java:
> > > > 58)
> > > > E/CameraSwitch( 3801):  at
> > > > android.hardware.CameraSwitch.setSwitchFile(CameraSwi
> > > > tch.java:44)
> > > > E/CameraSwitch( 3801):  at
> > > > android.hardware.CameraSwitch.openMainCamera(CameraSw
> > > > itch.java:22)
> > > > E/CameraSwitch( 3801):  at android.hardware.Camera.open(Camera.java:
> > > > 90)
> > > > E/CameraSwitch( 3801):  at
> > > > be.uhasselt.edm.research.sherlock.CameraPreview.surfa
> > > > ceCreated(SherlockActivity.java:51)
> > > > E/CameraSwitch( 3801):  at
> > > > android.view.SurfaceView.updateWindow(SurfaceView.jav
> > > > a:454)
> > > > E/CameraSwitch( 3801):  at
> > > > android.view.SurfaceView.dispatchDraw(SurfaceView.jav
> > > > a:287)
> > > > E/CameraSwitch( 3801):  at
> > > > android.view.ViewGroup.drawChild(ViewGroup.java:1583)
>
> > > > E/CameraSwitch( 3801):  at
> > > > android.view.ViewGroup.dispatchDraw(ViewGroup.java:13
> > > > 12)
> > > > E/CameraSwitch( 3801):  at android.view.View.draw(View.java:6538)
> > > > E/CameraSwitch( 3801):  at
> > > > android.widget.FrameLayout.draw(FrameLayout.java:352)
>
> > > > E/CameraSwitch( 3801):  at
> > > > android.view.ViewGroup.drawChild(ViewGroup.java:1585)
>
> > > > E/CameraSwitch( 3801):  at
> > > > android.view.ViewGroup.dispatchDraw(ViewGroup.java:13
> > > > 12)
> > > > E/CameraSwitch( 3801):  at android.view.View.draw(View.java:6538)
> > > > E/CameraSwitch( 3801):  at
> > > > android.widget.FrameLayout.draw(FrameLayout.java:352)
>
> > > > E/CameraSwitch( 3801):  at com.android.internal.policy.impl.PhoneWindow
> > > > $DecorVie
> > > > w.draw(PhoneWindow.java:1866)
> > > > E/CameraSwitch( 3801):  at android.view.ViewRoot.draw(ViewRoot.java:
> > > > 1364)
> > > > E/CameraSwitch( 3801):  at
> > > > android.view.ViewRoot.performTraversals(ViewRoot.java
> > > > :1118)
> > > > E/CameraSwitch( 3801):  at
> > > > android.view.ViewRoot.handleMessage(ViewRoot.java:165
> > > > 0)
> > > > E/CameraSwitch( 3801):  at
> > > > android.os.Handler.dispatchMessage(Handler.java:99)
> > > > E/CameraSwitch( 3801):  at android.os.Looper.loop(Looper.java:123)
> > > > E/CameraSwitch( 3801):  at
> > > > android.app.ActivityThread.main(ActivityThread.java:4
> > > > 595)
> > > > E/CameraSwitch( 3801):  at
> > > > java.lang.reflect.Method.invokeNative(Native Method)
> > > > E/CameraSwitch( 3801):  at java.lang.reflect.Method.invoke(Method.java:
> > > > 521)
> > > > E/CameraSwitch( 3801):  at com.android.internal.os.ZygoteInit
> > > > $MethodAndArgsCalle
> > > > r.run(ZygoteInit.java:860)
> > > > E/CameraSwitch( 3801):  at
> > > > com.android.internal.os.ZygoteInit.main(ZygoteInit.ja
> > > > va:618)
> > > > E/CameraSwitch( 3801):  at dalvik.system.NativeStart.main(Native
> > > > Method)
> > > > D/CameraService(   57): CameraService::connect E (pid 3801, client
> > > > 0x267f0)
> > > > D/CameraService(   57): Client::Client E (pid 3801)
> > > > V/QualcommCameraHardware(   57): openCameraHardware: call
> > > > createInstance
> > > > D/QualcommCameraHardware(   57): createInstance: E
> > > > V/QualcommCameraHardware(   57): constructor EX
> > > > V/QualcommCameraHardware(   57): startCamera E
> > > > V/QualcommCameraHardware(   57): loading liboemcamera at 0xb00140d0
> > > > I/QualcommCameraHardware(   57): Set main cam and main cam only
> > > > I/mm-camera-mmap(   57): set sensor selection :0
> > > > I/QualcommCameraHardware(   57): Open Device node : /dev/msm_camera/
> > > > control0
> > > > I/mm-camera-config(   57): cam_conf fd cfgctrl.camfd:0
> > > > I/mm-camera-config(   57): Open config device node : /dev/msm_camera/
> > > > config0
> > > > I/        (   57): [AWB Calibration]:ctrlfd:26
> > > > I/        (   57): [AWB Calibration] cfg.fuse_id_word1:0x0
> > > > I/        (   57): [AWB Calibration] cfg.fuse_id_word2:0x0
> > > > I/        (   57): [AWB Calibration] cfg.fuse_id_word3:0x45002
> > > > I/        (   57): [AWB Calibration] cfg.fuse_id_word4:0x22e645
> > > > I/        (   57): [AWB Calibration] rg_ratio_GS_table[0]:0.733340
> > > > I/        (   57): [AWB Calibration] rg_ratio_GS_table[1]:0.733340
> > > > I/        (   57): [AWB Calibration] rg_ratio_GS_table[2]:0.754883
> > > > I/        (   57): [AWB Calibration] bg_ratio_GS_table[0]:0.601600
> > > > I/        (   57): [AWB Calibration] bg_ratio_GS_table[1]:0.601600
> > > > I/        (   57): [AWB Calibration] bg_ratio_GS_table[2]:0.598633
> > > > I/        (   57): [AWB Calibration] sfuse.fuse_id_word1:0x0
> > > > I/        (   57): [AWB Calibration] sfuse.fuse_id_word2:0x0
> > > > I/        (   57): [AWB Calibration] sfuse.fuse_id_word3:0x45002
> > > > I/        (   57): [AWB Calibration] sfuse.fuse_id_word4:0x22e645
> > > > I/        (   57): [AWB Calibration] fuse_id : 0x0, 0x0, 0x45002,
> > > > 0x22e645
> > > > I/        (   57): [AWB Calibration] fail to read /data/awb_cal
> > > > I/        (   57): [AWB Calibration] read from file OK: /sys/
> > > > android_camera_awb_
> > > > cal/awb_ca
> > > > I/        (   57): [AWB Calibration] read all c1b ,ok=1
> > > > I/        (   57): [AWB Calibration] read all 323 ,ok=1
> > > > I/        (   57): [AWB Calibration] read all 230 ,ok=1
> > > > I/        (   57): [AWB Calibration] read all 0 ,ok=1
> > > > I/        (   57): [AWB Calibration] read all 0 ,ok=1
> > > > I/        (   57): [AWB Calibration] read all 45002 ,ok=1
> > > > I/        (   57): [AWB Calibration] read all 22e645 ,ok=1
> > > > I/        (   57): [AWB Calibration] read all b538fe81 ,ok=1
> > > > I/        (   57): [AWB Calibration] check sum=b538fe81, OK
> > > > I/        (   57): [AWB Calibration] caBuff[0]:0x00000c1b
> > > > I/        (   57): [AWB Calibration] caBuff[1]:0x00000323
> > > > I/        (   57): [AWB Calibration] caBuff[2]:0x00000230
> > > > I/        (   57): [AWB Calibration] caBuff[3]:0x00000000
> > > > I/        (   57): [AWB Calibration] caBuff[4]:0x00000000
> > > > I/        (   57): [AWB Calibration] caBuff[5]:0x00045002
> > > > I/        (   57): [AWB Calibration] caBuff[6]:0x0022e645
> > > > I/        (   57): [AWB Calibration] caBuff[7]:0xb538fe81
> > > > I/        (   57): [AWB Calibration] fuse_id_word1:0x00000000
> > > > I/        (   57): [AWB Calibration] fuse_id_word2:0x00000000
> > > > I/        (   57): [AWB Calibration] fuse_id_word3:0x00045002
> > > > I/        (   57): [AWB Calibration] fuse_id_word4:0x0022e645
> > > > I/        (   57): [AWB Calibration] caBuff[0]:3099
> > > > I/        (   57): [AWB Calibration] valid bit and fuseID pass, use
> > > > new white po
> > > > ints
> > > > I/        (   57): [AWB Calibration] use light version: v3
> > > > I/mm-camera-aec(   57): Touch AEC  == numRegions:256
> > > > I/mm-camera-aec(   57): Touch AEC aecCtrl->aec_state.aec_algo:1
> > > > I/QualcommCameraHardware(   57): startCamera: camsensor name s5k3e2fx,
> > > > flash 1
> > > > V/QualcommCameraHardware(   57): startCamera X
> > > > V/QualcommCameraHardware(   57): initDefaultParameters E
> > > > V/QualcommCameraHardware(   57): setParameters: E params = 0x4af24
> > > > V/QualcommCameraHardware(   57): requested preview size 720 x 480
> > > > V/QualcommCameraHardware(   57): requested picture size 1024 x 768
> > > > V/QualcommCameraHardware(   57): native_set_parm: fd 12, type 21,
> > > > length 4
> > > > V/QualcommCameraHardware(   57): native_set_parm: fd 12, type 15,
> > > > length 4
> > > > V/QualcommCameraHardware(   57): native_set_parm: fd 12, type 14,
> > > > length 4
> > > > V/QualcommCameraHardware(   57): native_set_parm: fd 12, type 49,
> > > > length 4
> > > > I/QualcommCameraHardware(   57): Setting Zoom is 0
> > > > V/QualcommCameraHardware(   57): native_set_parm: fd 12, type 2,
> > > > length 4
> > > > I/QualcommCameraHardware(   57): Setting Contrast is 5
> > > > V/QualcommCameraHardware(   57): native_set_parm: fd 12, type 6,
> > > > length 4
> > > > I/QualcommCameraHardware(   57): Setting Brightness is 3
> > > > V/QualcommCameraHardware(   57): native_set_parm: fd 12, type 7,
> > > > length 4
> > > > I/QualcommCameraHardware(   57): Setting Saturation is 5
> > > > V/QualcommCameraHardware(   57):
>
> > ...
>
> > read more »
>
> --
> 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+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to