[android-developers] Re: Android camera problem on HTC Desire

2010-05-03 Thread Sebastian Weier
I have the same problem with my HTC Desire. Even the code-sample of
google (Camera
Preview) does cause an error.
Next week i'm going to test it on Xperia X10.

By the way: the App ZXing works fine. But i don't know, where the
difference
is...Anyone have an idea?


On 22 Apr., 19:26, Streets Of Boston flyingdutc...@gmail.com wrote:
 Ah good, i'm not the only one that sees these occasional crashes in
 their customers' crash logs :)

 On Apr 22, 5:28 am, blindfold seeingwithso...@gmail.com wrote:

  Interesting. I checked my user crash logs, and I find occasional
  startPreview related crashes with Android 1.6, 2.0 and 2.01, and four
  for 2.1-update1, but not a single one for 2.1, making me wonder if the
  update1 for 2.1 introduces a new problem.

  Regards

  The vOICe for Androidhttp://www.seeingwithsound.com/android.htm

  On Apr 21, 10:32 pm, Bob Kerns r...@acm.org wrote:

   Thecamerapreview 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 owncamera
preview example also crashed on the HTC Desire. Hope it's not a bug in
the Desire's firmware ... Thecameraand camcorder apps that came with
the device work perfectly though.

It would be great if other people with a HTC Desire could try the
   CameraPreview API demo to verify that they experience the same
problem.

Cheers,

-- Jo

On 20 apr, 23:45, Streets Of Boston flyingdutc...@gmail.com wrote:

 mm 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-developers] Re: Android camera problem on HTC Desire

2010-04-22 Thread Jo Vermeulen
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:

   mm 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): 

[android-developers] Re: Android camera problem on HTC Desire

2010-04-22 Thread blindfold
Did you try other camera (preview/AR) apps from Android Market? I
receive regular crash reports from users, almost always due to a
java.lang.RuntimeException: startPreview failed error. I cannot
reproduce the problem on my good old ADP1 (G1), while the emulator
(SDK 1.6 and 2.1) also does not show problems, making it hard to track
down what exactly is happening with affected users.

Regards


The vOICe for Android
http://www.seeingwithsound.com/android.htm


On Apr 21, 11: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:

  mm 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): 

[android-developers] Re: Android camera problem on HTC Desire

2010-04-22 Thread blindfold
Interesting. I checked my user crash logs, and I find occasional
startPreview related crashes with Android 1.6, 2.0 and 2.01, and four
for 2.1-update1, but not a single one for 2.1, making me wonder if the
update1 for 2.1 introduces a new problem.

Regards

The vOICe for Android
http://www.seeingwithsound.com/android.htm


On Apr 21, 10:32 pm, 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:

   mm 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( 

[android-developers] Re: Android camera problem on HTC Desire

2010-04-22 Thread Jo Vermeulen
No I didn't. I will try some apps later today.

-- Jo

On 22 apr, 11:16, blindfold seeingwithso...@gmail.com wrote:
 Did you try other camera (preview/AR) apps from Android Market? I
 receive regular crash reports from users, almost always due to a
 java.lang.RuntimeException: startPreview failed error. I cannot
 reproduce the problem on my good old ADP1 (G1), while the emulator
 (SDK 1.6 and 2.1) also does not show problems, making it hard to track
 down what exactly is happening with affected users.

 Regards

 The vOICe for Androidhttp://www.seeingwithsound.com/android.htm

 On Apr 21, 11: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:

   mm 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

[android-developers] Re: Android camera problem on HTC Desire

2010-04-22 Thread Jo Vermeulen
I hope not :)

I filed a bug report for this: 
http://code.google.com/p/android/issues/detail?id=7909.
Feel free to add any additional information there.

Cheers,

-- Jo

On 22 apr, 11:28, blindfold seeingwithso...@gmail.com wrote:
 Interesting. I checked my user crash logs, and I find occasional
 startPreview related crashes with Android 1.6, 2.0 and 2.01, and four
 for 2.1-update1, but not a single one for 2.1, making me wonder if the
 update1 for 2.1 introduces a new problem.

 Regards

 The vOICe for Androidhttp://www.seeingwithsound.com/android.htm

 On Apr 21, 10:32 pm, 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:

mm 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-developers] Re: Android camera problem on HTC Desire

2010-04-22 Thread Streets Of Boston
Ah good, i'm not the only one that sees these occasional crashes in
their customers' crash logs :)

On Apr 22, 5:28 am, blindfold seeingwithso...@gmail.com wrote:
 Interesting. I checked my user crash logs, and I find occasional
 startPreview related crashes with Android 1.6, 2.0 and 2.01, and four
 for 2.1-update1, but not a single one for 2.1, making me wonder if the
 update1 for 2.1 introduces a new problem.

 Regards

 The vOICe for Androidhttp://www.seeingwithsound.com/android.htm

 On Apr 21, 10:32 pm, 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:

mm 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
 

[android-developers] Re: Android camera problem on HTC Desire

2010-04-21 Thread Jo Vermeulen
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:
 mm 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 

[android-developers] Re: Android camera problem on HTC Desire

2010-04-21 Thread Bob Kerns
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:



  mm 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
   

[android-developers] Re: Android camera problem on HTC Desire

2010-04-20 Thread Streets Of Boston
mm that looks strange.

From the stack-trace it (almost) looks like you're trying to access a
2nd camera on 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 main camera
W/CameraSwitch( 3801): no file - can't switch camera
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
 the camera. 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 main camera
 W/CameraSwitch( 3801): no file - can't switch camera
 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]