[android-developers] Re: Camera still regularly hangs with Cupcake, requiring power cycle
Is it advisable to add a Thread.sleep(1000L) after camera.release() to make life easier on the camera service to prevent the unbound camera lock situation? Of course that is not a fix, but I'll go with whatever gives me good stability with Cupcake. On May 1, 11:09 pm, blindfold wrote: > No I do not use the camera unlock() method anywhere. In fact I did not > even know this method existed. Seems undefined for the type Camera. > Did you perhaps mean camera.release()? I do use that, to be polite > against other camera apps when going in paused state, and when > quitting. Any recommendations on what I could do? > > Thanks! > > On May 1, 10:52 pm, Dave Sparks wrote: > > > Are you using the camera unlock() method? There is a known issue where > > if the application calls unlock() and then exits for any reason, it > > can leave the camera service in a state where it will reject any > > subsequent attempts to reconnect. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Camera still regularly hangs with Cupcake, requiring power cycle
No I do not use the camera unlock() method anywhere. In fact I did not even know this method existed. Seems undefined for the type Camera. Did you perhaps mean camera.release()? I do use that, to be polite against other camera apps when going in paused state, and when quitting. Any recommendations on what I could do? Thanks! On May 1, 10:52 pm, Dave Sparks wrote: > Are you using the camera unlock() method? There is a known issue where > if the application calls unlock() and then exits for any reason, it > can leave the camera service in a state where it will reject any > subsequent attempts to reconnect. > > On May 1, 12:57 pm, blindfold wrote: > > > Once the camera is in this state, Cupcake's built-in camera app gives > > in LogCat > > > 05-01 21:48:03.941: DEBUG/CameraService(35): Connect E from > > ICameraClient 0x46290 > > 05-01 21:48:03.951: DEBUG/CameraService(35): new client (0x46290) > > attempting to connect - rejected > > 05-01 21:48:03.951: WARN/dalvikvm(1480): threadid=15: thread exiting > > with uncaught exception (group=0x4000fe70) > > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): Uncaught handler: > > thread Thread-8 exiting due to uncaught exception > > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): > > java.lang.RuntimeException: Out of memory > > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > > android.hardware.Camera.native_setup(Native Method) > > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > > android.hardware.Camera.(Camera.java:82) > > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > > android.hardware.Camera.open(Camera.java:64) > > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > > com.android.camera.Camera$2.run(Camera.java:659) > > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > > java.lang.Thread.run(Thread.java:1058) > > > My own app in this state also gives > > > 05-01 21:51:57.051: DEBUG/CameraService(35): Connect E from > > ICameraClient 0x467e8 > > 05-01 21:51:57.051: DEBUG/CameraService(35): new client (0x467e8) > > attempting to connect - rejected > > > but without the java.lang.RuntimeException: Out of memory > > > I must then reboot the phone to get the camera back. I'm currently > > investigating if my use of Proguard perhaps has anything to do with > > it, because things seem stable until I prepare a release APK. > > > Regards > > > On May 1, 5:00 pm, Dave Sparks wrote: > > > > Can you repro this with the camera application? > > > > On May 1, 6:22 am, blindfold wrote: > > > > > I found that the old bug reported > > > > inhttp://code.google.com/p/android/issues/detail?id=1578 > > > > where only a power cycle brings back the camera still persists with > > > > the official Cupcake firmware on my ADP. When it happens - and I've > > > > encountered it several times in a few days now - no camera application > > > > can access the camera. A power cycle is needed to recover from this > > > > locked camera state. > > > > > Regards > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Camera still regularly hangs with Cupcake, requiring power cycle
On May 1, 9:57 pm, blindfold wrote: OK, moving from Proguard 4.1 to 4.3 seems to bring much improved stability as far my current testing goes, although I still managed to get the dreaded camera lock once after a stressful transition (quitting my app while it was resetting its state). Apparently Cupcake does not have some independent daemon running that checks if the camera is still locked when no camera app is running, in order to remove the floating lock? That might offer a solution to the G1 camera (or its firmware) not being quite stress proof. Regards > I must then reboot the phone to get the camera back. I'm currently > investigating if my use of Proguard perhaps has anything to do with > it, because things seem stable until I prepare a release APK. > > Regards > > On May 1, 5:00 pm, Dave Sparks wrote: > > > Can you repro this with the camera application? > > > On May 1, 6:22 am, blindfold wrote: > > > > I found that the old bug reported > > > inhttp://code.google.com/p/android/issues/detail?id=1578 > > > where only a power cycle brings back the camera still persists with > > > the official Cupcake firmware on my ADP. When it happens - and I've > > > encountered it several times in a few days now - no camera application > > > can access the camera. A power cycle is needed to recover from this > > > locked camera state. > > > > Regards > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Camera still regularly hangs with Cupcake, requiring power cycle
Are you using the camera unlock() method? There is a known issue where if the application calls unlock() and then exits for any reason, it can leave the camera service in a state where it will reject any subsequent attempts to reconnect. On May 1, 12:57 pm, blindfold wrote: > Once the camera is in this state, Cupcake's built-in camera app gives > in LogCat > > 05-01 21:48:03.941: DEBUG/CameraService(35): Connect E from > ICameraClient 0x46290 > 05-01 21:48:03.951: DEBUG/CameraService(35): new client (0x46290) > attempting to connect - rejected > 05-01 21:48:03.951: WARN/dalvikvm(1480): threadid=15: thread exiting > with uncaught exception (group=0x4000fe70) > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): Uncaught handler: > thread Thread-8 exiting due to uncaught exception > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): > java.lang.RuntimeException: Out of memory > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > android.hardware.Camera.native_setup(Native Method) > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > android.hardware.Camera.(Camera.java:82) > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > android.hardware.Camera.open(Camera.java:64) > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > com.android.camera.Camera$2.run(Camera.java:659) > 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at > java.lang.Thread.run(Thread.java:1058) > > My own app in this state also gives > > 05-01 21:51:57.051: DEBUG/CameraService(35): Connect E from > ICameraClient 0x467e8 > 05-01 21:51:57.051: DEBUG/CameraService(35): new client (0x467e8) > attempting to connect - rejected > > but without the java.lang.RuntimeException: Out of memory > > I must then reboot the phone to get the camera back. I'm currently > investigating if my use of Proguard perhaps has anything to do with > it, because things seem stable until I prepare a release APK. > > Regards > > On May 1, 5:00 pm, Dave Sparks wrote: > > > Can you repro this with the camera application? > > > On May 1, 6:22 am, blindfold wrote: > > > > I found that the old bug reported > > > inhttp://code.google.com/p/android/issues/detail?id=1578 > > > where only a power cycle brings back the camera still persists with > > > the official Cupcake firmware on my ADP. When it happens - and I've > > > encountered it several times in a few days now - no camera application > > > can access the camera. A power cycle is needed to recover from this > > > locked camera state. > > > > Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Camera still regularly hangs with Cupcake, requiring power cycle
Once the camera is in this state, Cupcake's built-in camera app gives in LogCat 05-01 21:48:03.941: DEBUG/CameraService(35): Connect E from ICameraClient 0x46290 05-01 21:48:03.951: DEBUG/CameraService(35): new client (0x46290) attempting to connect - rejected 05-01 21:48:03.951: WARN/dalvikvm(1480): threadid=15: thread exiting with uncaught exception (group=0x4000fe70) 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): Uncaught handler: thread Thread-8 exiting due to uncaught exception 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): java.lang.RuntimeException: Out of memory 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at android.hardware.Camera.native_setup(Native Method) 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at android.hardware.Camera.(Camera.java:82) 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at android.hardware.Camera.open(Camera.java:64) 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at com.android.camera.Camera$2.run(Camera.java:659) 05-01 21:48:03.951: ERROR/AndroidRuntime(1480): at java.lang.Thread.run(Thread.java:1058) My own app in this state also gives 05-01 21:51:57.051: DEBUG/CameraService(35): Connect E from ICameraClient 0x467e8 05-01 21:51:57.051: DEBUG/CameraService(35): new client (0x467e8) attempting to connect - rejected but without the java.lang.RuntimeException: Out of memory I must then reboot the phone to get the camera back. I'm currently investigating if my use of Proguard perhaps has anything to do with it, because things seem stable until I prepare a release APK. Regards On May 1, 5:00 pm, Dave Sparks wrote: > Can you repro this with the camera application? > > On May 1, 6:22 am, blindfold wrote: > > > I found that the old bug reported > > inhttp://code.google.com/p/android/issues/detail?id=1578 > > where only a power cycle brings back the camera still persists with > > the official Cupcake firmware on my ADP. When it happens - and I've > > encountered it several times in a few days now - no camera application > > can access the camera. A power cycle is needed to recover from this > > locked camera state. > > > Regards > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Camera still regularly hangs with Cupcake, requiring power cycle
Probably not as it may be load dependent, but once it happens with my own app the built-in camera application also no longer works. It's like the camera lock is no longer available to any app at that point, including the one that last used it. Regards On May 1, 5:00 pm, Dave Sparks wrote: > Can you repro this with the camera application? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Camera still regularly hangs with Cupcake, requiring power cycle
Can you repro this with the camera application? On May 1, 6:22 am, blindfold wrote: > I found that the old bug reported > inhttp://code.google.com/p/android/issues/detail?id=1578 > where only a power cycle brings back the camera still persists with > the official Cupcake firmware on my ADP. When it happens - and I've > encountered it several times in a few days now - no camera application > can access the camera. A power cycle is needed to recover from this > locked camera state. > > Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---