title: Android Camera failing on Android 4.2.2(API Level 17)
body: <p>I am trying to use the camera, but it will not start.  the hw.camera.back: Webcam()  the hw.camera.front: webcam()  not sure what else to add since I can't cut and paste the details.</p>
  
  <p>The error I get is Unfortunatley, Camera has stopped.</p>
  
  <p>My Code is as follows, but it is not my code.  When I try to use the camera with out any use of programming I get the same error.</p>
  
  <pre><code>Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
          startActivityForResult(takePictureIntent, actionCode);
  </code></pre>
  
  <p>in the LogCat I have the following.
  The one error I see in the LogCat that I don't understand has todo with E-mail which i am not using and I don't even know how to turn that on or off yet.
   D/ExchangeService(617): !!! Email application not found; stopping self</p>
  
  <pre><code>03-05 19:39:12.716: I/Choreographer(409): Skipped 90 frames!  The application may be doing too much work on its main thread.
  03-05 19:39:12.736: D/dalvikvm(818): GC_FOR_ALLOC freed 20K, 7% free 3675K/3936K, paused 59ms, total 66ms
  03-05 19:39:12.875: D/dalvikvm(818): GC_FOR_ALLOC freed 5K, 7% free 4013K/4276K, paused 61ms, total 64ms
  03-05 19:39:13.056: D/Camera(818): app passed NULL surface
  03-05 19:39:13.076: V/EmulatedCamera_Camera(40): getCameraInfo
  03-05 19:39:13.076: V/EmulatedCamera_BaseCamera(40): getCameraInfo
  03-05 19:39:13.203: D/dalvikvm(818): GC_CONCURRENT freed 73K, 5% free 4429K/4656K, paused 12ms+55ms, total 197ms
  03-05 19:39:13.203: V/camera(818): Preview size is 640x480
  03-05 19:39:13.243: V/EmulatedCamera_Camera(40): setParameters
  03-05 19:39:13.263: V/camera(818): startPreview
  03-05 19:39:13.263: V/EmulatedCamera_Preview(40): setPreviewWindow: current: 0x0 -&gt; new: 0x0
  03-05 19:39:13.263: V/EmulatedCamera_Camera(40): doStartPreview
  03-05 19:39:13.263: V/EmulatedCamera_Preview(40): startPreview
  03-05 19:39:13.263: D/EmulatedCamera_Camera(40): Starting camera: 640x480 -&gt; NV21(yuv420sp)
  03-05 19:39:13.263: V/EmulatedCamera_QemuDevice(40): startDevice
  03-05 19:39:13.276: V/EmulatedCamera_Device(40): commonStartDevice: Allocated 0x41c42008 460800 bytes for 307200 pixels in NV21[640x480] frame
  03-05 19:39:15.273: D/dalvikvm(818): GC_FOR_ALLOC freed 49K, 4% free 4605K/4776K, paused 44ms, total 46ms
  03-05 19:39:15.293: I/dalvikvm-heap(818): Grow heap (frag case) to 5.684MB for 1127536-byte allocation
  03-05 19:39:15.293: E/EmulatedCamera_QemuClient(40): queryStart: Query failed: Cannot start the camera
  03-05 19:39:15.313: E/EmulatedCamera_QemuDevice(40): startDevice: Unable to start device 'AndroidEmulatorVC0' for NV21[640x480] frames
  03-05 19:39:15.313: V/EmulatedCamera_Preview(40): stopPreview
  03-05 19:39:15.378: D/dalvikvm(818): GC_FOR_ALLOC freed 1K, 3% free 5704K/5880K, paused 85ms, total 85ms
  03-05 19:39:15.383: V/EmulatedCamera_CallbackNotifier(40): disableMessage: msg_type = 0x10
  03-05 19:39:15.383: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_PREVIEW_FRAME
  03-05 19:39:15.383: V/EmulatedCamera_CallbackNotifier(40): **** Currently enabled messages:
  03-05 19:39:15.383: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_ERROR
  03-05 19:39:15.383: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_FOCUS
  03-05 19:39:15.383: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_ZOOM
  03-05 19:39:15.383: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_PREVIEW_METADATA
  03-05 19:39:15.393: V/EmulatedCamera_Camera(40): doStopPreview
  03-05 19:39:15.393: V/EmulatedCamera_CallbackNotifier(40): disableMessage: msg_type = 0x10
  03-05 19:39:15.393: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_PREVIEW_FRAME
  03-05 19:39:15.393: V/EmulatedCamera_CallbackNotifier(40): **** Currently enabled messages:
  03-05 19:39:15.393: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_ERROR
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_FOCUS
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_ZOOM
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_PREVIEW_METADATA
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40): disableMessage: msg_type = 0xffff
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_ERROR
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_SHUTTER
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_FOCUS
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_ZOOM
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_PREVIEW_FRAME
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_VIDEO_FRAME
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_POSTVIEW_FRAME
  03-05 19:39:15.403: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_RAW_IMAGE
  03-05 19:39:15.413: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_COMPRESSED_IMAGE
  03-05 19:39:15.413: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_RAW_IMAGE_NOTIFY
  03-05 19:39:15.413: V/EmulatedCamera_CallbackNotifier(40):     CAMERA_MSG_PREVIEW_METADATA
  03-05 19:39:15.413: V/EmulatedCamera_CallbackNotifier(40): **** Currently enabled messages:
  03-05 19:39:15.413: V/EmulatedCamera_Camera(40): doStopPreview
  03-05 19:39:15.413: V/EmulatedCamera_Camera(40): cancelPicture
  03-05 19:39:15.413: V/EmulatedCamera_Camera(40): releaseCamera
  03-05 19:39:15.413: V/EmulatedCamera_Camera(40): doStopPreview
  03-05 19:39:15.423: V/EmulatedCamera_QemuDevice(40): disconnectDevice
  03-05 19:39:15.423: V/EmulatedCamera_QemuDevice(40): disconnectDevice: Disonnected from device 'AndroidEmulatorVC0'
  03-05 19:39:15.423: I/CameraClient(40): Destroying camera 0
  03-05 19:39:15.423: V/EmulatedCamera_Camera(40): closeCamera
  03-05 19:39:15.423: V/EmulatedCamera_Camera(40): doStopPreview
  03-05 19:39:15.443: W/dalvikvm(818): threadid=11: thread exiting with uncaught exception (group=0x40a71930)
  03-05 19:39:15.483: E/AndroidRuntime(818): FATAL EXCEPTION: Thread-67
  03-05 19:39:15.483: E/AndroidRuntime(818): java.lang.RuntimeException: startPreview failed
  03-05 19:39:15.483: E/AndroidRuntime(818):  at com.android.camera.Camera.startPreview(Camera.java:1867)
  03-05 19:39:15.483: E/AndroidRuntime(818):  at com.android.camera.Camera.access$3100(Camera.java:87)
  03-05 19:39:15.483: E/AndroidRuntime(818):  at com.android.camera.Camera$5.run(Camera.java:1112)
  03-05 19:39:15.483: E/AndroidRuntime(818):  at java.lang.Thread.run(Thread.java:856)
  03-05 19:39:15.483: E/AndroidRuntime(818): Caused by: java.lang.RuntimeException: startPreview failed
  03-05 19:39:15.483: E/AndroidRuntime(818):  at android.hardware.Camera.startPreview(Native Method)
  03-05 19:39:15.483: E/AndroidRuntime(818):  at com.android.camera.Camera.startPreview(Camera.java:1864)
  03-05 19:39:15.483: E/AndroidRuntime(818):  ... 3 more
  03-05 19:39:15.513: W/AudioFlinger(40): session id 7 not found for pid 40
  03-05 19:39:15.523: W/AudioFlinger(40): session id 8 not found for pid 40
  03-05 19:39:15.553: W/ActivityManager(291):   Force finishing activity com.android.camera/.Camera
  03-05 19:39:15.772: D/dalvikvm(818): GC_CONCURRENT freed 25K, 3% free 5706K/5880K, paused 67ms+25ms, total 398ms
  03-05 19:39:16.013: D/dalvikvm(291): GC_FOR_ALLOC freed 1373K, 27% free 8210K/11196K, paused 132ms, total 140ms
  03-05 19:39:16.363: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
  03-05 19:39:16.610: W/ActivityManager(291): Activity pause timeout for ActivityRecord{410f2198 u0 com.android.camera/.Camera}
  03-05 19:39:16.813: E/SurfaceFlinger(37): ro.sf.lcd_density must be defined as a build property
  03-05 19:39:16.873: W/EGL_emulation(409): eglSurfaceAttrib not implemented
  03-05 19:39:29.058: W/ActivityManager(291): Activity destroy timeout for ActivityRecord{410f2198 u0 com.android.camera/.Camera}
  03-05 19:39:54.407: D/ExchangeService(617): Received deviceId from Email app: null
  03-05 19:39:54.407: D/ExchangeService(617): !!! deviceId unknown; stopping self and retrying
  03-05 19:39:59.483: D/ExchangeService(617): !!! EAS ExchangeService, onCreate
  03-05 19:39:59.483: D/ExchangeService(617): !!! EAS ExchangeService, onStartCommand, startingUp = false, running = false
  03-05 19:39:59.543: D/ExchangeService(617): !!! EAS ExchangeService, onStartCommand, startingUp = true, running = false
  03-05 19:39:59.593: W/ActivityManager(291): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
  03-05 19:39:59.593: D/ExchangeService(617): !!! Email application not found; stopping self
  03-05 19:39:59.643: W/ActivityManager(291): Unable to start service Intent { act=com.android.email.ACCOUNT_INTENT } U=0: not found
  03-05 19:39:59.663: E/ActivityThread(617): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d43240 that was originally bound here
  03-05 19:39:59.663: E/ActivityThread(617): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d43240 that was originally bound here
  03-05 19:39:59.663: E/ActivityThread(617):  at android.app.LoadedApk$ServiceDispatcher.&lt;init&gt;(LoadedApk.java:969)
  03-05 19:39:59.663: E/ActivityThread(617):  at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:863)
  03-05 19:39:59.663: E/ActivityThread(617):  at android.app.ContextImpl.bindService(ContextImpl.java:1418)
  </code></pre>