3.3.1 BUG -> Samsung A12(Android 11)

100% 错误率
PROP_TARGET_SDK_VERSION=30
PROP_BUILD_TOOLS_VERSION=30.0.2

CreateProgramShaderUniformBridge: recompiled revision contains on-opaque uniform which cannot be found in initial revision
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10 in tid 21686 (RenderThread), pid 20655 

一启动就崩溃嘛?还是?

开始游戏时崩溃。 请访问了解更多详情。
请现在帮我解决这个问题,我的老板给我 24 小时来解决这个问题或者解雇我,他想使用 Unity 引擎

你好,照着你描述的步骤测试,目前没有出现崩溃现象;
测试机型:
oppo reno3 pro 5G ,Android 11,高通SDM765G 5G 八核
vivo s9 ,Android 11,联发科 天玑1100 八核

人都说了是三星的手机,你这唯独没测三星

没有这个机型。 :sweat_smile:不是不想测。

此错误仅出现在三星 A12 或 Oppo A93 上。 我发誓它出现在三星 A12(Android 11)上。

请帮我仔细检查,错误率非常大并且来自引擎。 您可以尝试查找 SamsungA12, Oppo A93、Oppo A94 上出现的错误。

没有以上机型的测试机,另外拿了 Samsung s10 也没复现,你这边方便提供下详细的报错堆栈吗?

感谢您对此漏洞的关注。 希望你能帮我修复它。 我提交的详细错误如下。
我录制了屏幕并将其上传到 Dropbox
https://www.dropbox.com/s/ke2mlpq0dxlqgej/Bugvideo.mp4?dl=1

