Ok, not the greatest subject line, but I wasn't sure how to get a good
description and keep it short enough to see (before the majority of it
falls off the edge of peoples' screens).

I've been trying to figure out this strange error for at least a week,
probably more like two weeks (not sure anymore).  I'm hopelessly stumped
on this one.

What I'm seeing is a Force Close of my camera app in only one of four
situations:

   1) side-load app, open via installer, pause using Home button,
      resume using Honeycomb's active apps display (don't know what
      it's called---the vertical listing of running apps with mini
      displays and app names); then close app.  NO FORCE CLOSE.

   2) open via icon; pause; resume via app icon; close; NO FORCE CLOSE

   3) open via icon; pause; resume via HC listing; close; NO FORCE CLOSE

   4) side-load, open via installer, pause, open via app icon this time,
      close; FORCE CLOSES

In numbers 1--3, logcat shows that in each case, when the app is paused
(using the Home button), the camera is released and re-opened on resume.

In number 4, however, it is only released one time...when the app is
closed (which is where the FC happens).

The following is the logcat text (taken from a logcat app, not Eclipse)
starting at the point where the app starts going bad (sorry about the
length---not sure which parts are most relevant):

---------------------------  CUT HERE  ---------------------------

// This starts after the camera app is resumed (using the app icon, as
// Froyo users and Honeycomb users coming from Froyo are likely to do))

I 131/ActivityManager: Displayed com.jdgapps.DroidProCam/.DroidProCam: +1s749ms
D 15219/dalvikvm: GC_CONCURRENT freed 228K, 5% free 8788K/9223K, paused 3ms+2ms
I 15103/JDG: enter surfaceCreated
I 15103/JDG: try [to open the camera]
W 4650/CameraService: CameraService::connect X (pid 15103) rejected
                     (existing client).
D 15103/AndroidRuntime: Shutting down VM

W 15103/dalvikvm: threadid=1: thread exiting with uncaught exception
                    (group=0x40298760)

E 15103/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Fail to connect to camera service
   at android.hardware.Camera.native_setup(Native Method)
   at android.hardware.Camera.<init>(Camera.java:259)
   at android.hardware.Camera.open(Camera.java:236)
   at com.jdgapps.DroidProCam.DroidProCam.surfaceCreated(DroidProCam.java:113)
   at android.view.SurfaceView.updateWindow(SurfaceView.java:563)
   at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:229)
   at android.view.View.dispatchWindowVisibilityChanged(View.java:4795)
   at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:846)
   at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:846)
   at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:846)
   at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:846)
   at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:846)
   at android.view.ViewRoot.performTraversals(ViewRoot.java:789)
   at android.view.ViewRoot.handleMessage(ViewRoot.java:2040)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:132)
   at android.app.ActivityThread.main(ActivityThread.java:4123)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:491)
   at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
   at dalvik.system.NativeStart.main(Native Method)

W 131/ActivityManager:   Force finishing activity
                         com.jdgapps.DroidProCam/.DroidProCam
D 131/dalvikvm: GC_CONCURRENT freed 2309K, 49% free 21524K/41543K,
                        paused 3ms+10ms
W 131/ActivityManager: Activity destroy timeout for ActivityRecord{409111c8
                        com.android.packageinstaller/.InstallAppProgress}
D 15219/dalvikvm: GC_CONCURRENT freed 490K, 7% free 9135K/9735K, paused 4ms+4ms
W 131/ActivityManager: Activity pause timeout for ActivityRecord{4107f228
                        com.jdgapps.DroidProCam/.DroidProCam}
D 189/TabletStatusBar: lights on
D 15219/dalvikvm: GC_CONCURRENT freed 747K, 9% free 9213K/10119K,
                        paused 4ms+4ms
I 15103/Process: Sending signal. PID: 15103 SIG: 9
E 131/InputDispatcher: channel '41743278 com.jdgapps.DroidProCam/
                        com.jdgapps.DroidProCam.DroidProCam (server)' ~
                        Consumer closed input channel or an error occurred.
                        events=0x8
E 131/InputDispatcher: channel '41743278 com.jdgapps.DroidProCam/
                        com.jdgapps.DroidProCam.DroidProCam (server)' ~
                        Channel is unrecoverably broken and will be disposed!
I 131/WindowManager: WIN DEATH: Window{40f19f90 com.jdgapps.DroidProCam/
                        com.jdgapps.DroidProCam.DroidProCam paused=false}
I 131/ActivityManager: Process com.jdgapps.DroidProCam (pid 15103) has died.
W 131/WindowManager: Force-removing child win Window{417ffe70 SurfaceView
                        paused=false} from container Window{40f19f90
                        com.jdgapps.DroidProCam/
                        com.jdgapps.DroidProCam.DroidProCam paused=false}
