Log in or register to post comments

Disabled camera after crash

December 31, 2011 - 4:44am #1


I have been having problems for some time with my HTC Desire S, With Android version 2.3.5.

I've been working in two different apps: one with Unity3D and the other one with the Android SDK, Java, C++...

In both apps, around 3-4 seconds after starting the camera, the camera image freezes and then the app crashes. This happens not always, but quite often.
This happens not only with my applications, but also with the ImageTarget sample.

Sometimes, after one of this crashes, the camera doesn't work anymore. I try to run the android Camera app and it crashes. The logcat shows the following:

W/HTCCamera( 2344): $$$$$$$$$$$$$$$$$$$$$$$$$$$$$ surfaceCreated $$$$$$$$$$$$$$$$$$$$$$$$$$$android.view.SurfaceView$3@40530708
W/HTCCamera( 2344): $$$$$$$$$$$$$$$$$$$$$$$$$$$$$ surfaceCreated $$$$$$$$$$$$$$$$$$$$$$$$$$$  start preview
W/CameraThread( 2344): CameraHandler Message - START_PREVIEW start mode0
D/CameraService( 1274): CameraService::connect E (pid 2344, id 0), max 2
I/CameraService( 1274): cameraId:0
I/CameraService( 1274): 2D mode only
W/CameraService( 1274): CameraService::connect X (pid 2344) rejected (camera 0 is still busy).
E/CameraThread( 2344): open camera failed
E/CameraThread( 2344): java.lang.RuntimeException: Fail to connect to camera service
E/CameraThread( 2344): 	at android.hardware.Camera.native_setup(Native Method)
E/CameraThread( 2344): 	at android.hardware.Camera.<init>(Camera.java:264)
E/CameraThread( 2344): 	at android.hardware.Camera.open(Camera.java:225)
E/CameraThread( 2344): 	at com.android.camera.CameraThread.startPreview(CameraThread.java:2281)
E/CameraThread( 2344): 	at com.android.camera.CameraThread$MainHandler.handleMessage(CameraThread.java:620)
E/CameraThread( 2344): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/CameraThread( 2344): 	at android.os.Looper.loop(Looper.java:150)
E/CameraThread( 2344): 	at com.android.camera.CameraThread.run(CameraThread.java:3218)
W/CameraThread( 2344): CameraHandler Message - START_PREVIEW end
W/HTCCamera( 2344): $$$$$$$$$$$$$$$$$$$$$$$$$$$$$ surfaceChanged $$$$$$$$$$$$$$$$$$$$$$$$$$$ w=480 h=800

Then I need to reset the device and try again. As you may guess, it's a slow way to debug something...
Someone had a similar problem before?


Re: Disabled camera after crash

January 4, 2012 - 8:16am #4

Hi ksiva,

Yeah it was exactly this name length issue. Thank you so much!


Re: Disabled camera after crash

January 2, 2012 - 9:01am #3

Yes, QCAR should work with Android tablets.

You said the ImageTargets sample also crashes. Did you change the targets or anything else about the sample?

We've seen an occasional issue with 1.0.6 and targets with long names. We recommend shortening your target names to use 10 characters or less. If the ImageTargets sample is crashing without modification, however, this is probably not the issue.

Could you try the 1.5 beta on the same device?


- Kim

Re: Disabled camera after crash

December 31, 2011 - 5:38am #2


I tried to run the apps with another device (Ericsson Xperia) and everything works all right.
So I guess there is a problem with my HTC Desire S device.

I would like to ask also if someone tried QCAR with some Android tablet with success.

Log in or register to post comments