Delphi Android App crash on keyboard connect/disconnect - android

Create an Android App, drop an edit box, run the App.
Connect a barcode scanner, the App Crash.
Connect the barcode scanner and run the App, everything works fine.
Disconnect the scanner and the App crash.
If the App is runnig you cannot connect/disconnect a keyboard/barcode scanner no matter if it is bluetooth or wired.
Any ideas?
Similar to App crashes when closing Keyboard on Android Delphi Xe7
but it is not the same issue.
LogCat from Running App and then connect the barcode scanner
01-28 15:23:26.724 I/ActivityManager(668): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity} from pid 2642
01-28 15:23:26.779 I/ActivityManager(668): Start proc com.embarcadero.HeaderFooterApplication for activity com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity: pid=17902 uid=10178 gids={50178, 3002, 3001, 1006, 3003, 5012, 1028, 1015}
01-28 15:23:28.424 I/ActivityManager(668): Displayed com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity: +1s655ms
01-28 15:23:28.884 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] setSynchronousMode: SurfaceTexture has been abandoned!
01-28 15:23:28.884 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] queueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:28.884 W/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] cancelBuffer: BufferQueue has been abandoned!
01-28 15:23:28.889 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] dequeueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:28.889 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] dequeueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:28.889 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] dequeueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:28.889 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] dequeueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:36.054 I/WindowState(668): WIN DEATH: Window{41d09040 u0 com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity}
01-28 15:23:36.054 I/ActivityManager(668): Process com.embarcadero.HeaderFooterApplication (pid 17902) has died.
01-28 15:23:36.054 W/ActivityManager(668): Force removing ActivityRecord{41612fe0 u0 com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity}: app died, no saved state
01-28 15:23:49.274 I/ActivityManager(668): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity} from pid 2642
01-28 15:23:49.434 I/ActivityManager(668): Start proc com.embarcadero.HeaderFooterApplication for activity com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity: pid=18029 uid=10178 gids={50178, 3002, 3001, 1006, 3003, 5012, 1028, 1015}
01-28 15:23:51.094 I/ActivityManager(668): Displayed com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity: +1s668ms
01-28 15:23:51.589 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] setSynchronousMode: SurfaceTexture has been abandoned!
01-28 15:23:51.589 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] queueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:51.589 W/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] cancelBuffer: BufferQueue has been abandoned!
01-28 15:23:51.589 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] dequeueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:51.594 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] dequeueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:51.594 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] dequeueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:51.599 E/BufferQueue(142): [com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity] dequeueBuffer: SurfaceTexture has been abandoned!
01-28 15:23:59.329 W/InputDispatcher(668): channel '419b5198 com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
01-28 15:23:59.329 E/InputDispatcher(668): channel '419b5198 com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
01-28 15:23:59.329 W/InputDispatcher(668): Attempted to unregister already unregistered input channel '419b5198 com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity (server)'
01-28 15:23:59.329 I/WindowState(668): WIN DEATH: Window{419b5198 u0 com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity}
01-28 15:23:59.334 I/ActivityManager(668): Process com.embarcadero.HeaderFooterApplication (pid 18029) has died.
01-28 15:23:59.334 W/ActivityManager(668): Force removing ActivityRecord{419ef278 u0 com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity}: app died, no saved state

Solution from Embarcadero Community site (updated with additional items as suggested by Ernie Thomason)
You need to add keyboard into the Android Manifest template AndroidManifest.template.xml to avoid app termination when connecting/disconnecting an external USB keyboard.
Current file:
android:configChanges="orientation|keyboardHidden"
Updated file:
android:configChanges="orientati‌​on|keyboard|keyboardHidden|navigation|screenLayout|screenSize"
Here is some additional information about the template file:
When you build your project, RAD Studio uses AndroidManifest.template.xml as a template to generate AndroidManifest.xml in the output directory. You will need to edit the template file which lives in the same folder as your project.

Related

Game crashes on start for unknown reason