W 131/WindowManager: Failed looking up window
java.lang.IllegalArgumentException: Requested window
                        android.os.BinderProxy@40fd9350 does not exist
   at com.android.server.wm.WindowManagerService.windowForClientLocked
                        (WindowManagerService.java:6755)
   at com.android.server.wm.WindowManagerService.windowForClientLocked
                        (WindowManagerService.java:6746)
   at com.android.server.wm.WindowState$DeathRecipient.binderDied
                        (WindowState.java:1390)
   at android.os.BinderProxy.sendDeathNotice(Binder.java:418)
   at dalvik.system.NativeStart.run(Native Method)

I 131/WindowManager: WIN DEATH: null
I 131/WindowManager: WIN DEATH: Window {41743278 com.jdgapps.DroidProCam/
                        com.jdgapps.DroidProCam.DroidProCam paused=false}
W 131/WindowManager: Force-removing child win Window {41aee398 SurfaceView
                        paused=false} from container Window{41743278
                        com.jdgapps.DroidProCam/
                        com.jdgapps.DroidProCam.DroidProCam paused=false}
E 4650/Surface: surface (identity=26564) is invalid, err=-19 (No such device)
D 4650/CallStack: Surface#00  pc 00013d0a 
/system/lib/libsurfaceflinger_client.so
                           |
                           |
D 4650/CallStack: Surface#13  pc 000114b0 /system/lib/libc.so

W 131/WindowManager: Failed looking up window
java.lang.IllegalArgumentException: Requested window
                        android.os.BinderProxy@41744140 does not exist
   at com.android.server.wm.WindowManagerService.windowForClientLocked
                        (WindowManagerService.java:6755)
   at com.android.server.wm.WindowManagerService.windowForClientLocked
                        (WindowManagerService.java:6746)
   at com.android.server.wm.WindowState$DeathRecipient.binderDied
                        (WindowState.java:1390)
   at android.os.BinderProxy.sendDeathNotice(Binder.java:418)
   at dalvik.system.NativeStart.run(Native Method)

I 131/WindowManager: WIN DEATH: null
I 131/WindowManager: WINDOW DIED Window {41743278 com.jdgapps.DroidProCam/
                        com.jdgapps.DroidProCam.DroidProCam paused=false}
W 131/InputManagerService: Got RemoteException sending setActive(false)
                        notification to pid 15103 uid 10242
D 4650/NvOmxCamera: static OMX_ERRORTYPE
                        android::NvOmxCamera::nvOmxCameraCaptureEventHandler
                        (NvxComponent*, void*, OMX_EVENTTYPE, OMX_U32,
                        OMX_U32, void*)() check sensor_id=0,
                        use_camera_1st_source=0

E 4650/Surface: surface (identity=26564) is invalid, err=-19 (No such device)
D 4650/CallStack: Surface#00  pc 00013d0a 
/system/lib/libsurfaceflinger_client.so
                           |
                           |
D 4650/CallStack: Surface#13  pc 000114b0 /system/lib/libc.so

E 4650/Surface: surface (identity=26564) is invalid, err=-19 (No such device)
D 4650/CallStack: Surface#00  pc 00013d0a 
/system/lib/libsurfaceflinger_client.so
                           |
                           |
2012-02-24 15:54:51.490 D 4650/CallStack: Surface#12  pc 000114b0
                        /system/lib/libc.so

2012-02-24 15:54:51.490 E 4650/Surface: surface (identity=26564)
                        is invalid, err=-19 (No such device)
2012-02-24 15:54:51.490 D 4650/CallStack: Surface#00  pc 00013d0a
                        /system/lib/libsurfaceflinger_client.so
                           |
                           |
2012-02-24 15:54:51.490 D 4650/CallStack: Surface#12  pc 000114b0
                        /system/lib/libc.so

2012-02-24 15:54:51.490 E 4650/Surface: surface (identity=26564) is invalid,
                        err=-19 (No such device)
2012-02-24 15:54:51.490 D 4650/NvOmxCamera: static OMX_ERRORTYPE
                        android::NvOmxCamera::nvOmxCameraCaptureEventHandler
                        (NvxComponent*, void*, OMX_EVENTTYPE, OMX_U32,
                        OMX_U32, void*)() check sensor_id=0,
                        use_camera_1st_source=0

---------------------------  CUT HERE  ---------------------------

Can anybody see what might be going on here?  It LOOKS (to me) like the
app is trying to access the camera and/or preview after the app is
closed, but ONLY under the circumstances described in #4 above.

I'm probably missing something obvious, but whatever it is, I am missing
it....  I've been trying to figure this out for over a week now (or has
it been two weeks?  I've lost track), and need help, please.

Thanks,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)        | Tux (E Cat):  DS B+Wd Y 6 Y L+++ W++ C++/C++ I+++
[email protected]    | T++ A E H+ S V- F++ Q+++ P/P+ B++ PA+ PL SC---
< Running FreeBSD 7.0 > | 
ICBM / Hurricane:       | Tiggerbelle:  DS W+S+Bts % 1.5 X L-- W- C+++/C+
   30.44406N 86.59909W  | I+++  T A E++ H S++ V+++ Q+++ P  B++ PA++ PL+ SC

Android Apps Listing at http://www.jstrack.org/barcodes.html

-- 
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

Reply via email to