On Tue, Sep 28, 2010 at 9:41 AM, Streets Of Boston <[email protected]> wrote: > I get this stack-trace in my e-mail at times from my application: > > java.lang.RuntimeException: Fail to connect to camera service > at android.hardware.Camera.native_setup(Native Method) > at android.hardware.Camera.<init>(Camera.java:118) > at android.hardware.Camera.open(Camera.java:91) > at com.streetsofboston.smugdroid.snapfx.camera.SmugCamera > $Preview.surfaceCreated(SmugCamera.java:1541) > at android.view.SurfaceView.updateWindow(SurfaceView.java:540) > ... > ... > > I have no idea why a Camera.open call in a surfaceCreated would fail. > I check if the camera already has opened. If so, i close it first, > then (re)open it. However, it is always closed (at least when i debug > is) (surfaceDestroyed implementationo closes and releases the camera). > > What would be causing this stack-trace?
I think you get that if the Camera is already open. That could mean: -- something else has the camera -- your camera wasn't fully released yet There have been enough complaints about the latter that I suspect there is a time gap between release() and when the camera is truly released and available to open() again. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Atlanta: http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

