GLProgram渲染过程中引起概率性崩溃

panshengneng
Fri, 13 Apr 2018 08:14:53 +0000

Creator 版本：1.8、1.8.1、1.8.2、1.9

目标平台：IOS、Android

重现方式：概率性

手机型号：IOS所有机型、ANDROID部分机型测试过

详细报错信息，包含调用堆栈：

Operating system: iOS
11.1.2 15B202
CPU: arm64
2 CPUs

Crash reason: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
Crash address: 0xfffffffff93e8600
Process uptime: 383 seconds

Thread 0 (crashed)
0 libsystem_platform.dylib!_platform_memmove + 0xb0
x0 = 0x00000001c2a7e6c0 x1 = 0xfffffff2f93e8600
x2 = 0x0000000000000040 x3 = 0x00000001c2a7e6e0
x4 = 0x000000016f48189f x5 = 0x00000001a15cd350
x6 = 0x0000000000000000 x7 = 0x00000001c01ddb50
x8 = 0x0000000000000000 x9 = 0x0000403c5f0f0000
x10 = 0x0000403c5f0f0000 x11 = 0x0000000000000000
x12 = 0x0000000000000000 x13 = 0x0000000000000004
x14 = 0x0000000000000000 x15 = 0x000000010f705d40
x16 = 0x0000000180eedab0 x17 = 0x0000000000000007
x18 = 0x0000000000000000 x19 = 0x00000001c03a6540
x20 = 0x00000001c03a64a0 x21 = 0xfffffff2f93e8600
x22 = 0x0000000000000040 x23 = 0x00000001c2a7e6c0
x24 = 0x00000001132b0098 x25 = 0x00000001132b00a0
x26 = 0x00000000ed453e28 x27 = 0x00000000ed453e28
x28 = 0x0000000000000000 fp = 0x000000016f4817a0
lr = 0x00000001012b5394 sp = 0x000000016f4817a0
pc = 0x0000000180eedb60
Found by: given as instruction pointer in context
1 game!cocos2d::GLProgram::updateUniformLocation(int, void const*, unsigned int) + 0xb0
fp = 0x000000016f481810 lr = 0x00000001012b5394
sp = 0x000000016f4817b0 pc = 0x00000001012b5394
Found by: previous frame’s frame pointer
2 game!cocos2d::GLProgram::updateUniformLocation(int, void const*, unsigned int) + 0xb0
fp = 0x000000016f481840 lr = 0x00000001012b5d20
sp = 0x000000016f481820 pc = 0x00000001012b5394
Found by: previous frame’s frame pointer
3 game!cocos2d::GLProgram::setUniformLocationWithMatrix4fv(int, float const*, unsigned int) + 0x20
fp = 0x000000016f481900 lr = 0x00000001012b5de4
sp = 0x000000016f481850 pc = 0x00000001012b5d20
Found by: previous frame’s frame pointer
4 game!cocos2d::GLProgram::setUniformsForBuiltins(cocos2d::Mat4 const&) + 0x5c
fp = 0x000000016f481920 lr = 0x000000010129f1e4
sp = 0x000000016f481910 pc = 0x00000001012b5de4
Found by: previous frame’s frame pointer
5 game!cocos2d::GLProgramState::apply(cocos2d::Mat4 const&) + 0x28
fp = 0x000000016f4819a0 lr = 0x00000001013a28a0
sp = 0x000000016f481930 pc = 0x000000010129f1e4
Found by: previous frame’s frame pointer
6 game!cocos2d::Renderer::drawBatchedTriangles() + 0x300
fp = 0x000000016f4819e0 lr = 0x00000001013a24a8
sp = 0x000000016f4819b0 pc = 0x00000001013a28a0
Found by: previous frame’s frame pointer
7 game!cocos2d::Renderer::processRenderCommand(cocos2d::RenderCommand*) + 0x88
fp = 0x000000016f481a10 lr = 0x00000001013a2b08
sp = 0x000000016f4819f0 pc = 0x00000001013a24a8
Found by: previous frame’s frame pointer
8 game!cocos2d::Renderer::visitRenderQueue(cocos2d::RenderQueue&) + 0x198
fp = 0x000000016f481a40 lr = 0x00000001013a2c0c
sp = 0x000000016f481a20 pc = 0x00000001013a2b08
Found by: previous frame’s frame pointer
9 game!cocos2d::Renderer::render() + 0x64
fp = 0x000000016f481a70 lr = 0x0000000101354b14
sp = 0x000000016f481a50 pc = 0x00000001013a2c0c
Found by: previous frame’s frame pointer
10 game!cocos2d::Scene::render(cocos2d::Renderer*, cocos2d::Mat4 const&, cocos2d::Mat4 const*) + 0x60
fp = 0x000000016f481a90 lr = 0x00000001012eae1c
sp = 0x000000016f481a80 pc = 0x0000000101354b14
Found by: previous frame’s frame pointer
11 game!cocos2d::Director::drawScene() + 0xb0
fp = 0x000000016f481ab0 lr = 0x00000001012ecb9c
sp = 0x000000016f481aa0 pc = 0x00000001012eae1c
Found by: previous frame’s frame pointer
12 game!cocos2d::Director::mainLoop() + 0x84
fp = 0x000000016f481b50 lr = 0x00000001851a9904
sp = 0x000000016f481ac0 pc = 0x00000001012ecb9c
Found by: previous frame’s frame pointer
13 QuartzCore!CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 0x29c
fp = 0x000000016f481ba0 lr = 0x00000001815381cc
sp = 0x000000016f481b60 pc = 0x00000001851a9904
Found by: previous frame’s frame pointer
14 IOKit!IODispatchCalloutFromCFMessage + 0x184
fp = 0x000000016f481bf0 lr = 0x000000018125c010
sp = 0x000000016f481bb0 pc = 0x00000001815381cc
Found by: previous frame’s frame pointer
15 CoreFoundation!__CFMachPortPerform + 0xb8
fp = 0x000000016f481c10 lr = 0x000000018127696c
sp = 0x000000016f481c00 pc = 0x000000018125c010
Found by: previous frame’s frame pointer