2021-10-11 15:09:13.300 32316-32316/? I/m.cocos.androi: Late-enabling -Xcheck:jni
2021-10-11 15:09:13.371 32316-32316/? I/m.cocos.androi: Unquickening 24 vdex files!
2021-10-11 15:09:13.407 32316-32316/? D/ActivityThread: setConscryptValidator
2021-10-11 15:09:13.408 32316-32316/? D/ActivityThread: setConscryptValidator - put
2021-10-11 15:09:13.574 32316-32316/com.cocos.android D/ActivityThread: handleBindApplication()++ app=com.cocos.android
2021-10-11 15:09:13.715 32316-32316/com.cocos.android D/LoadedApk: LoadedApk::makeApplication() appContext=android.app.ContextImpl@c9215f8 appContext.mOpPackageName=com.cocos.android appContext.mBasePackageName=com.cocos.android appContext.mPackageInfo=android.app.LoadedApk@2b51ad1
2021-10-11 15:09:13.715 32316-32316/com.cocos.android D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-10-11 15:09:13.805 32316-32316/com.cocos.android D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2021-10-11 15:09:13.805 32316-32316/com.cocos.android D/ActivityThread: handleBindApplication() -- skipGraphicsSupport=false
2021-10-11 15:09:13.836 32316-1777/com.cocos.android D/libMEOW: meow reload base cfg path: na
2021-10-11 15:09:13.836 32316-1777/com.cocos.android D/libMEOW: meow reload overlay cfg path: na
2021-10-11 15:09:13.836 32316-1773/com.cocos.android D/libMEOW: meow reload base cfg path: na
2021-10-11 15:09:13.836 32316-1773/com.cocos.android D/libMEOW: meow reload overlay cfg path: na
2021-10-11 15:09:13.838 32316-1777/com.cocos.android D/libMEOW: applied 1 plugins for [com.cocos.android]:
2021-10-11 15:09:13.838 32316-1777/com.cocos.android D/libMEOW:   plugin 1: [libMEOW_gift.so]:
2021-10-11 15:09:13.838 32316-1773/com.cocos.android D/libMEOW: applied 1 plugins for [com.cocos.android]:
2021-10-11 15:09:13.838 32316-1773/com.cocos.android D/libMEOW:   plugin 1: [libMEOW_gift.so]:
2021-10-11 15:09:13.863 32316-1773/com.cocos.android I/libMEOW_gift: ctx:0xb400007aa9d35180, ARC not Enabled.
2021-10-11 15:09:14.109 32316-32316/com.cocos.android I/DecorView: [INFO] isPopOver=false, config=true
2021-10-11 15:09:14.110 32316-32316/com.cocos.android I/DecorView: updateCaptionType >> DecorView@e39490e[], isFloating=false, isApplication=true, hasWindowDecorCaption=false, hasWindowControllerCallback=true
2021-10-11 15:09:14.110 32316-32316/com.cocos.android D/DecorView: setCaptionType = 0, this = DecorView@e39490e[]
2021-10-11 15:09:14.180 32316-1853/com.cocos.android I/CocosActivity JNI: APP_CMD_RESUME
2021-10-11 15:09:14.180 32316-1853/com.cocos.android I/CocosActivity JNI: appState=11
2021-10-11 15:09:14.190 32316-32316/com.cocos.android D/SensorManager: registerListener :: 1, LIS2DLC12 Accelerometer, 20000, 0, com.cocos.lib.CocosSensorHandler@629793c
2021-10-11 15:09:14.191 32316-32316/com.cocos.android E/SensorManager: sensor is null
2021-10-11 15:09:14.191 32316-32316/com.cocos.android E/SensorManager: sensor is null
2021-10-11 15:09:14.195 32316-32316/com.cocos.android D/SensorManager: registerListener :: 1, LIS2DLC12 Accelerometer, 200000, 0, android.view.OrientationEventListener$SensorEventListenerImpl@30116c5
2021-10-11 15:09:14.226 32316-32316/com.cocos.android D/InputTransport: Input channel constructed: 'b0e2ecc', fd=86
2021-10-11 15:09:14.232 32316-32316/com.cocos.android I/ViewRootImpl@1b2ed28[AppActivity]: setView = com.android.internal.policy.DecorView@e39490e TM=true
2021-10-11 15:09:14.249 32316-32316/com.cocos.android I/SurfaceView: onWindowVisibilityChanged(0) true com.cocos.lib.CocosSurfaceView{c396be6 V.E...... ......I. 0,0-0,0} of ViewRootImpl@1b2ed28[AppActivity]
2021-10-11 15:09:14.259 32316-32316/com.cocos.android D/ViewRootImpl@1b2ed28[AppActivity]: controlInsetsForCompatibility: hideByFlags=0x3, showByFlags=0x0, flags=0x1810500, sysUiVis=0x1706, matchParent=true, nonAttachedAppWindow=true
2021-10-11 15:09:14.261 32316-32316/com.cocos.android D/InsetsSourceConsumer: setRequestedVisible: visible=false, type=1, host=com.cocos.android/com.cocos.game.AppActivity, from=android.view.InsetsSourceConsumer.hide:236 android.view.InsetsController.collectSourceControls:1172 android.view.InsetsController.controlAnimationUnchecked:1049 android.view.InsetsController.applyAnimation:1417 android.view.InsetsController.hide:984 android.view.InsetsController.hide:967 android.view.ViewRootImpl.controlInsetsForCompatibility:2852 android.view.ViewRootImpl.performTraversals:3314 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 
2021-10-11 15:09:14.262 32316-32316/com.cocos.android D/InsetsSourceConsumer: setRequestedVisible: visible=false, type=0, host=com.cocos.android/com.cocos.game.AppActivity, from=android.view.InsetsSourceConsumer.hide:236 android.view.InsetsController.collectSourceControls:1172 android.view.InsetsController.controlAnimationUnchecked:1049 android.view.InsetsController.applyAnimation:1417 android.view.InsetsController.hide:984 android.view.InsetsController.hide:967 android.view.ViewRootImpl.controlInsetsForCompatibility:2852 android.view.ViewRootImpl.performTraversals:3314 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 
2021-10-11 15:09:14.284 32316-32316/com.cocos.android I/SurfaceControl: assignNativeObject: nativeObject = 0 Surface(name=null)/@0xd373527 / android.view.SurfaceControl.readFromParcel:1117 android.view.IWindowSession$Stub$Proxy.relayout:1820 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995 
2021-10-11 15:09:14.289 32316-32316/com.cocos.android I/ViewRootImpl@1b2ed28[AppActivity]: Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)0 dur=21 res=0x7 s={true -5476376617499754496} ch=true fn=-1
2021-10-11 15:09:14.294 32316-32316/com.cocos.android I/SurfaceView: windowStopped(false) true com.cocos.lib.CocosSurfaceView{c396be6 V.E...... ......I. 0,0-0,0} of ViewRootImpl@1b2ed28[AppActivity]
2021-10-11 15:09:14.327 32316-32316/com.cocos.android I/SurfaceView: surfaceCreated 1 #8 com.cocos.lib.CocosSurfaceView{c396be6 V.E...... ......ID 0,0-720,1600}
2021-10-11 15:09:14.328 32316-1853/com.cocos.android I/CocosActivity JNI: APP_CMD_INIT_WINDOW
2021-10-11 15:09:14.328 32316-32316/com.cocos.android I/SurfaceView: surfaceChanged (720,1600) 1 #8 com.cocos.lib.CocosSurfaceView{c396be6 V.E...... ......ID 0,0-720,1600}
2021-10-11 15:09:14.331 32316-1853/com.cocos.android D/jswrapper: Initializing V8, version: 8.0.426.16
2021-10-11 15:09:14.351 32316-1773/com.cocos.android E/ion: ioctl c0044901 failed with code -1: Invalid argument
2021-10-11 15:09:14.356 32316-1890/com.cocos.android I/SurfaceView: applySurfaceTransforms: t = android.view.SurfaceControl$Transaction@5ddb3d4 surfaceControl = Surface(name=SurfaceView - com.cocos.android/com.cocos.game.AppActivity@c396be6@0)/@0x628597d frame = 1
2021-10-11 15:09:14.418 32316-32316/com.cocos.android I/ViewRootImpl@1b2ed28[AppActivity]: MSG_RESIZED_REPORT: frame=(0,0,720,1600) ci=(0,45,0,0) vi=(0,0,0,0) or=1
2021-10-11 15:09:14.489 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject s[-5476376617499172096]
2021-10-11 15:09:14.489 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject e[-5476376617499172096]
2021-10-11 15:09:14.491 32316-32316/com.cocos.android I/SurfaceControl: assignNativeObject: nativeObject = 0 Surface(name=null)/@0xd373527 / android.view.SurfaceControl.readFromParcel:1117 android.view.IWindowSession$Stub$Proxy.relayout:1820 android.view.ViewRootImpl.relayoutWindow:9005 android.view.ViewRootImpl.performTraversals:3360 android.view.ViewRootImpl.doTraversal:2618 android.view.ViewRootImpl$TraversalRunnable.run:9971 android.view.Choreographer$CallbackRecord.run:1010 android.view.Choreographer.doCallbacks:809 android.view.Choreographer.doFrame:744 android.view.Choreographer$FrameDisplayEventReceiver.run:995 
2021-10-11 15:09:14.496 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject s[-5476376620048375616]
2021-10-11 15:09:14.496 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject e[-5476376620048375616]
2021-10-11 15:09:14.497 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject s[-5476376620048375808]
2021-10-11 15:09:14.497 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject e[-5476376620048375808]
2021-10-11 15:09:14.497 32316-32316/com.cocos.android I/ViewRootImpl@1b2ed28[AppActivity]: Relayout returned: old=(0,0,720,1600) new=(0,0,720,1600) req=(720,1600)0 dur=63 res=0x1 s={true -5476376617499754496} ch=false fn=2
2021-10-11 15:09:14.528 32316-32316/com.cocos.android I/ViewRootImpl@1b2ed28[AppActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
2021-10-11 15:09:14.529 32316-32316/com.cocos.android D/InputMethodManager: prepareNavigationBarInfo() DecorView@e39490e[AppActivity]
2021-10-11 15:09:14.529 32316-32316/com.cocos.android D/InputMethodManager: getNavigationBarColor() -855310
2021-10-11 15:09:14.531 32316-32316/com.cocos.android D/InputMethodManager: prepareNavigationBarInfo() DecorView@e39490e[AppActivity]
2021-10-11 15:09:14.532 32316-32316/com.cocos.android D/InputMethodManager: getNavigationBarColor() -855310
2021-10-11 15:09:14.532 32316-32316/com.cocos.android V/InputMethodManager: Starting input: tba=com.cocos.android ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : false , NavTrans : false
2021-10-11 15:09:14.532 32316-32316/com.cocos.android D/InputMethodManager: startInputInner - Id : 0
2021-10-11 15:09:14.532 32316-32316/com.cocos.android I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
2021-10-11 15:09:14.600 32316-1705/com.cocos.android D/InputTransport: Input channel constructed: 'ClientS', fd=96
2021-10-11 15:09:14.603 32316-32316/com.cocos.android D/InputMethodManager: prepareNavigationBarInfo() DecorView@e39490e[AppActivity]
2021-10-11 15:09:14.603 32316-32316/com.cocos.android D/InputMethodManager: getNavigationBarColor() -855310
2021-10-11 15:09:14.603 32316-32316/com.cocos.android V/InputMethodManager: Starting input: tba=com.cocos.android ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : false , NavTrans : false
2021-10-11 15:09:14.603 32316-32316/com.cocos.android D/InputMethodManager: startInputInner - Id : 0
2021-10-11 15:09:14.628 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject s[-5476376617499168832]
2021-10-11 15:09:14.628 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject e[-5476376617499168832]
2021-10-11 15:09:14.628 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject s[-5476376617499172096]
2021-10-11 15:09:14.628 32316-32316/com.cocos.android I/SurfaceControl: nativeRelease nativeObject e[-5476376617499172096]
2021-10-11 15:09:14.779 32316-1921/com.cocos.android I/SurfaceControl: nativeRelease nativeObject s[-5476376617499169024]
2021-10-11 15:09:14.780 32316-1921/com.cocos.android I/SurfaceControl: nativeRelease nativeObject e[-5476376617499169024]
2021-10-11 15:09:17.536 32316-1853/com.cocos.android D/jswrapper: JS: [INFO]: [PHYSICS]: register ammo.js.
2021-10-11 15:09:17.812 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: In the default constructor of Map!
2021-10-11 15:09:17.818 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: In the default constructor of Map!
2021-10-11 15:09:17.855 32316-1853/com.cocos.android W/m.cocos.androi: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, reflection, allowed)
2021-10-11 15:09:17.856 32316-1853/com.cocos.android W/m.cocos.androi: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, reflection, allowed)
2021-10-11 15:09:17.856 32316-1853/com.cocos.android W/m.cocos.androi: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (greylist,core-platform-api, reflection, allowed)
2021-10-11 15:09:17.864 32316-1853/com.cocos.android D/Cocos: 15:09:17 [DEBUG]: find in flash memory dirPath(/data/user/0/com.cocos.android/files/temp)
2021-10-11 15:09:17.865 32316-1853/com.cocos.android D/Cocos: 15:09:17 [DEBUG]: find in flash memory dirPath(/data/user/0/com.cocos.android/files/temp)
2021-10-11 15:09:17.870 32316-1853/com.cocos.android D/jswrapper: JS: [WARN]: Read json failed: path: /data/user/0/com.cocos.android/files/gamecaches/cacheList.json message: Unexpected end of JSON input
2021-10-11 15:09:17.871 32316-1853/com.cocos.android D/Cocos: 15:09:17 [DEBUG]: find in flash memory dirPath(/data/user/0/com.cocos.android/files/gamecaches)
2021-10-11 15:09:17.874 32316-1853/com.cocos.android D/libMEOW: applied 1 plugins for [com.cocos.android]:
2021-10-11 15:09:17.874 32316-1853/com.cocos.android D/libMEOW:   plugin 1: [libMEOW_gift.so]:
2021-10-11 15:09:17.938 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: Setup EGLConfig: depth [24] stencil [8] sampleBuffer [1] sampleCount [4]
2021-10-11 15:09:17.938 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: Chosen EGLConfig: color [RGBA8], depth stencil [D24S8].
2021-10-11 15:09:17.947 32316-1853/com.cocos.android I/libMEOW_gift: ctx:0xb400007a3a7cf080, ARC not Enabled.
2021-10-11 15:09:17.951 32316-1853/com.cocos.android D/Cocos: 15:09:17 [DEBUG]: eglMakeCurrent() - SUCCEEDED, Context: 0x0x7a4a71e3e0
2021-10-11 15:09:17.951 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: GLES3 device initialized.
2021-10-11 15:09:17.952 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: RENDERER: PowerVR Rogue GE8320
2021-10-11 15:09:17.952 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: VENDOR: Imagination Technologies
2021-10-11 15:09:17.952 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: VERSION: OpenGL ES 3.2 build 1.13@5776728
2021-10-11 15:09:17.952 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: SCREEN_SIZE: 720 x 1600
2021-10-11 15:09:17.952 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: COMPRESSED_FORMATS: etc1 etc2 pvrtc astc 
2021-10-11 15:09:17.952 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: PIXEL_LOCAL_STORAGE: level 2, size 32
2021-10-11 15:09:17.952 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: FRAMEBUFFER_FETCH: COHERENT
2021-10-11 15:09:17.953 32316-1853/com.cocos.android D/Cocos: 15:09:17 [DEBUG]: eglMakeCurrent() - UNBOUNDED, Context: 0x0x7a4a71e3e0
2021-10-11 15:09:17.954 32316-1853/com.cocos.android I/Cocos: 15:09:17 [INFO]: Device validator enabled.
2021-10-11 15:09:18.086 32316-1853/com.cocos.android D/jswrapper: JS: Cocos Creator v3.3.1
2021-10-11 15:09:18.104 32316-1853/com.cocos.android D/jswrapper: JS: [INFO]: [PHYSICS]: using ammo.js.
2021-10-11 15:09:18.172 32316-2342/com.cocos.android D/libMEOW: applied 1 plugins for [com.cocos.android]:
2021-10-11 15:09:18.172 32316-2342/com.cocos.android D/libMEOW:   plugin 1: [libMEOW_gift.so]:
2021-10-11 15:09:18.178 32316-2342/com.cocos.android I/libMEOW_gift: ctx:0xb400007a3a7cfd00, ARC not Enabled.
2021-10-11 15:09:18.178 32316-2342/com.cocos.android D/Cocos: 15:09:18 [DEBUG]: eglMakeCurrent() - SUCCEEDED, Context: 0x0x7a322c7f60
2021-10-11 15:09:18.178 32316-2342/com.cocos.android I/Cocos: 15:09:18 [INFO]: Device thread detached.
2021-10-11 15:09:18.212 32316-2342/com.cocos.android I/Cocos: 15:09:18 [INFO]: Shader 'splash-screen|splash-screen-vs:vert|splash-screen-fs:frag' compilation succeeded.
2021-10-11 15:09:18.215 32316-2342/com.cocos.android I/Cocos: 15:09:18 [INFO]: Taskflow Job system initialized: 6 worker threads
2021-10-11 15:09:18.238 32316-1904/com.cocos.android E/IMGSRV: :13480: CreateProgramShaderUniformBridge: recompiled revision contains on-opaque uniform which cannot be found in initial revision
    
    
    --------- beginning of crash
