遇到个奇怪问题debug不崩release崩溃

09-28 16:52:30.131 5987 5987 F DEBUG : Revision: ‘0’
09-28 16:52:30.131 5987 5987 F DEBUG : ABI: ‘arm’
09-28 16:52:30.132 5987 5987 F DEBUG : pid: 5666, tid: 5690, name: GLThread 87436 >>> net.crimoon.MushroomCity <<<
09-28 16:52:30.132 5987 5987 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4e
09-28 16:52:30.132 5987 5987 F DEBUG : r0 cc5101c0 r1 cbc36ec1 r2 00000001 r3 0000001f
09-28 16:52:30.132 5987 5987 F DEBUG : r4 cbc8fc18 r5 fffffffb r6 00000040 r7 cc514e78
09-28 16:52:30.132 5987 5987 F DEBUG : r8 cc511348 r9 cbc7bd90 sl cbc36e80 fp 00000032
09-28 16:52:30.132 5987 5987 F DEBUG : ip cc514e98 sp d0806958 lr d0702e2c pc cfc6ceb8 cpsr 200d0030
09-28 16:52:30.141 5987 5987 F DEBUG :
09-28 16:52:30.141 5987 5987 F DEBUG : backtrace:
09-28 16:52:30.143 5987 5987 F DEBUG : #00 pc 009cdeb8 1/lib/arm/libcocos2dlua.so

用android 工具分析 等到崩溃在libgcc2.c:? 和 lua_pcall 还有/llvm-libc++/include/__split_buffer:342 – 找不到具体原因

cocos2d-x 3.17版本的

具体做了什么操作?

就拖动点击啊那些,debug不蹦

8 18:44:11.153 3607 3607 F DEBUG : Build fingerprint: ‘xiaomi/tiffany/tiffany:7.1.2/N2G47H/V9.6.2.0.NDBCNFD:user/release-keys’
09-28 18:44:11.153 3607 3607 F DEBUG : Revision: ‘0’
09-28 18:44:11.153 3607 3607 F DEBUG : ABI: ‘arm’
09-28 18:44:11.153 3607 3607 F DEBUG : pid: 3425, tid: 3458, name: GLThread 88075
09-28 18:44:11.153 3607 3607 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xd05e01c0
09-28 18:44:11.154 3607 3607 F DEBUG : r0 d05e01c0 r1 cc12b4d0 r2 e3ffe968 r3 cc12b4f0
09-28 18:44:11.154 3607 3607 F DEBUG : r4 cc1a2ce8 r5 fffffffb r6 cc12b4d0 r7 d05e0d20
09-28 18:44:11.154 3607 3607 F DEBUG : r8 d05e01c0 r9 cc069830 sl cc1a2ce8 fp cc1a0f70
09-28 18:44:11.154 3607 3607 F DEBUG : ip cfc879a4 sp e3ffe978 lr cf27ac04 pc d05e01c0 cpsr 00070010
09-28 18:44:11.154 3607 3607 F DEBUG :
09-28 18:44:11.154 3607 3607 F DEBUG : backtrace:
09-28 18:44:11.158 3607 3607 F DEBUG : #00 pc 000001c0 <\anonymous:d05e0000>
09-28 18:44:11.159 3607 3607 F DEBUG : #01 pc 00007c00 <\anonymous:cf273000>

09-29 09:42:26.798 13672 13551 F google-breakpad: Microdump skipped (uninteresting)
09-29 09:42:26.820 13532 13551 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x930fd0d0 in tid 13551 (GLThread 369)
09-29 09:42:26.905 13675 13675 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-29 09:42:26.905 13675 13675 F DEBUG : Build fingerprint: ‘Xiaomi/sagit/sagit:8.0.0/OPR1.170623.027/8.9.20:user/release-keys’
09-29 09:42:26.905 13675 13675 F DEBUG : Revision: ‘0’
09-29 09:42:26.905 13675 13675 F DEBUG : ABI: ‘arm’
09-29 09:42:26.905 13675 13675 F DEBUG : pid: 13532, tid: 13551, name: GLThread 369 >>> xxx <<<
09-29 09:42:26.905 13675 13675 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x930fd0d0
09-29 09:42:26.905 13675 13675 F DEBUG : r0 00000003 r1 fffffffd r2 ffffffff r3 fffffffb
09-29 09:42:26.905 13675 13675 F DEBUG : r4 d04aab50 r5 fffffffb r6 00000000 r7 cb940248
09-29 09:42:26.905 13675 13675 F DEBUG : r8 e0867930 r9 e7e18e70 sl 930fd0d4 fp 3f0d0e08
09-29 09:42:26.905 13675 13675 F DEBUG : ip e7e18e70 sp d2dfe8f8 lr d170fc94 pc d236eb10 cpsr 20010010
09-29 09:42:26.906 13675 13675 F DEBUG :
09-29 09:42:26.906 13675 13675 F DEBUG : backtrace:
09-29 09:42:26.907 13675 13675 F DEBUG : #00 pc 009e8b10 /data/appxxx-GU7N8DpTY574KkoFIQ3clg==/lib/arm/libcocos2dlua.so
09-29 09:42:26.907 13675 13675 F DEBUG : #01 pc 009d9397 /data/app/xxx-GU7N8DpTY574KkoFIQ3clg==/lib/arm/libcocos2dlua.so (lua_pcall+60)

最后改的这个
Application.mk
ifeq ($(NDK_DEBUG),1)
APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
APP_OPTIM := debug
else
APP_CPPFLAGS += -DNDEBUG
APP_OPTIM := debug
endif
然后好像就不崩溃了

1赞

这还是debug模式啊 ,我也遇到同样问题