引擎3.6.1,在mac模拟器mumu很容易出现闪退,看着好像和音频相关

09-28 22:57:58.932 5322-5467/com.cslindia.games W/System.err: java.io.IOException: unknown format (magic number 0)
09-28 22:57:58.932 5322-5467/com.cslindia.games W/System.err: at java.util.zip.GZIPInputStream.(GZIPInputStream.java:109)
09-28 22:57:58.932 5322-5467/com.cslindia.games W/System.err: at java.util.zip.GZIPInputStream.(GZIPInputStream.java:88)
09-28 22:57:58.932 5322-5467/com.cslindia.games W/System.err: at com.tencent.bugly.proguard.bj.b(BUGLY:28)
09-28 22:57:58.932 5322-5467/com.cslindia.games W/System.err: at com.tencent.bugly.proguard.ap.b(BUGLY:308)
09-28 22:57:58.932 5322-5467/com.cslindia.games W/System.err: at com.tencent.bugly.proguard.aj.run(BUGLY:4382)
09-28 22:57:58.932 5322-5467/com.cslindia.games W/System.err: at java.lang.Thread.run(Thread.java:818)

--------- beginning of crash

09-28 22:57:59.030 5322-5355/com.cslindia.games A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x26a6f7e66b79 in tid 5355 (Thread-148)
09-28 22:57:59.098 5322-5389/com.cslindia.games V/AudioMixerController: Play over …
09-28 22:57:59.099 5322-5389/com.cslindia.games V/AudioMixerController: Doesn’t have enough tracks: 1, 1

没有特定场景,赶紧玩着玩着就闪退了。堆栈也不看不出啥,有大佬遇到类似的吗

补充下模拟器的信息:
mac的网易mumu
android6.0.1
GL Version:OpenGL ES 2.0
在window的雷电模拟器就怎么都不会出现闪退,在mac上旧很容易出现

完整日志提供一份看下。

09-28 22:57:59.030 5322-5355/com.cslindia.games A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x26a6f7e66b79 in tid 5355 (Thread-148)

搜一下这里的相关堆栈 5322-5355

我在androidstudio看到的打印就这些,你是指去哪里搜索堆栈?

as看到的日志信息很少,我晚上在mac再试试看看有没有更详细的日志,目前就是上面的这些,很奇怪,也看不出到底在哪里出的问题,感觉像音频,之前版本3.6.0也出现过,但是看到3.6.1就升级看看,还是一样。

09-29 23:09:04.655 1727-1753/com.cslindia.games D/Cocos: 23:09:04 [DEBUG]: D/ JS: click exit btn
09-29 23:09:04.656 1727-1753/com.cslindia.games D/Cocos: 23:09:04 [DEBUG]: D/ JS: ==========send data to server==========
09-29 23:09:04.657 1727-1753/com.cslindia.games D/Cocos: 23:09:04 [DEBUG]: D/ JS: Pack_OnUserRequestLogout, code:127ca2b8 = {
}
09-29 23:09:04.689 1727-1753/com.cslindia.games D/Cocos: 23:09:04 [DEBUG]: D/ JS: ======receive data from server======
09-29 23:09:04.690 1727-1753/com.cslindia.games D/Cocos: 23:09:04 [DEBUG]: D/ JS: Pack_OnServerBCUserLogout = {
SeatId = 3
}
09-29 23:09:04.694 1727-1753/com.cslindia.games D/Cocos: 23:09:04 [DEBUG]: D/ JS: SceneMgr.enterScene: enterScene:hall, curScene:teenpatti
09-29 23:09:04.756 1727-1753/com.cslindia.games D/Cocos: 23:09:04 [DEBUG]: D/ JS: SocketMgr setIsPause, flag:true
09-29 23:09:04.851 1727-1753/com.cslindia.games E/v8: #
# Fatal error in , line 0
#
09-29 23:09:04.851 1727-1753/com.cslindia.games E/v8: Check failed: opcode == TranslationOpcode::BEGIN.
09-29 23:09:04.851 1727-1753/com.cslindia.games E/v8: #
#
#
#FailureMessage Object: 0x7f584f33e3d0
09-29 23:09:04.865 1727-1753/com.cslindia.games I/v8: # 00xfae746c
# 10xfae545c
# 20xfb54e9c
# 30xfb4cd90
# 40xff56e18

--------- beginning of crash