详细报错信息，包含调用堆栈：
Operating system: Android
0.0.0 Linux 3.18.35 #2 SMP PREEMPT Wed Jan 17 17:57:27 HKT 2018 armv8l
CPU: arm
ARMv1 ARM part(0x4100d030) features: half,thumb,fastmult,vfpv2,edsp,neon,vfpv3,tls,vfpv4,idiva,idivt
8 CPUs

GPU: UNKNOWN

Crash reason: SIGSEGV
Crash address: 0x16dfc
Process uptime: not available

Thread 107 (crashed)
crashed thread info start
frame_count = 190
0 libc.so + 0x16f48 (memcmp+0x00000180)
r0 = 0x00000002 r1 = 0x00016dfc r2 = 0x00000030 r3 = 0x00000000
r4 = 0xc7622640 r5 = 0xc7622640 r6 = 0x00000000 r7 = 0x00016dfe
r8 = 0xc15a1884 r9 = 0xc9ab908c r10 = 0x000002e6 r12 = 0xc3169a64
fp = 0xc2f1ad48 sp = 0xc9ab9080 lr = 0xc2ccaba0 pc = 0xea1f5f48
Found by: given as instruction pointer in context
1 libcocos2djs.so!cocos2d::GLProgram::updateUniformLocation [CCGLProgram.cpp : 655 + 0xe]
sp = 0xc9ab9088 pc = 0xc2ccaba0
Found by: stack scanning
2 libcocos2djs.so!cocos2d::GLProgram::setUniformLocationWithMatrix4fv [CCGLProgram.cpp : 853 + 0x2]
r4 = 0x00000001 r5 = 0x00016dfe r6 = 0x00000000 r7 = 0xc5679ea0
r8 = 0x00016dfe r9 = 0xc2f1ad5c r10 = 0x000002e6 sp = 0xc9ab90b0
pc = 0xc2ccb49c
Found by: call frame info
3 libcocos2djs.so!cocos2d::GLProgram::setUniformsForBuiltins [CCGLProgram.cpp : 871 + 0x12]
r4 = 0xc15a1800 r5 = 0xea26d008 r6 = 0x00000007 r7 = 0xc5679ea0
r8 = 0x00016dfe r9 = 0xc2f1ad5c r10 = 0x000002e6 sp = 0xc9ab90c0
pc = 0xc2ccb75c
Found by: call frame info
4 libcocos2djs.so!cocos2d::GLProgramState::apply [CCGLProgramState.cpp : 453 + 0x2]
r4 = 0xc0cef140 r5 = 0x00000000 r6 = 0x00000007 r7 = 0xbda00000
r8 = 0x00000000 r9 = 0xc2f1ad5c r10 = 0x000002e6 fp = 0xc2f1ad48
sp = 0xc9ab9168 pc = 0xc2cd1734
Found by: call frame info
5 libcocos2djs.so!cocos2d::Renderer::drawBatchedTriangles [CCRenderer.cpp : 743 + 0x2]
r4 = 0xbdbb0000 r5 = 0x00000000 r6 = 0x00000007 r7 = 0xbda00000
r8 = 0x00000000 r9 = 0xc2f1ad5c r10 = 0x000002e6 fp = 0xc2f1ad48
sp = 0xc9ab9170 pc = 0xc2cd48f8
Found by: call frame info
6 libcocos2djs.so!cocos2d::Renderer::processRenderCommand [CCRenderer.cpp : 778 + 0x2]
r4 = 0xc4d84fa8 r5 = 0xbda00000 r6 = 0xca19802c r7 = 0xbdbb0000
r8 = 0x2b2ba250 r9 = 0xbdc67800 r10 = 0x00000001 fp = 0x00000000
sp = 0xc9ab91c0 pc = 0xc2cd4e74
Found by: call frame info
7 libcocos2djs.so!cocos2d::Renderer::visitRenderQueue [CCRenderer.cpp : 499 + 0xa]
r3 = 0xca19813c r4 = 0xbdc0bc00 r5 = 0xbda00000 r6 = 0xca19802c
r7 = 0xbdbb0000 r8 = 0x2b2ba250 r9 = 0xbdc67800 r10 = 0x00000001
fp = 0x00000000 sp = 0xc9ab91e0 pc = 0xc2cd4c1c
Found by: call frame info
8 libcocos2djs.so!cocos2d::Renderer::render [CCRenderer.cpp : 550 + 0xa]
r4 = 0xbdc0bec0 r5 = 0xbdc0bc00 r6 = 0xbda00000 r7 = 0xbdbb0000
r8 = 0x2b2ba250 r9 = 0xbdc67800 r10 = 0x00000001 fp = 0x00000000
sp = 0xc9ab91f0 pc = 0xc2cd64b4
Found by: call frame info
9 libcocos2djs.so!cocos2d::Scene::render [CCScene.cpp : 103 + 0x6]
r3 = 0x00000001 r4 = 0xc0c8e440 r5 = 0xc4cfd200 r6 = 0xbda00000
r7 = 0xc0c8e534 r8 = 0x2b2ba250 r9 = 0xbdc67800 r10 = 0x00000001
fp = 0x00000000 sp = 0xc9ab9208 pc = 0xc2c58e10
Found by: call frame info
10 libcocos2djs.so!cocos2d::Director::drawScene [CCDirector.cpp : 381 + 0x2]
r3 = 0x00000000 r4 = 0xc4cfd200 r5 = 0xc5da83c8 r6 = 0x2b3f5080
r7 = 0x2b3f5080 r8 = 0x2b2ba250 r9 = 0xbdc67800 r10 = 0x00000001
fp = 0x00000000 sp = 0xc9ab9220 pc = 0xc2ca1778
Found by: call frame info
11 libcocos2djs.so!cocos2d::Director::mainLoop [CCDirector.cpp : 1506 + 0x2]
r4 = 0x00000000 r5 = 0xc5da83c8 r6 = 0x2b3f5080 r7 = 0x2b3f5080
r8 = 0x2b2ba250 r9 = 0xbdc67800 r10 = 0x00000001 fp = 0x00000000
sp = 0xc9ab9228 pc = 0xc2ca1c20
Found by: call frame info
12 base.odex + 0x71d25
r3 = 0x3b9aca00 r4 = 0x00000000 r5 = 0xc5da83c8 r6 = 0x2b3f5080
r7 = 0x2b3f5080 r8 = 0x2b2ba250 r9 = 0xbdc67800 r10 = 0x00000001
fp = 0x00000000 sp = 0xc9ab9230 pc = 0xcea40d27
Found by: call frame info
13 dalvik-LinearAlloc (deleted) + 0x7162
sp = 0xc9ab9234 pc = 0xc5da8164
Found by: stack scanning
14 dalvik-main space 1 (deleted) + 0x2983fe
sp = 0xc9ab9240 pc = 0x2ae98400
Found by: stack scanning
15 dalvik-LinearAlloc (deleted) + 0x73c6
sp = 0xc9ab9288 pc = 0xc5da83c8

阅读整个主题