I have a unity3d project which, up to previous build, ran with no issues on android.
It is already set up to use the new google play store package format, which gets correctly accepted on the play store. The previous build, even with all of play store settings filled in, worked correctly when built in the pure non-play store .apk and copied to device and installed from the file.
Afterwards, the only change I made was adding a single clause into if condition in the code (which was just "if(false && originalCondition)", the intention was to disable that part of code, it's not relevant to the issue, it was part of code that handled starting and stopping particle effect within the gameplay), and now when I build it as an apk, and install it manually on the phone, and try to run it, it crashes immediately in the typical way of the screen flashing black for a moment as it creates the window, and then I'm back to the phone's desktop.
I have absolutely no idea why, and absolutely no idea how to find out why, let alone how to fix it... :/
If anyone has any idea how to at least find out what the issue actually is, please let me know/help. Write any and all suggestions as "answers" even if they're not, please, since I don't think I'll get an actual answer solving the problem, just pointers on how to proceed, and since comments have length limit and no formatting, thanks. (If this request doesn't violate some SO rules)
Below is content of the logcat from adb bridge, caught via Android Studio, filtered on the term "unity".
2019-12-03 10:57:02.619 12052-12052/? D/Unity: CommandLine:
2019-12-03 10:57:02.692 12052-12052/? D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f030001, context : com.unity3d.player.UnityPlayerActivity#d57310b, Nhwext : 0, get Blur : disable with , null
2019-12-03 10:57:02.693 12052-12052/? D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f030001, context : com.unity3d.player.UnityPlayerActivity#d57310b, Nhwext : 0, get Blur : disable with , null
2019-12-03 10:57:02.698 12052-12052/? D/ActivityThread: add activity client record, r= ActivityRecord{492b683 token=android.os.BinderProxy#61b8bfc {com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}} token= android.os.BinderProxy#61b8bfc
2019-12-03 10:57:02.700 12052-12052/? I/Unity: onResume
2019-12-03 10:57:02.728 1161-5474/? V/WindowManager: Adding Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} to AppWindowToken{1b8f6c3 token=Token{1e10272 ActivityRecord{7de437d u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18725}}}
2019-12-03 10:57:02.729 1161-5474/? V/WindowManager: addWindow: New client android.os.BinderProxy#dc3a215: window=Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} Callers=com.android.server.wm.HwWindowManagerService.addWindow:585 com.android.server.wm.Session.addToDisplay:199 android.view.IWindowSession$Stub.onTransact:124 com.android.server.wm.Session.onTransact:161 android.os.Binder.execTransact:675
2019-12-03 10:57:02.758 1161-5474/? V/WindowManager: Relayout window turning screen on: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 10:57:02.761 1161-5474/? W/WindowManager: EGLdebug Created surface WindowStateAnimator{1131df6 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 10:57:02.764 1161-5474/? V/HwPhoneWindowManager: updateSystemUiColorLw window=Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity},EmuiStyle=0,StatusBarColor=0xff757575,NavigationBarColor=0xff000000, mLastIsEmuiLightStyle=-1, mForceNotchStatusBar=false
2019-12-03 10:57:02.817 12052-12096/? D/Unity: SetWindow 0 0x71055cf010
2019-12-03 10:57:02.817 12052-12096/? D/Unity: SetWindow 0 0x71055cf010
2019-12-03 10:57:02.832 1161-1442/? V/WindowManager: Relayout window turning screen on: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 10:57:02.834 631-631/? D/SurfaceFlinger: duplicate layer name: changing com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity to com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity#1
2019-12-03 10:57:02.836 1161-1442/? W/WindowManager: EGLdebug Created surface WindowStateAnimator{1131df6 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 10:57:02.871 1161-6923/? D/WindowManager: finishDrawingWindow: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} mDrawState=DRAW_PENDING
2019-12-03 10:57:02.873 12052-12052/? I/Unity: windowFocusChanged: true
2019-12-03 10:57:02.888 1161-1297/? I/WindowManager: Destroying surface Surface(name=com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity) called by com.android.server.wm.WindowStateAnimator.destroyDeferredSurfaceLocked:928 com.android.server.wm.WindowStateAnimator.destroyPreservedSurfaceLocked:651 com.android.server.wm.WindowManagerService.destroyPreservedSurfaceLocked:6128 com.android.server.wm.WindowAnimator.animate:295 com.android.server.wm.WindowAnimator.lambda$-com_android_server_wm_WindowAnimator_4498:115 com.android.server.wm.-$Lambda$OQfQhd_xsxt9hoLAjIbVfOwa-jY$1.$m$0:4 com.android.server.wm.-$Lambda$OQfQhd_xsxt9hoLAjIbVfOwa-jY$1.doFrame:0 android.view.Choreographer$CallbackRecord.run:979
2019-12-03 10:57:02.889 12052-12096/? D/Unity: Enabling Unity systrace
2019-12-03 10:57:02.890 1161-1635/? D/WindowManager: finishDrawingWindow: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} mDrawState=HAS_DRAWN
2019-12-03 10:57:02.916 12052-12096/? D/Unity: [VFS] Mount /data/app/com.shcode.HordeMode-cAAp2ork2yKluy8z7dn18w==/base.apk
2019-12-03 10:57:03.033 1161-1442/? V/WindowManager: Relayout window turning screen on: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 10:57:03.045 12052-12096/? I/Unity: SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 2780mb
2019-12-03 10:57:03.045 12052-12096/? I/Unity: SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
2019-12-03 10:57:03.045 12052-12096/? I/Unity: ApplicationInfo com.shcode.HordeMode version 0.1 build f49be701-4d6c-4e19-a7a9-b14406456042
2019-12-03 10:57:03.046 12052-12096/? I/Unity: Built from '2019.2/staging' branch, Version '2019.2.0f1 (20c1667945cf)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
2019-12-03 10:57:03.067 1161-1297/? V/WindowManager: Removing Window{3a2a258 u0 Splash Screen com.shcode.HordeMode} from AppWindowToken{1b8f6c3 token=Token{1e10272 ActivityRecord{7de437d u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18725}}}
2019-12-03 10:57:03.075 1161-1635/? V/WindowManager: Relayout window turning screen on: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 10:57:03.088 12052-12096/? D/Unity: PlayerConnection initialized from /data/app/com.shcode.HordeMode-cAAp2ork2yKluy8z7dn18w==/base.apk/assets/bin/Data (debug = 0)
2019-12-03 10:57:03.089 12052-12096/? D/Unity: PlayerConnection initialized network socket : 0.0.0.0 55456
2019-12-03 10:57:03.089 12052-12096/? D/Unity: PlayerConnection initialized unix socket : Unity-com.shcode.HordeMode
2019-12-03 10:57:03.092 12052-12096/? D/Unity: Multi-casting "[IP] 192.168.1.104 [Port] 55456 [Flags] 2 [Guid] 128027842 [EditorId] 4122807452 [Version] 1048832 [Id] AndroidPlayer(HUAWEI_WAS-LX1#192.168.1.104) [Debug] 0 [PackageName] AndroidPlayer" to [225.0.0.222:54997]...
2019-12-03 10:57:03.092 12052-12096/? D/Unity: Started listening to [0.0.0.0:55456]
2019-12-03 10:57:03.116 1161-1442/? D/WindowManager: finishDrawingWindow: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} mDrawState=HAS_DRAWN
2019-12-03 10:57:03.151 1161-1678/? V/WindowManager: Relayout window turning screen on: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 10:57:03.163 12052-12096/? E/CRASH: pid: 12052, tid: 12096, name: UnityMain >>> com.shcode.HordeMode <<<
2019-12-03 10:57:03.294 1161-3606/? I/WindowManager: WIN DEATH: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 10:57:03.295 1161-3606/? V/WindowManager: removeIfPossible: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} callers=com.android.server.wm.WindowState.-wrap1:0 com.android.server.wm.WindowState$DeathRecipient.binderDied:2481 android.os.BinderProxy.sendDeathNotice:840 <bottom of call stack> <bottom of call stack>
2019-12-03 10:57:03.295 1161-3606/? W/WindowManager: Keyguard is occluded and there is no window in AppWindowToken{1b8f6c3 token=Token{1e10272 ActivityRecord{7de437d u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18725}}}
2019-12-03 10:57:03.296 1161-3606/? I/WindowManager: Destroying surface Surface(name=com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2089 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:899 com.android.server.wm.HwWindowStateAnimator.destroySurfaceLocked:1006 com.android.server.wm.WindowState.removeImmediately:1899 com.android.server.wm.WindowState.removeIfPossible:2051 com.android.server.wm.WindowState.-wrap1:0 com.android.server.wm.WindowState$DeathRecipient.binderDied:2481 android.os.BinderProxy.sendDeathNotice:840
2019-12-03 10:57:03.297 1161-3608/? W/ActivityManager: Force removing ActivityRecord{7de437d u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18725}: app died, no saved state
2019-12-03 10:57:03.301 1161-3606/? W/WindowManager: Exception thrown when updateSurfaceStatusWindowStateAnimator{1131df6 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}: android.os.DeadObjectException
2019-12-03 10:57:03.301 1161-3606/? V/WindowManager: postWindowRemoveCleanupLocked: Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 10:57:03.301 1161-3606/? V/WindowManager: Removing Window{8ec992a u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} from AppWindowToken{1b8f6c3 token=Token{1e10272 ActivityRecord{7de437d u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18725}}}
2019-12-03 10:57:03.308 1161-3608/? V/WindowManager: removeAppToken: AppWindowToken{1b8f6c3 token=Token{1e10272 ActivityRecord{7de437d u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18725}}} delayed=false Callers=com.android.server.wm.DisplayContent.removeAppToken:994 com.android.server.wm.AppWindowContainerController.removeContainer:352 com.android.server.am.ActivityRecord.removeWindowContainer:1045 com.android.server.am.ActivityStack.removeActivityFromHistoryLocked:4486
2019-12-03 11:02:14.119 1161-3607/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity bnds=[804,656][1068,942]} from uid 10062
2019-12-03 11:02:14.123 1161-3607/? I/ActivityManager: ActivityRecord info: ActivityInfo{2b18ee6 com.unity3d.player.UnityPlayerActivity}
2019-12-03 11:02:14.129 1161-3607/? V/WindowManager: addAppToken: AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}} controller={TaskWindowContainerController taskId=18726} at 2147483647
2019-12-03 11:02:14.149 1161-1297/? V/WindowManager: Adding Window{f46783b u0 Splash Screen com.shcode.HordeMode} to AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}}
2019-12-03 11:02:14.175 1161-3607/? I/ActivityManager: Start proc 12590:com.shcode.HordeMode/u0a243 for activity com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity
2019-12-03 11:02:14.177 1161-3607/? V/WindowManager: No longer Stopped: AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}}
2019-12-03 11:02:14.177 1161-3607/? V/WindowManager: No longer Stopped: AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}}
2019-12-03 11:02:14.235 1161-1646/? V/WindowManager: No longer Stopped: AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}}
2019-12-03 11:02:14.251 1161-1646/? V/WindowManager: Check opening app=AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}}: allDrawn=false startingDisplayed=true startingMoved=false isRelaunching()=false
2019-12-03 11:02:14.407 12590-12590/? D/Unity: CommandLine:
2019-12-03 11:02:14.451 12590-12590/? D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f030001, context : com.unity3d.player.UnityPlayerActivity#8936be8, Nhwext : 0, get Blur : disable with , null
2019-12-03 11:02:14.456 12590-12590/? D/ActivityThread: add activity client record, r= ActivityRecord{265d000 token=android.os.BinderProxy#f499285 {com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}} token= android.os.BinderProxy#f499285
2019-12-03 11:02:14.452 12590-12590/? D/HwRTBlurUtils: check blur style for HwPhoneWindow, themeResId : 0x7f030001, context : com.unity3d.player.UnityPlayerActivity#8936be8, Nhwext : 0, get Blur : disable with , null
2019-12-03 11:02:14.458 12590-12590/? I/Unity: onResume
2019-12-03 11:02:14.483 1161-1175/? V/WindowManager: Adding Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} to AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}}
2019-12-03 11:02:14.484 1161-1175/? V/WindowManager: addWindow: New client android.os.BinderProxy#92a78e9: window=Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} Callers=com.android.server.wm.HwWindowManagerService.addWindow:585 com.android.server.wm.Session.addToDisplay:199 android.view.IWindowSession$Stub.onTransact:124 com.android.server.wm.Session.onTransact:161 android.os.Binder.execTransact:675
2019-12-03 11:02:14.502 1161-1646/? V/WindowManager: Relayout window turning screen on: Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 11:02:14.504 1161-1646/? W/WindowManager: EGLdebug Created surface WindowStateAnimator{875d80f com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 11:02:14.505 1161-1646/? V/HwPhoneWindowManager: updateSystemUiColorLw window=Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity},EmuiStyle=0,StatusBarColor=0xff757575,NavigationBarColor=0xff000000, mLastIsEmuiLightStyle=-1, mForceNotchStatusBar=false
2019-12-03 11:02:14.561 12590-12611/? D/Unity: SetWindow 0 0x70f5720010
2019-12-03 11:02:14.563 12590-12611/? D/Unity: SetWindow 0 0x70f5720010
2019-12-03 11:02:14.563 12590-12590/? I/Unity: windowFocusChanged: true
2019-12-03 11:02:14.568 1161-1175/? V/WindowManager: Relayout window turning screen on: Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 11:02:14.569 631-631/? D/SurfaceFlinger: duplicate layer name: changing com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity to com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity#1
2019-12-03 11:02:14.571 1161-1175/? W/WindowManager: EGLdebug Created surface WindowStateAnimator{875d80f com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 11:02:14.579 12590-12611/? D/Unity: Enabling Unity systrace
2019-12-03 11:02:14.595 1161-1175/? D/WindowManager: finishDrawingWindow: Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} mDrawState=DRAW_PENDING
2019-12-03 11:02:14.596 12590-12611/? D/Unity: [VFS] Mount /data/app/com.shcode.HordeMode-cAAp2ork2yKluy8z7dn18w==/base.apk
2019-12-03 11:02:14.607 1161-1189/? I/ActivityManager: Displayed com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity: +454ms
2019-12-03 11:02:14.607 1161-1189/? I/ActivityManager: Displayed com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity: +454ms
2019-12-03 11:02:14.617 1161-1297/? I/WindowManager: Destroying surface Surface(name=com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity) called by com.android.server.wm.WindowStateAnimator.destroyDeferredSurfaceLocked:928 com.android.server.wm.WindowStateAnimator.destroyPreservedSurfaceLocked:651 com.android.server.wm.WindowManagerService.destroyPreservedSurfaceLocked:6128 com.android.server.wm.WindowAnimator.animate:295 com.android.server.wm.WindowAnimator.lambda$-com_android_server_wm_WindowAnimator_4498:115 com.android.server.wm.-$Lambda$OQfQhd_xsxt9hoLAjIbVfOwa-jY$1.$m$0:4 com.android.server.wm.-$Lambda$OQfQhd_xsxt9hoLAjIbVfOwa-jY$1.doFrame:0 android.view.Choreographer$CallbackRecord.run:979
2019-12-03 11:02:14.623 12590-12611/? I/Unity: SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 2780mb
2019-12-03 11:02:14.623 12590-12611/? I/Unity: SystemInfo ARM big.LITTLE configuration: 4 big (mask: 0xf0), 4 little (mask: 0xf)
2019-12-03 11:02:14.624 12590-12611/? I/Unity: ApplicationInfo com.shcode.HordeMode version 0.1 build f49be701-4d6c-4e19-a7a9-b14406456042
2019-12-03 11:02:14.624 12590-12611/? I/Unity: Built from '2019.2/staging' branch, Version '2019.2.0f1 (20c1667945cf)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
2019-12-03 11:02:14.629 1161-1646/? V/WindowManager: Relayout window turning screen on: Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 11:02:14.646 12590-12611/? D/Unity: PlayerConnection initialized from /data/app/com.shcode.HordeMode-cAAp2ork2yKluy8z7dn18w==/base.apk/assets/bin/Data (debug = 0)
2019-12-03 11:02:14.647 12590-12611/? D/Unity: PlayerConnection initialized network socket : 0.0.0.0 55050
2019-12-03 11:02:14.647 12590-12611/? D/Unity: PlayerConnection initialized unix socket : Unity-com.shcode.HordeMode
2019-12-03 11:02:14.649 12590-12611/? D/Unity: Multi-casting "[IP] 192.168.1.104 [Port] 55050 [Flags] 2 [Guid] 2203760397 [EditorId] 4122807452 [Version] 1048832 [Id] AndroidPlayer(HUAWEI_WAS-LX1#192.168.1.104) [Debug] 0 [PackageName] AndroidPlayer" to [225.0.0.222:54997]...
2019-12-03 11:02:14.649 12590-12611/? D/Unity: Started listening to [0.0.0.0:55050]
2019-12-03 11:02:14.679 1161-1175/? D/WindowManager: finishDrawingWindow: Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} mDrawState=HAS_DRAWN
2019-12-03 11:02:14.693 12590-12611/? E/CRASH: pid: 12590, tid: 12611, name: UnityMain >>> com.shcode.HordeMode <<<
2019-12-03 11:02:14.778 1161-1297/? V/WindowManager: Removing Window{f46783b u0 Splash Screen com.shcode.HordeMode} from AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}}
2019-12-03 11:02:14.783 1161-1323/? W/InputDispatcher: channel '522a96e com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
2019-12-03 11:02:14.783 1161-1323/? E/InputDispatcher: channel '522a96e com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2019-12-03 11:02:14.786 1161-9242/? W/ActivityManager: Force removing ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}: app died, no saved state
2019-12-03 11:02:14.799 1161-9242/? I/WindowManager: Failed to capture screenshot of Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726 f}} appWin=Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} drawState=4
2019-12-03 11:02:14.799 1161-9242/? V/WindowManager: removeAppToken: AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}} delayed=false Callers=com.android.server.wm.DisplayContent.removeAppToken:994 com.android.server.wm.AppWindowContainerController.removeContainer:352 com.android.server.am.ActivityRecord.removeWindowContainer:1045 com.android.server.am.ActivityStack.removeActivityFromHistoryLocked:4486
2019-12-03 11:02:14.799 1161-9242/? V/WindowManager: removeIfPossible: Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} callers=com.android.server.wm.WindowState.removeIfPossible:1914 com.android.server.wm.WindowToken.removeAllWindowsIfPossible:139 com.android.server.wm.AppWindowToken.removeIfPossible:556 com.android.server.wm.AppWindowToken.onRemovedFromDisplay:623 com.android.server.wm.DisplayContent.removeAppToken:994
2019-12-03 11:02:14.799 1161-9242/? W/InputDispatcher: Attempted to unregister already unregistered input channel '522a96e com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity (server)'
2019-12-03 11:02:14.799 1161-9242/? W/WindowManager: Keyguard is occluded and there is no window in AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}}
2019-12-03 11:02:14.800 1161-9242/? I/WindowManager: Destroying surface Surface(name=com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2089 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:899 com.android.server.wm.HwWindowStateAnimator.destroySurfaceLocked:1006 com.android.server.wm.WindowState.removeImmediately:1899 com.android.server.wm.WindowState.removeIfPossible:2051 com.android.server.wm.WindowState.removeIfPossible:1914 com.android.server.wm.WindowToken.removeAllWindowsIfPossible:139 com.android.server.wm.AppWindowToken.removeIfPossible:556
2019-12-03 11:02:14.800 1161-9242/? W/WindowManager: Exception thrown when updateSurfaceStatusWindowStateAnimator{875d80f com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}: android.os.DeadObjectException
2019-12-03 11:02:14.800 1161-9242/? V/WindowManager: postWindowRemoveCleanupLocked: Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity}
2019-12-03 11:02:14.800 1161-9242/? V/WindowManager: Removing Window{522a96e u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity} from AppWindowToken{777b372 token=Token{9cd187d ActivityRecord{8320ed4 u0 com.shcode.HordeMode/com.unity3d.player.UnityPlayerActivity t18726}}}
So, it seems this is bug in the unity version I'm using: 2019.2.0f1
The problem (as described here) seems to be that the game uses old il2cpp files with the new build (if the phone has Backup and Automatic Restore options enabled). Fix is deleting Android/data/ folder on the phone itself, since Unity re-creates those files on launch if they're missing.
Another way to fix this would be, I assume, switching the build format from il2cpp to anything else.
Lastly, this issue is fixed in Unity 2019.2.6
Link to bug report in Unity tracker, which also contains detailed explanation of the fix itself and why it (probably) works.

