By Infaust
on Wed, 06/20/2012 - 17:08
Hi,
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:
[CODE]
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.(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
[/CODE]
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?
Infaust.
Re: Disabled camera after crash
Re: Disabled camera after crash
Re: Disabled camera after crash