signal 7 (SIGBUS), code 1 (BUS_ADRALN)/ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) 报错解决
·
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
01-07 03:28:46.425 1089 1089 F DEBUG : Abort message: 'decStrong() called on 0xe8840d30 too many times'
01-07 05:58:02.379 1082 1082 F DEBUG : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x616e6151
01-03 15:48:05.118 4251 4251 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
01-03 15:48:05.118 4251 4251 F DEBUG : Cause: null pointer dereference
遇到问题时,会出现以上三个问题,会交替或者接连出现
根因是类是继承RefBase的,使用的是sp智能指针,智能指针会自己管理内存,而我用的是Amessage,AHandler,在AHandler中的onMessageReceived中会在处理完消息后,会清除所有占用的内存空间,这个就与智能指针的清理产生冲突,导致发生native crash,将智能指针改为普通指针即可。
更多推荐


所有评论(0)