title: Unfortunately, Camera has stopped
body: <p><a href="https://i.stack.imgur.com/MjYYf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MjYYf.png" alt="enter image description here"></a></p>
  
  <p>When I launch the Camera application I am getting this error, and this is my logcat.         </p>
  
  <pre><code>12-08 12:50:10.393 2275-2369/com.android.launcher3 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa21675b0
  12-08 12:50:10.509 965-3048/? E/CameraService: CameraService::connect X (PID 3209) rejected (invalid camera ID 0)
  12-08 12:50:10.510 3209-3224/com.android.camera E/CameraHolder: fail to connect Camera
  12-08 12:50:10.510 3209-3224/com.android.camera E/CameraHolder: java.lang.RuntimeException: Fail to connect to camera service
  12-08 12:50:10.510 3209-3224/com.android.camera E/CameraHolder:     at android.hardware.Camera.&lt;init&gt;(Camera.java:495)
  12-08 12:50:10.510 3209-3224/com.android.camera E/CameraHolder:     at android.hardware.Camera.open(Camera.java:341)
  12-08 12:50:10.510 3209-3224/com.android.camera E/CameraHolder:     at com.android.camera.CameraHolder.open(CameraHolder.java:131)
  12-08 12:50:10.510 3209-3224/com.android.camera E/CameraHolder:     at com.android.camera.Util.openCamera(Util.java:267)
  12-08 12:50:10.510 3209-3224/com.android.camera E/CameraHolder:     at com.android.camera.Camera$3.run(Camera.java:1100)
  12-08 12:50:10.510 3209-3224/com.android.camera E/CameraHolder:     at java.lang.Thread.run(Thread.java:818)
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime: FATAL EXCEPTION: Thread-179
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime: Process: com.android.camera, PID: 3209
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime: java.lang.RuntimeException: openCamera failed
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at com.android.camera.Util.openCamera(Util.java:272)
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at com.android.camera.Camera$3.run(Camera.java:1100)
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:818)
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:  Caused by: com.android.camera.CameraHardwareException: java.lang.RuntimeException: Fail to connect to camera service
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at com.android.camera.CameraHolder.open(CameraHolder.java:135)
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at com.android.camera.Util.openCamera(Util.java:267)
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at com.android.camera.Camera$3.run(Camera.java:1100) 
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:818) 
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:  Caused by: java.lang.RuntimeException: Fail to connect to camera service
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at android.hardware.Camera.&lt;init&gt;(Camera.java:495)
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at android.hardware.Camera.open(Camera.java:341)
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at com.android.camera.CameraHolder.open(CameraHolder.java:131)
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at com.android.camera.Util.openCamera(Util.java:267) 
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at com.android.camera.Camera$3.run(Camera.java:1100) 
  12-08 12:50:10.511 3209-3224/com.android.camera E/AndroidRuntime:     at java.lang.Thread.run(Thread.java:818) 
  12-08 12:50:10.671 954-954/? E/EGL_emulation: tid 954: eglCreateSyncKHR(1243): error 0x3004 (EGL_BAD_ATTRIBUTE)
  </code></pre>
  
  <p>and this is my config.ini</p>
  
  <pre><code>avd.ini.encoding=UTF-8
  AvdId=Nexus_S_API_23
  abi.type=x86
  avd.ini.displayname=Nexus S API 23
  disk.dataPartition.size=200M
  hw.accelerometer=yes
  hw.audioInput=yes
  hw.battery=yes
  hw.camera.back=webcam0
  hw.camera.front=none
  hw.cpu.arch=x86
  hw.dPad=no
  hw.device.hash2=MD5:37a2ff6e511626ba3ceddec8264474be
  hw.device.manufacturer=Google
  hw.device.name=Nexus S
  hw.gps=yes
  hw.gpu.enabled=yes
  hw.keyboard=yes
  hw.lcd.density=240
  hw.mainKeys=yes
  hw.ramSize=343
  hw.sdCard=yes
  hw.sensors.orientation=yes
  hw.sensors.proximity=yes
  hw.trackBall=no
  image.sysdir.1=system-images\android-23\google_apis\x86\
  runtime.network.latency=none
  runtime.network.speed=full
  runtime.scalefactor=auto
  sdcard.size=100M
  skin.dynamic=yes
  skin.name=nexus_s
  skin.path=C:\Program Files\Android\Android Studio\plugins\android\lib\device-art-resources\nexus_s
  snapshot.present=no
  tag.display=Google APIs
  tag.id=google_apis
  vm.heapSize=32
  </code></pre>
  
  <p>I also faced this error.</p>
  
  <pre><code>emulator -webcam-list -avd Nexus_S_API_23
  emulator: WARNING: Increasing RAM size to 1GB
  emulator: ERROR: camera_device_start_capturing: Device 'AndroidEmulatorVC0' is unable to save frame to the clipboard: 0
  </code></pre>
  
  <p>Note: I am getting an error when I am trying to download an image from the Android browser.</p>