Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
581 views
in Technique[技术] by (71.8m points)

android - 游戏因未知原因在启动时崩溃(Game crashes on start for unknown reason)

I have a unity3d project which, up to previous build, ran with no issues on android.

(我有一个unity3d项目,在以前的构建中,它在android上运行都没有问题。)

It is already set up to use the new google play store package format, which gets correctly accepted on the play store.

(已经设置为使用新的Google Play商店打包格式,该格式会在Play商店中正确接受。)

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.

(以前的构建(即使已填充所有Play商店设置)在内置于纯非Play商店.apk中并复制到设备并从文件安装时也可以正常工作。)

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.

(之后,我所做的唯一更改是在代码的if条件中添加了一个子句(这只是“ if(false && originalCondition)”,其目的是禁用该部分代码,这与问题无关,它是处理游戏中开始和停止粒子效果的部分代码),现在当我将其构建为apk并手动将其安装在手机上并尝试运行时,它立即以屏幕闪烁的典型方式崩溃它会在创建窗口时变黑,然后回到手机的桌面。)

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)

((如果此请求不违反某些SO规则))

Below is content of the logcat from adb bridge, caught via Android Studio, filtered on the term "unity".

(以下是通过Android Studio捕获的来自adb桥的logcat的内容,以术语“统一”进行了过滤。)

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([email protected]) [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: ActivityRec

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...