2021-10-11 15:09:18.244 32316-1904/com.cocos.android A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10 in tid 1904 (RenderThread), pid 32316 (m.cocos.android)

这边需要选择 no filters。

谢谢,这是日志文件Logs.zip (63.4 KB)

修改下这边,重新打包试试,最好删掉之前的build;
文件路径:\resources\resources\3d\engine-native\cocos\renderer\GFXDeviceManager.h

感谢您耐心地帮助我。 我已按照说明进行操作,但仍然无法解决问题。


I have the same issue, please help me!

试试这样:

判断是这种三星手机,强制以OpenGL ES2启动
engine-native/cocos/renderer/GFXDeviceManager.h

After checking, I found that all devices with this error are using Mediatek MT67x chip

I noticed that you replied on this forum that this problem has been solved by only using the GLES2.0 rendering backend.
What I’m curious about is, how do you judge which devices start the app with opengles2? Get the chip model?

Creator 3.3.1 Crash On Samsung A12 (Android 11) - Cocos Creator - Cocos Forums (cocos2d-x.org)

My game is released on google play in beta. I received a warning from google about crashes from the above devices, here are the warning statistics from google. If you have one of the above devices, try to debug it with AndroidStudio and CocosCreator 3.3.1. The above devices are all cheap, and Cocos development engineers all use expensive devices, so they may not detect this error. Many thanks to the support team that helped me solve this problem. Hopefully there will be a fix for Creator to work more stable.