OpenCV crashes after a short time in Android app

I have an app which performs some image stitching and uses OpenCV. It used to work but all of a sudden it crashes (randomly?) all of the time. I don't know why this happens, I didn't change the code, but also didn't try that feature for several weeks now. There was probably an Android update in the meantime on my Nvidia Shield.
It used to work with OpenCV 2.4.10, but since it didn't work with that version anymore, I've tried to switch to OpenCV 3.0.0 which shows the same behavior.
My setup:
Nvidia Shield with Android 5.1.1
Installed OpenCV_3.0.0_manager_3.00_armeabi-v7a.apk manager
Build target is Android 5.1.1
Integrated OpenCV 3.0 Library from the Android SDK into my Android project. Inside the SDK, this is the path to the library: %path-to-sdk%/OpenCV3-android-sdk/sdk/java
My application behaves like follows: It seems to successfully load and initialize OpenCV and even starts to capture and stitch together some images. After three or four images, it crashes. Here are the Android logs which are logged during the crash:
02-01 13:07:55.172: I/AudioFlinger(209): AUDIO_OUTPUT_FLAG_FAST accepted: frameCount=11258 mFrameCount=512
02-01 13:07:55.321: E/Camera2-ZslProcessor3(209): pushToReprocess: Could not find good candidate for ZSL reprocessing
02-01 13:07:55.582: E/Error(209): configureSensor: cannot find a sensor mode for 2592x1944
02-01 13:07:56.391: W/Camera2-ZslProcessor3(209): getCandidateTimestampLocked: ZSL queue has no metadata frames
02-01 13:07:56.391: E/Camera2-ZslProcessor3(209): pushToReprocess: Could not find good candidate for ZSL reprocessing
02-01 13:07:56.653: E/Error(209): configureSensor: cannot find a sensor mode for 2592x1944
02-01 13:07:56.745: I/ActivityManager(632): Process com.google.android.partnersetup (pid 22851) has died
02-01 13:07:57.301: W/Camera2-ZslProcessor3(209): getCandidateTimestampLocked: ZSL queue has no metadata frames
02-01 13:07:57.301: E/Camera2-ZslProcessor3(209): pushToReprocess: Could not find good candidate for ZSL reprocessing
02-01 13:07:57.640: E/Error(209): configureSensor: cannot find a sensor mode for 2592x1944
02-01 13:07:58.134: I/ActivityManager(632): Process com.google.android.calendar (pid 23255) has died
02-01 13:07:58.139: E/lowmemorykiller(174): Error writing /proc/22747/oom_score_adj; errno=22
02-01 13:07:58.146: I/BackgroundMemoryTrimmer(22823): Trimming objects from memory, since app is in the background.
02-01 13:07:58.173: I/PersonalGridService(22885): onTrimMemory called with level: 5
02-01 13:07:58.174: I/ActivityManager(632): Process android.process.acore (pid 22747) has died
02-01 13:07:58.271: W/Camera2-ZslProcessor3(209): getCandidateTimestampLocked: ZSL queue has no metadata frames
02-01 13:07:58.271: E/Camera2-ZslProcessor3(209): pushToReprocess: Could not find good candidate for ZSL reprocessing
02-01 13:07:58.322: I/ActivityManager(632): Process com.android.providers.calendar (pid 23231) has died
02-01 13:07:58.364: I/ActivityManager(632): Process com.google.android.apps.plus (pid 23125) has died
02-01 13:07:58.365: E/lowmemorykiller(174): Error writing /proc/23104/oom_score_adj; errno=22
02-01 13:07:58.369: I/PersonalGridService(22885): onTrimMemory called with level: 10
02-01 13:07:58.381: I/ActivityManager(632): Process com.android.chrome (pid 23104) has died
02-01 13:07:58.400: I/ActivityManager(632): Process com.google.android.apps.photos (pid 23029) has died
02-01 13:07:58.407: I/PersonalGridService(22885): onTrimMemory called with level: 15
02-01 13:07:58.432: I/ActivityManager(632): Process com.google.process.gapps (pid 22637) has died
02-01 13:07:58.433: E/lowmemorykiller(174): Error opening /proc/22823/oom_score_adj; errno=2
02-01 13:07:58.434: I/ActivityManager(632): Process com.google.android.googlequicksearchbox:search (pid 22823) has died
02-01 13:07:58.566: E/Error(209): configureSensor: cannot find a sensor mode for 2592x1944
02-01 13:07:58.608: I/ActivityManager(632): Process org.opencv.engine:OpenCVEngineProcess (pid 22529) has died
02-01 13:07:59.175: W/Camera2-ZslProcessor3(209): getCandidateTimestampLocked: ZSL queue has no metadata frames
02-01 13:07:59.175: E/Camera2-ZslProcessor3(209): pushToReprocess: Could not find good candidate for ZSL reprocessing
02-01 13:07:59.277: I/ActivityManager(632): Process com.google.android.talk (pid 22787) has died
02-01 13:07:59.277: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.talk/com.google.android.libraries.hangouts.video.CallService in 1000ms
02-01 13:07:59.280: I/ActivityManager(632): Process android.process.media (pid 22454) has died
02-01 13:07:59.280: W/ActivityManager(632): Scheduling restart of crashed service com.android.providers.media/.MtpService in 1000ms
02-01 13:07:59.291: I/ActivityManager(632): Process com.nvidia.penapplauncher (pid 22972) has died
02-01 13:07:59.291: W/ActivityManager(632): Scheduling restart of crashed service com.nvidia.penapplauncher/com.nvidia.quickMenu.QuickMenuService in 10988ms
02-01 13:07:59.365: I/ActivityManager(632): Process com.nvidia.tegrazone3 (pid 22477) has died
02-01 13:07:59.365: W/ActivityManager(632): Scheduling restart of crashed service com.nvidia.tegrazone3/com.nvidia.tegrazone.account.AccountService in 20915ms
02-01 13:07:59.365: E/lowmemorykiller(174): Error opening /proc/22616/oom_score_adj; errno=2
02-01 13:07:59.366: I/ActivityManager(632): Process com.google.android.gms (pid 22616) has died
02-01 13:07:59.366: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/.analytics.service.AnalyticsService in 30914ms
02-01 13:07:59.441: E/Error(209): configureSensor: cannot find a sensor mode for 2592x1944
02-01 13:07:59.510: I/ActivityManager(632): Start proc 23500:com.nvidia.tegrazone3/u0a65 for service com.nvidia.tegrazone3/com.nvidia.tegrazone.account.AccountService
02-01 13:07:59.671: I/ActivityManager(632): Process com.nvidia.tegrazone3:PersonalGridService (pid 22885) has died
02-01 13:07:59.671: W/ActivityManager(632): Scheduling restart of crashed service com.nvidia.tegrazone3/com.nvidia.grid.PersonalGridService.pgService in 20609ms
02-01 13:07:59.966: W/Camera2-ZslProcessor3(209): getCandidateTimestampLocked: ZSL queue has no metadata frames
02-01 13:07:59.966: E/Camera2-ZslProcessor3(209): pushToReprocess: Could not find good candidate for ZSL reprocessing
02-01 13:08:00.020: I/ActivityManager(632): Process com.google.android.inputmethod.latin (pid 22923) has died
02-01 13:08:00.020: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME in 30260ms
02-01 13:08:00.100: I/ActivityManager(632): Process com.google.android.gms.persistent (pid 22659) has died
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/com.google.android.location.internal.PendingIntentCallbackService in 40180ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/.common.stats.GmsCoreStatsService in 50180ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/.backup.BackupTransportService in 60180ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/com.google.android.location.fused.FusedLocationService in 70180ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/.deviceconnection.service.DeviceConnectionServiceBroker in 80180ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/com.google.android.location.network.NetworkLocationService in 90180ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/com.google.android.location.geofencer.service.GeofenceProviderService in 100180ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/.gcm.GcmService in 110180ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/com.google.android.location.geocode.GeocodeService in 120180ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/com.google.android.location.internal.GoogleLocationManagerService in 130179ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/com.google.android.location.internal.server.GoogleLocationService in 140179ms
02-01 13:08:00.100: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/com.google.android.contextmanager.service.ContextManagerService in 150179ms
02-01 13:08:00.101: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.gms/com.google.android.location.reporting.service.DispatchingService in 160179ms
02-01 13:08:00.116: I/WindowState(632): WIN DEATH: Window{1026bdfe u0 com.nvidia.ControllerMapper}
02-01 13:08:00.341: E/Surface(209): queueBuffer: error queuing buffer to SurfaceTexture, -32
02-01 13:08:00.343: W/InputDispatcher(632): channel '3438de7d mobileBRDF.Renderer/mobileBRDF.ImageProcessing.ImageProcessingActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
02-01 13:08:00.343: E/InputDispatcher(632): channel '3438de7d mobileBRDF.Renderer/mobileBRDF.ImageProcessing.ImageProcessingActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
02-01 13:08:00.378: W/CameraService(209): Disconnecting camera client 0xae447290 since the binder for it died (this pid 209)
02-01 13:08:00.379: E/Camera3-OutputStream(209): returnBufferCheckedLocked: Stream 0: Error queueing buffer to native window: Broken pipe (-32)
02-01 13:08:00.379: E/Camera3-Device(209): Can't return buffer to its stream: Broken pipe (-32)
02-01 13:08:00.379: E/Camera3-OutputStream(209): getBufferLocked: Stream 0: Can't dequeue next output buffer: Broken pipe (-32)
02-01 13:08:00.379: E/Camera3-Device(209): RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
02-01 13:08:00.379: E/Camera2ClientBase(209): Error condition 3 reported by HAL, requestId 30000005
02-01 13:08:00.383: W/InputDispatcher(632): channel '24b71005 mobileBRDF.Renderer/mobileBRDF.HDR.EnvMapCaptureActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
02-01 13:08:00.383: E/InputDispatcher(632): channel '24b71005 mobileBRDF.Renderer/mobileBRDF.HDR.EnvMapCaptureActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
02-01 13:08:00.396: E/Surface(209): queueBuffer: error queuing buffer to SurfaceTexture, -32
02-01 13:08:00.396: E/Camera3-OutputStream(209): returnBufferCheckedLocked: Stream 0: Error queueing buffer to native window: Broken pipe (-32)
02-01 13:08:00.396: E/Camera3-Device(209): Can't return buffer to its stream: Broken pipe (-32)
02-01 13:08:00.415: E/Surface(209): queueBuffer: error queuing buffer to SurfaceTexture, -32
02-01 13:08:00.415: E/Camera3-OutputStream(209): returnBufferCheckedLocked: Stream 0: Error queueing buffer to native window: Broken pipe (-32)
02-01 13:08:00.415: E/Camera3-Device(209): Can't return buffer to its stream: Broken pipe (-32)
02-01 13:08:00.431: E/Surface(209): queueBuffer: error queuing buffer to SurfaceTexture, -32
02-01 13:08:00.431: E/Camera3-OutputStream(209): returnBufferCheckedLocked: Stream 0: Error queueing buffer to native window: Broken pipe (-32)
02-01 13:08:00.431: E/Camera3-Device(209): Can't return buffer to its stream: Broken pipe (-32)
02-01 13:08:00.518: E/Surface(209): queueBuffer: error queuing buffer to SurfaceTexture, -32
02-01 13:08:00.518: E/Camera3-OutputStream(209): returnBufferCheckedLocked: Stream 0: Error queueing buffer to native window: Broken pipe (-32)
02-01 13:08:00.518: E/Camera3-Device(209): Can't return buffer to its stream: Broken pipe (-32)
02-01 13:08:00.571: E/Surface(209): queueBuffer: error queuing buffer to SurfaceTexture, -32
02-01 13:08:00.571: E/Camera3-OutputStream(209): returnBufferCheckedLocked: Stream 0: Error queueing buffer to native window: Broken pipe (-32)
02-01 13:08:00.571: E/Camera3-Device(209): Can't return buffer to its stream: Broken pipe (-32)
02-01 13:08:00.610: I/WindowState(632): WIN DEATH: Window{2fbeaa8b u0 SurfaceView}
02-01 13:08:00.844: I/WindowState(632): WIN DEATH: Window{24b71005 u0 mobileBRDF.Renderer/mobileBRDF.HDR.EnvMapCaptureActivity}
02-01 13:08:00.844: W/InputDispatcher(632): Attempted to unregister already unregistered input channel '24b71005 mobileBRDF.Renderer/mobileBRDF.HDR.EnvMapCaptureActivity (server)'
02-01 13:08:00.912: I/WindowState(632): WIN DEATH: Window{3438de7d u0 mobileBRDF.Renderer/mobileBRDF.ImageProcessing.ImageProcessingActivity}
02-01 13:08:00.912: W/InputDispatcher(632): Attempted to unregister already unregistered input channel '3438de7d mobileBRDF.Renderer/mobileBRDF.ImageProcessing.ImageProcessingActivity (server)'
02-01 13:08:00.912: W/WindowManager(632): Force-removing child win Window{d2dcab1 u0 SurfaceView} from container Window{3438de7d u0 mobileBRDF.Renderer/mobileBRDF.ImageProcessing.ImageProcessingActivity}
02-01 13:08:00.953: W/WindowManager(632): Failed looking up window
02-01 13:08:00.953: W/WindowManager(632): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy#821958 does not exist
02-01 13:08:00.953: W/WindowManager(632): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8559)
02-01 13:08:00.953: W/WindowManager(632): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8550)
02-01 13:08:00.953: W/WindowManager(632): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1142)
02-01 13:08:00.953: W/WindowManager(632): at android.os.BinderProxy.sendDeathNotice(Binder.java:551)
02-01 13:08:00.953: I/WindowState(632): WIN DEATH: null
02-01 13:08:00.955: I/ActivityManager(632): Process com.google.android.googlequicksearchbox:interactor (pid 23335) has died
02-01 13:08:00.955: W/ActivityManager(632): Scheduling restart of crashed service com.google.android.googlequicksearchbox/com.google.android.voiceinteraction.GsaVoiceInteractionService in 942128ms
02-01 13:08:00.956: I/ActivityManager(632): Process com.nvidia.ControllerMapper (pid 22589) has died
02-01 13:08:00.956: W/ActivityManager(632): Scheduling restart of crashed service com.nvidia.ControllerMapper/.MapperService in 159324ms
02-01 13:08:00.957: I/ActivityManager(632): Process com.nvidia.stats (pid 22508) has died
02-01 13:08:00.957: W/ActivityManager(632): Scheduling restart of crashed service com.nvidia.stats/.StatsService in 169323ms
02-01 13:08:00.983: W/InputMethodManagerService(632): Session failed to close due to remote exception
02-01 13:08:00.983: W/InputMethodManagerService(632): android.os.DeadObjectException
02-01 13:08:00.983: W/InputMethodManagerService(632): at android.os.BinderProxy.transactNative(Native Method)
02-01 13:08:00.983: W/InputMethodManagerService(632): at android.os.BinderProxy.transact(Binder.java:496)
02-01 13:08:00.983: W/InputMethodManagerService(632): at com.android.internal.view.IInputMethodSession$Stub$Proxy.finishSession(IInputMethodSession.java:305)
02-01 13:08:00.983: W/InputMethodManagerService(632): at com.android.server.InputMethodManagerService.finishSessionLocked(InputMethodManagerService.java:1420)
02-01 13:08:00.983: W/InputMethodManagerService(632): at com.android.server.InputMethodManagerService.clearClientSessionLocked(InputMethodManagerService.java:1411)
02-01 13:08:00.983: W/InputMethodManagerService(632): at com.android.server.InputMethodManagerService.clearCurMethodLocked(InputMethodManagerService.java:1437)
02-01 13:08:00.983: W/InputMethodManagerService(632): at com.android.server.InputMethodManagerService.onServiceDisconnected(InputMethodManagerService.java:1456)
02-01 13:08:00.983: W/InputMethodManagerService(632): at android.app.LoadedApk$ServiceDispatcher.doDeath(LoadedApk.java:1213)
02-01 13:08:00.983: W/InputMethodManagerService(632): at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1227)
02-01 13:08:00.983: W/InputMethodManagerService(632): at android.os.Handler.handleCallback(Handler.java:739)
02-01 13:08:00.983: W/InputMethodManagerService(632): at android.os.Handler.dispatchMessage(Handler.java:95)
02-01 13:08:00.983: W/InputMethodManagerService(632): at android.os.Looper.loop(Looper.java:135)
02-01 13:08:00.983: W/InputMethodManagerService(632): at com.android.server.SystemServer.run(SystemServer.java:269)
02-01 13:08:00.983: W/InputMethodManagerService(632): at com.android.server.SystemServer.main(SystemServer.java:170)
02-01 13:08:00.983: W/InputMethodManagerService(632): at java.lang.reflect.Method.invoke(Native Method)
02-01 13:08:00.983: W/InputMethodManagerService(632): at java.lang.reflect.Method.invoke(Method.java:372)
02-01 13:08:00.983: W/InputMethodManagerService(632): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
02-01 13:08:00.983: W/InputMethodManagerService(632): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
02-01 13:08:00.998: I/stats(632): onServiceDisconnected
02-01 13:08:00.998: I/stats(632): onServiceDisconnected
02-01 13:08:01.054: I/ActivityManager(632): Start proc 23521:android.process.media/u0a5 for service com.android.providers.media/.MtpService
02-01 13:08:01.057: I/ActivityManager(632): Process mobileBRDF.Renderer (pid 22471) has died
02-01 13:08:01.058: W/ActivityManager(632): Force removing ActivityRecord{1e7f649b u0 mobileBRDF.Renderer/mobileBRDF.HDR.EnvMapCaptureActivity t1990}: app died, no saved state
What could be the reason for this behavior?
Could it be that I've missed something during configuration? (something regarding the OpenCV manager maybe?)
Any ideas what I could do to narrow down the error?
Update:
I still haven't been able to figure out the problem on the Nvidia Shield. It just crashes somewhere inside OpenCV. Tested on 2 different Nvidia Shield devices => crashes on both. The same build + the same config runs without crashing on the Google Nexus 9 which has the same GPU (Nvidia K1). Crazy times!