09-29 23:09:04.867 1727-1753/com.cslindia.games A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdead0000 in tid 1753 (Thread-104)
09-29 23:09:04.977 290-290/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-29 23:09:04.978 290-290/? A/DEBUG: Build fingerprint: ‘OnePlus/OnePlus2/OnePlus2:6.0.1/MMB29M/1447841200:user/release-keys’
09-29 23:09:04.978 290-290/? A/DEBUG: Revision: ‘0’
09-29 23:09:04.978 290-290/? A/DEBUG: ABI: ‘x86_64’
09-29 23:09:04.978 290-290/? A/DEBUG: pid: 1727, tid: 1753, name: Thread-104 >>> com.cslindia.games <<<
09-29 23:09:04.978 290-290/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xdead0000
09-29 23:09:05.033 290-290/? A/DEBUG: rax 0000000000000061 rbx 00007f5851a563e0 rcx 00007f586aa0edb0 rdx 00007f5851a67e98
09-29 23:09:05.033 290-290/? A/DEBUG: rsi 00007f5851a67e78 rdi 000000000000000b
09-29 23:09:05.034 290-290/? A/DEBUG: r8 00000000000000ba r9 00007f5865503580 r10 0000000000000008 r11 00007f586550a5f0
09-29 23:09:05.034 290-290/? A/DEBUG: r12 00007f5865bee290 r13 000000000fae6154 r14 00007f5865d041c8 r15 0000000000000000
09-29 23:09:05.034 290-290/? A/DEBUG: cs 0000000000000033 ss 000000000000002b
09-29 23:09:05.034 290-290/? A/DEBUG: rip 00007f58656dbdbd rbp 00007f5851a56060 rsp 00007f5851a67ed8 eflags 0000000000010212
09-29 23:09:05.034 290-290/? A/DEBUG: backtrace:
09-29 23:09:05.034 290-290/? A/DEBUG: #00 pc 0000000000109dbd /system/lib64/arm64/libhoudini.so (offset 0x22e000)
09-29 23:09:05.209 944-1847/? D/com.netease.nemu_vapi_android.thread.HttpServer: http server response data: {“errcode”:0,“message”:“OK”,“return”:{“active”:“com.cslindia.games”,“installed”:[{“appName”:“TapTap HD”,“packageName”:“com.taptap.pad”,“version”:“1.0.6”},{“appName”:“桃花源记”,“packageName”:“com.taole.pisces.taoletlp”,“version”:“2.1.1”},{“appName”:“Teen Patti Real Master”,“packageName”:“com.cslindia.games”,“version”:“1.0”}],“recent”:[]}}
09-29 23:09:05.228 290-290/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_08
09-29 23:09:05.228 290-290/? E/DEBUG: AM write failed: Broken pipe
09-29 23:09:05.238 639-695/? I/BootReceiver: Copying /data/tombstones/tombstone_08 to DropBox (SYSTEM_TOMBSTONE)
09-29 23:09:05.251 639-720/? W/InputDispatcher: channel ‘1b8701d com.cslindia.games/com.cocos.game.AppActivity (server)’ ~ Consumer closed input channel or an error occurred. events=0x9
09-29 23:09:05.251 639-720/? E/InputDispatcher: channel ‘1b8701d com.cslindia.games/com.cocos.game.AppActivity (server)’ ~ Channel is unrecoverably broken and will be disposed!
09-29 23:09:05.252 639-971/? D/GraphicsStats: Buffer count: 2
09-29 23:09:05.252 639-1192/? W/MediaFocusControl: AudioFocus audio focus client died
09-29 23:09:05.256 639-957/? I/WindowState: WIN DEATH: Window{1b8701d u0 com.cslindia.games/com.cocos.game.AppActivity}
09-29 23:09:05.256 639-957/? W/InputDispatcher: Attempted to unregister already unregistered input channel ‘1b8701d com.cslindia.games/com.cocos.game.AppActivity (server)’
09-29 23:09:05.257 944-944/? D/com.netease.nemu_vapi_android.service.AppService: dropbox tag: SYSTEM_TOMBSTONE
09-29 23:09:05.257 944-944/? D/com.netease.nemu_vapi_android.service.AppService: dropbox time: 1664464145257
09-29 23:09:05.257 944-944/? D/com.netease.nemu_vapi_android.service.AppService: dropbox file is not to be trackd
09-29 23:09:05.260 639-1192/? I/MediaFocusControl: AudioFocus removeFocusStackEntry(): removing entry for android.os.BinderProxy@8a1fa8c
09-29 23:09:05.270 639-957/? W/WindowManager: Force-removing child win Window{b9685d5 u0 SurfaceView} from container Window{1b8701d u0 com.cslindia.games/com.cocos.game.AppActivity}
09-29 23:09:05.274 296-296/? I/Zygote: Process 1727 exited due to signal (11)
09-29 23:09:05.284 639-972/? I/ActivityManager: Process com.cslindia.games (pid 1727) has died
09-29 23:09:05.284 639-972/? D/ActivityManager: cleanUpApplicationRecord – 1727
09-29 23:09:05.305 639-972/? W/ActivityManager: Force removing ActivityRecord{1e9e239 u0 com.cslindia.games/com.cocos.game.AppActivity t22}: app died, no saved state
09-29 23:09:05.317 639-1701/? W/WindowManager: Failed looking up window
java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@11ec292 does not exist
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8923)
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8914)
at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1216)
at android.os.BinderProxy.sendDeathNotice(Binder.java:558)
09-29 23:09:05.317 639-1701/? I/WindowState: WIN DEATH: null
09-29 23:09:05.319 639-692/? E/KernelUidCpuTimeReader: Failed to read uid_cputime: /proc/uid_cputime/show_uid_stat: open failed: ENOENT (No such file or directory)
09-29 23:09:05.372 944-944/? D/com.netease.nemu_vapi_android.service.AppService: dropbox tag: data_app_native_crash
09-29 23:09:05.372 944-944/? D/com.netease.nemu_vapi_android.service.AppService: dropbox time: 1664464145370
09-29 23:09:05.373 944-1852/? D/com.netease.nemu_vapi_android.service.AppService: dropbox file: /data/system/dropbox/data_app_native_crash@1664464145370.txt is to be tracked
09-29 23:09:05.374 639-693/? D/ActivityManager: Nemu don’t show crash dialog of ProcessRecord{bba3378 0:com.cslindia.games/u0a42}
09-29 23:09:05.384 639-1190/? W/InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 1727 uid 10042
09-29 23:09:05.429 958-1857/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1312 android.content.ContextWrapper.bindService:604 com.google.android.gms.common.h.a.d:4 com.google.android.gms.common.h.a.a:1 com.google.android.gms.measurement.internal.r8.d:9
09-29 23:09:05.430 639-972/? D/Interception: result: allow, reason: callerPkg == calleePkg, rule: runType===retrieveService|||callerPkg===com.mumu.launcher|||calleePkg===com.mumu.launcher|||calleeClass===com.google.android.gms.measurement.AppMeasurementService|||action===com.google.android.gms.measurement.START
09-29 23:09:05.468 639-692/? D/Interception: result: allow, reason: calleePkg is system app, rule: runType===broadcast|||callerPkg===android|||calleePkg===com.mumu.acc|||calleeClass===com.mumu.acc.AccMsgReceiver|||action===uu.intent.action.STOP_ACCELERATE
09-29 23:09:05.481 944-1044/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: upload event: {“architecture”:“x86_64”,“channel”:“mac-taptap”,“country”:"",“engine”:“MAC”,“language”:“zh-Hans”,“package”:“mac-nopackage”,“usage”:“0”,“uuid”:“1abf86d47566585b8201d42fd54141fa”,“version”:“1.9.57”,“x”:{“app_elapse”:496,“app_name”:“Teen Patti Real Master”,“app_package”:“com.cslindia.games”,“error”:{“code”:0,“msg”:“ok”},“token”:""}} type: ExitAPP sign: EXsnWnI6zV49VizaDElcbw8YfRc= uid: 1000 json:{“app_elapse”:496,“app_name”:“Teen Patti Real Master”,“app_package”:“com.cslindia.games”,“error”:{“code”:0,“msg”:“ok”},“token”:""}
09-29 23:09:05.485 639-687/? I/com.android.server.tabs.TabManagerService: notifyClosing:797: notify tab closed in android as it’s closed task com.cslindia.games, taskId: 22, elapseTime: 496829
09-29 23:09:05.489 1117-1117/? D/AccService: AccMsgReceiver: uu.intent.action.STOP_ACCELERATE
09-29 23:09:05.491 1117-1249/? D/DeviceHelper: getPort:
09-29 23:09:05.494 944-1853/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: prepare upload logcat: /storage/emulated/0/Android/data/com.netease.nemu_vapi_android.nemu/cache/data_app_native_crash@1664464145370.txt
09-29 23:09:05.499 944-1847/? D/com.netease.nemu_vapi_android.thread.HttpServer: http server response data: {“errcode”:0,“message”:“OK”}
09-29 23:09:05.515 944-1847/? D/com.netease.nemu_vapi_android.thread.HttpServer: http server response data: {“errcode”:0,“message”:“OK”}
09-29 23:09:05.618 944-1044/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: upload server response: {“errcode”: 100, “errmsg”: “ok”}
09-29 23:09:05.618 944-1044/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: upload result: true
09-29 23:09:05.861 944-1853/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: upload file: /storage/emulated/0/Android/data/com.netease.nemu_vapi_android.nemu/cache/data_app_native_crash@1664464145370.txt 2 server response: {“url”: “https://mumu.nie.netease.com/api/filepicker/APPCrashLog/logcat/2022-09-29/LZkR3BBwltBxy3PO.txt”, “errcode”: 100, “errmsg”: “ok”}
09-29 23:09:05.861 944-1853/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: prepare upload log: /data/system/dropbox/data_app_native_crash@1664464145370.txt
09-29 23:09:05.892 944-1853/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: upload file: /data/system/dropbox/data_app_native_crash@1664464145370.txt 2 server response: {“url”: “https://mumu.nie.netease.com/api/filepicker/APPCrashLog/log/2022-09-29/GyZdMTeHyLtn6u85.txt”, “errcode”: 100, “errmsg”: “ok”}
09-29 23:09:05.893 944-1044/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: upload event: {“architecture”:“x86_64”,“channel”:“mac-taptap”,“country”:"",“engine”:“MAC”,“language”:“zh-Hans”,“package”:“mac-nopackage”,“usage”:“0”,“uuid”:“1abf86d47566585b8201d42fd54141fa”,“version”:“1.9.57”,“x”:{“app_elapse”:606,“app_name”:“Teen Patti Real Master”,“app_package”:“com.cslindia.games”,“error”:{“code”:0,“msg”:“ok”},“log”:“https://mumu.nie.netease.com/api/filepicker/APPCrashLog/log/2022-09-29/GyZdMTeHyLtn6u85.txt",“logcat”:“https://mumu.nie.netease.com/api/filepicker/APPCrashLog/logcat/2022-09-29/LZkR3BBwltBxy3PO.txt”,“token”:"”}} type: APPCrashLog sign: Gx25LZPGl6D2u295X7rNhHL6DYA= uid: 1000 json:{“app_elapse”:606,“app_name”:“Teen Patti Real Master”,“app_package”:“com.cslindia.games”,“error”:{“code”:0,“msg”:“ok”},“log”:“https://mumu.nie.netease.com/api/filepicker/APPCrashLog/log/2022-09-29/GyZdMTeHyLtn6u85.txt",“logcat”:“https://mumu.nie.netease.com/api/filepicker/APPCrashLog/logcat/2022-09-29/LZkR3BBwltBxy3PO.txt”,“token”:"”}
09-29 23:09:05.925 944-1044/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: upload server response: {“errcode”: 100, “errmsg”: “ok”}
09-29 23:09:05.925 944-1044/? D/com.netease.nemu_android_watchdog_lib.core.Watchdog: upload result: true


我把声音相关的代码给注释掉了,确实没那么容易闪退了,但是还是偶现闪退了,请问下这个要如何查找?

看上去是libhoudini库崩

这个库就是将arm指令转成x86指令以保障app可运行在PC上,试试ndk构建带上x86 ABI


我都是全部勾选的,ndk版本用的是

确认一下,打包出来的 apk 中 lib 目录下是否包含了 x86 和 x86_64 目录及 so 文件。
如果是直接用了 x86 或者 x86_64 的 so,不应该出现用 libhoudini.so 去模拟 arm 指令。

不好意思,之前以为没有回复就没有看了,libcocos.so是有包含x86和x86_64的,但是我看了下,我接入的bugly是没有x86和x86_64的,你的意思是bugly因为没有这两个so,所以导致的闪退?

是的,so 的架构需要全部满足才行,如果bugly没有相关架构,引擎的 x86 x86_64 的 so 就算存在也不会被使用。所以需要跟 bugly 确认一下是否有 x86 的版本或者切换另外包含 x86 架构的崩溃系统。

这样的话,我试下先把bugly注销掉再测试下闪退问题,看看是不是缺少bugly的x86 so导致的。

确实把bugly去掉就正常了