Can't find the root cause that app been kill by android

We're working on an Android game, developing with Cocos2d-x.
Our game seems to be killed by android, but we can't find the root cause about the game close. The adb's log is dumped as follows:
adb's log
Critical portion:
D/dalvikvm( 501): GC_CONCURRENT freed 875K, 19% free 4478K/5464K, paused 2ms+2ms, total 22ms
E/Surface ( 965): queueBuffer: error queuing buffer to SurfaceTexture, -12
W/dalvikvm( 965): trying to work around app JNI bugs, but didn't find 0x41906cd8 in table!
W/dalvikvm( 965): JNI WARNING: DeleteLocalRef(0x41906cd8) failed to find entry
I/FrameQueueManage( 174): FrameQueueManage::~FrameQueueManage end!
D/Zygote ( 172): Process 965 terminated by signal (11)
I/ActivityManager( 501): Process igs.rd5.SuperSoccer (pid 965) has died.
I/WindowState( 501): WIN DEATH: Window{41a365d8 u0 igs.rd5.SuperSoccer/org.cocos2dx.cpp.AppActivity}
W/WindowManager( 501): Force-removing child win Window{41a4fcb0 u0 SurfaceView} from container Window{41a365d8 u0 igs.rd5.SuperSoccer/org.cocos2dx.cpp.AppActivity}
W/ActivityManager( 501): Force removing ActivityRecord{41975d20 u0 igs.rd5.SuperSoccer/org.cocos2dx.cpp.AppActivity t2}: app died, no saved state
W/WindowManager( 501): Failed looking up window
W/WindowManager( 501): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy#41a4be58 does not exist
W/WindowManager( 501): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8102)
W/WindowManager( 501): at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8093)
W/WindowManager( 501): at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1047)
W/WindowManager( 501): at android.os.BinderProxy.sendDeathNotice(Binder.java:493)
W/WindowManager( 501): at dalvik.system.NativeStart.run(Native Method)
I/WindowState( 501): WIN DEATH: null
D/mali_winsys( 680): new_window_surface returns 0x3000
W/InputMethodManagerService( 501): Got RemoteException sending setActive(false) notification to pid 965 uid 10047
W/Binder ( 652): Caught a RuntimeException from the binder stub implementation.
W/Binder ( 652): java.lang.NullPointerException
W/Binder ( 652): at android.inputmethodservice.IInputMethodWrapper.setSessionEnabled(IInputMethodWrapper.java:284)
W/Binder ( 652): at com.android.internal.view.IInputMethod$Stub.onTransact(IInputMethod.java:129)
W/Binder ( 652): at android.os.Binder.execTransact(Binder.java:404)
W/Binder ( 652): at dalvik.system.NativeStart.run(Native Method)
We don't see any native library's crash dump, and nearly can't see any java's exception that has senses. Cound anybody tell us why our game is killed by android?

Application dies with "Low Memory: No more background processes."

In my application i try launching the browser with the following url:
https://maps.google.com/maps?saddr=indiranagar bangalore&daddr=mgroad bangalore
The browser launches and when the map loads my application gets killed with the following logcat message:
I/ActivityManager( 61): Starting: Intent { act=android.intent.action.VIEW dat=
http://View cmp=com.android.browser/.BrowserActivity (has extras) } from pid 355
I/ActivityManager( 61): Starting: Intent { act=android.intent.action.VIEW dat=
https://maps.google.com/maps?saddr=indiranagar bangalore&daddr=mgroad bangalore
cmp=com.android.browser/.BrowserActivity } from pid 355
D/PhoneWindow( 355): couldn't save which view has focus because the focused vie
w android.widget.EditText#40587640 has no id.
I/ActivityManager( 61): Displayed com.android.browser/.BrowserActivity: +760ms
W/IInputConnectionWrapper( 355): showStatusIcon on inactive InputConnection
I/dalvikvm( 373): Jit: resizing JitTable from 1024 to 2048
I/System.out( 355): Logout Counter:30
D/dalvikvm( 373): GC_CONCURRENT freed 369K, 50% free 3921K/7751K, external 2234
K/2645K, paused 5ms+18ms
D/dalvikvm( 355): GC_EXPLICIT freed 866K, 50% free 3666K/7239K, external 2693K/
3310K, paused 1640ms
D/dalvikvm( 373): GC_CONCURRENT freed 1400K, 54% free 3641K/7751K, external 226
6K/2645K, paused 6ms+26ms
W/browser ( 373): We should not show context menu when nothing is touched
W/browser ( 373): We should not show context menu when nothing is touched
W/browser ( 373): We should not show context menu when nothing is touched
**I/ActivityManager( 61): Process com.aavarp.mobile (pid 355) has died.
I/ActivityManager( 61): Low Memory: No more background processes.**
I/WindowManager( 61): WIN DEATH: Window{408793c0 com.aavarp.mobile/com.aavarp.
mobile.core.ui.ApplicationsActivity paused=false}
E/InputDispatcher( 61): channel '4070e4f8 com.aavarp.mobile/com.aavarp.mobile.
dashboard.ui.components.GraphActivity (server)' ~ Consumer closed input channel
or an error occurred. events=0x8
E/InputDispatcher( 61): channel '4070e4f8 com.aavarp.mobile/com.aavarp.mobile.
dashboard.ui.components.GraphActivity (server)' ~ Channel is unrecoverably broke
n and will be disposed!
I/WindowManager( 61): WIN DEATH: Window{4070e4f8 com.aavarp.mobile/com.aavarp.
mobile.dashboard.ui.components.GraphActivity paused=false}
I/WindowManager( 61): WIN DEATH: Window{406836a8 com.aavarp.mobile/com.aavarp.
mobile.dashboard.ui.components.NotificationList paused=false}
I/WindowManager( 61): WIN DEATH: Window{406825a8 com.aavarp.mobile/com.aavarp.
mobile.dashboard.ui.components.TableListActivity paused=false}
I/WindowManager( 61): WIN DEATH: Window{4083df30 com.aavarp.mobile/com.aavarp.
mobile.dashboard.ui.components.DetailsActivity paused=false}
E/InputDispatcher( 61): Received spurious receive callback for unknown input c
hannel. fd=171, events=0x8
E/InputDispatcher( 61): Received spurious receive callback for unknown input c
hannel. fd=175, events=0x8
E/InputDispatcher( 61): Received spurious receive callback for unknown input c
hannel. fd=181, events=0x8
D/dalvikvm( 61): GC_CONCURRENT freed 1735K, 52% free 4435K/9159K, external 529
2K/6609K, paused 8ms+16ms
D/skia ( 129): purging 38K from font cache [5 entries]
D/dalvikvm( 129): GC_EXPLICIT freed 84K, 52% free 2801K/5767K, external 2117K/2
643K, paused 73ms
Again i tried launching the browser from my application with www.google.com and performed a search and browsed through various pages and navigated back to my application without any issues. I am not sure if am missing some message on the logcat. I use Android 2.3 OS.Could someone kindly help me resolve this issue please. Thanks in advance.
why do you want to load the maps in webview..? you load the map in a map activity or
use Intents List: Invoking Google Applications on Android Devices
String uri = "http://maps.google.com/maps?saddr=" + "9982878"+","+"76285774"+"&daddr="+"9992084"+","+"76286455";
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
Note: for displaying route you should use map activity canvas

Consumer closed input channel or an error occurred. events=0x8

So, I was testing my app out on various devices, and on some with less memory, it decides to crash after playing for a while. I think I have a memory leak somewhere, but that isn't the issue.
When it dies, it doesn't throw any exceptions, this is what the logcat gave me:
07-16 14:05:55.424 1318 1318 I ActivityManager: Starting: Intent {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.waldev.platformer/.Menu } from pid 4631
07-16 14:05:56.213 1318 1349 I ActivityManager: Displayed org.waldev.platformer/.Menu: +613ms
07-16 14:05:58.252 1318 1509 I ActivityManager: Starting: Intent { cmp=org.waldev.platformer/.Platformer } from pid 4623
07-16 14:05:58.510 1220 1316 I ExtendFileSource: filename = /data/app/org.waldev.platformer-1.apk
07-16 14:05:58.533 1220 10962 I ExtendFileSource: filename = /data/app/org.waldev.platformer-1.apk
07-16 14:05:58.549 1220 7923 I ExtendFileSource: filename = /data/app/org.waldev.platformer-1.apk
07-16 14:05:58.557 1220 1220 I ExtendFileSource: filename = /data/app/org.waldev.platformer-1.apk
07-16 14:05:58.783 1318 1349 I ActivityManager: Resumed Activity: org.waldev.platformer/.Menu totalTime: 3361 ms
07-16 14:05:58.783 1318 1349 I ActivityManager: Displayed org.waldev.platformer/.Platformer: +496ms
07-16 14:05:59.682 1220 1220 I ExtendFileSource: filename = /data/app/org.waldev.platformer-1.apk
07-16 14:08:04.619 1220 10961 I ExtendFileSource: filename = /data/app/org.waldev.platformer-1.apk
07-16 14:09:56.283 1318 1551 I ActivityManager: Process org.waldev.platformer (pid 4623) has died.
07-16 14:09:56.369 1318 1351 E InputDispatcher: channel '405409f8 org.waldev.platformer/org.waldev.platformer.Menu (server)' ~ Consumer closed input channel or an error occurred. events=0x8
07-16 14:09:56.369 1318 1351 E InputDispatcher: channel '405409f8 org.waldev.platformer/org.waldev.platformer.Menu (server)' ~ Channel is unrecoverably broken and will be disposed!
07-16 14:09:56.416 1318 6514 I WindowManager: WIN DEATH: Window{40576908 org.waldev.platformer/org.waldev.platformer.Menu paused=false}
07-16 14:09:56.557 1318 1537 I WindowManager: WIN DEATH: Window{405409f8 org.waldev.platformer/org.waldev.platformer.Menu paused=false}
07-16 14:09:56.572 1318 2103 I WindowManager: WIN DEATH: Window{409f0b80 org.waldev.platformer/org.waldev.platformer.Menu paused=false}
07-16 14:09:56.580 1318 1464 I WindowManager: WIN DEATH: Window{40543cf0 org.waldev.platformer/org.waldev.platformer.Menu paused=false}
07-16 14:09:56.603 1318 1509 I WindowManager: WIN DEATH: Window{4090ec68 org.waldev.platformer/org.waldev.platformer.Platformer paused=false}
07-16 14:09:56.853 1318 1551 I ActivityManager: Start proc org.waldev.platformer for activity org.waldev.platformer/.Menu: pid=5332 uid=10103 gids={1015}
07-16 14:09:58.291 1318 1349 I ActivityManager: Displayed org.waldev.platformer/.Menu: +1s677ms
It just seems like it decided to destroy my process without it ever telling me why. I looked around to see what causes android to do this, but I didn't see anything.
I saw the other questions about this on here, but none of them seemed to really answer why it was doing it, and that's more of what I am looking for. Does anyone know?

Categories

Resources