signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30

cocos2d-js android 奔溃:log
01-17 10:46:45.189: D/JniHelper(23666): JniHelper::getJavaVM(), pthread_self() = -1225643212
01-17 10:46:45.189: I/js log(23666): enterRoomFromWeb: enter room
01-17 10:46:45.191: A/libc(23666): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x30 in tid 23666 (.maitian.jsyzmj)
01-17 10:46:45.298: A/DEBUG(288): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-17 10:46:45.298: A/DEBUG(288): Build fingerprint: ‘Xiaomi/cancro/cancro:6.0.1/MMB29M/V8.5.2.0.MXDCNED:user/release-keys’
01-17 10:46:45.298: A/DEBUG(288): Revision: ‘0’
01-17 10:46:45.298: A/DEBUG(288): ABI: ‘arm’
01-17 10:46:45.298: A/DEBUG(288): pid: 23666, tid: 23666, name: .maitian.jsyzmj >>> com.maitian.jsyzmj <<<
01-17 10:46:45.298: A/DEBUG(288): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30
01-17 10:46:45.309: D/wpa_supplicant(3209): wlan0: Control interface command ‘SCAN TYPE=ONLY’
01-17 10:46:45.309: D/wpa_supplicant(3209): wlan0: Setting scan request: 0.000000 sec
01-17 10:46:45.310: D/wpa_supplicant(3209): CTRL-DEBUG: global_ctrl_sock-sendto: sock=11 sndbuf=163840 outq=0 send_len=3
01-17 10:46:45.310: D/wpa_supplicant(3209): Scan SSID - hexdump(len=2): 6b 72
01-17 10:46:45.310: D/wpa_supplicant(3209): wlan0: Starting AP scan for wildcard SSID
01-17 10:46:45.310: D/wpa_supplicant(3209): wlan0: Add radio work ‘scan’@0xb6859208
01-17 10:46:45.310: D/wpa_supplicant(3209): wlan0: First radio work item in the queue - schedule start immediately
01-17 10:46:45.310: D/wpa_supplicant(3209): wlan0: Starting radio work ‘scan’@0xb6859208 after 0.000056 second wait
01-17 10:46:45.310: D/wpa_supplicant(3209): wlan0: nl80211: scan request
01-17 10:46:45.310: D/wpa_supplicant(3209): nl80211: Scan SSID - hexdump(len=2): 6b 72
01-17 10:46:45.310: D/wpa_supplicant(3209): nl80211: Scan SSID - hexdump(len=0): [NULL]
01-17 10:46:45.310: D/wpa_supplicant(3209): nl80211: Scan extra IEs - hexdump(len=7): 7f 05 00 00 0a 02 01
01-17 10:46:45.312: D/wpa_supplicant(3209): Scan requested (ret=0) - scan timeout 30 seconds
01-17 10:46:45.312: D/wpa_supplicant(3209): nl80211: Event message available
01-17 10:46:45.312: D/wpa_supplicant(3209): nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
01-17 10:46:45.312: D/wpa_supplicant(3209): wlan0: nl80211: Scan trigger
01-17 10:46:45.312: D/wpa_supplicant(3209): wlan0: Event SCAN_STARTED (47) received
01-17 10:46:45.312: D/wpa_supplicant(3209): wlan0: Own scan request started a scan in 0.000161 seconds
01-17 10:46:45.312: D/wpa_supplicant(3209): CTRL-DEBUG: ctrl_sock-sendmsg: sock=11 sndbuf=163840 outq=0 send_len=24
01-17 10:46:45.312: D/wpa_supplicant(3209): CTRL_IFACE monitor sent successfully to /data/misc/wifi/sockets/wpa_ctrl_313-2\x00
01-17 10:46:45.312: D/wpa_supplicant(3209): CTRL-DEBUG: ctrl_sock-sendmsg: sock=11 sndbuf=163840 outq=448 send_len=24
01-17 10:46:45.312: D/wpa_supplicant(3209): CTRL_IFACE monitor sent successfully to /data/misc/wifi/sockets/wpa_ctrl_1751-2\x00
01-17 10:46:45.340: I/art(1751): Starting a blocking GC Explicit
01-17 10:46:45.341: I/ThermalEngine(331): Sensor:batt_temp:343 mC
01-17 10:46:45.426: I/art(1751): Explicit concurrent mark sweep GC freed 7820(645KB) AllocSpace objects, 10(200KB) LOS objects, 33% free, 37MB/56MB, paused 1.184ms total 85.856ms
01-17 10:46:45.485: A/DEBUG(288): r0 bee55ccc r1 00000001 r2 b6f22c0c r3 00000000
01-17 10:46:45.486: A/DEBUG(288): r4 bee55ccc r5 00000003 r6 00000001 r7 00000000
01-17 10:46:45.486: A/DEBUG(288): r8 00000001 r9 00000000 sl ae95e500 fp bee56e20
01-17 10:46:45.486: A/DEBUG(288): ip b6f22c6c sp bee55c68 lr 9ffa550c pc 9ffa5514 cpsr 400f0010
01-17 10:46:45.496: A/DEBUG(288): backtrace:
01-17 10:46:45.496: A/DEBUG(288): #00 pc 0069b514 /data/app/com.maitian.jsyzmj-1/lib/arm/libcocos2djs.so
01-17 10:46:45.584: W/cr_TrimMemory(9267): Trim java and blink cached resources.
01-17 10:46:45.918: E/LocSvc_ApiV02(1751): I/<— void globalEventCb(locClientHandleType, uint32_t, locClientEventIndUnionType, void*) line 90 QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02
01-17 10:46:45.918: E/LocSvc_libulp(1751): I/int ulp_brain_process_gnss_sv_report(const GnssSvStatus*), gnss sv report cnt = 28805, gnss pos report cnt = 0,strong sv cnt = 0
01-17 10:46:45.918: E/LocSvc_afw(1751): I/<=== sv_status_cb - line 1072 0
01-17 10:46:45.918: E/LocSvc_ApiV02(1751): I/<— void globalEventCb(locClientHandleType, uint32_t, locClientEventIndUnionType, void*) line 90 QMI_LOC_EVENT_POSITION_REPORT_IND_V02
01-17 10:46:45.918: E/LocSvc_libulp(1751): I/int ulp_brain_process_gnss_position_report(loc_sess_status, LocPosTechMask, UlpLocation*, const GpsLocationExtended*, const void*), transition provider returned = 0
01-17 10:46:45.918: E/LocSvc_libulp(1751): I/int ulp_brain_process_gnss_position_report(loc_sess_status, LocPosTechMask, UlpLocation*, const GpsLocationExtended*, const void*), report GNSS position/status to hybrid fix requests = 0
01-17 10:46:45.918: E/LocSvc_eng_nmea(1751): I/<=== nmea_cb line 62 0x999267ec
01-17 10:46:45.919: E/LocSvc_eng_nmea(1751): I/<=== nmea_cb line 62 0x999267ec
01-17 10:46:45.919: E/IzatSvc_PassiveLocListener(1751): E/Exiting with error virtual void izat_manager::IzatPassiveLocationListener::onLocationChanged(const izat_manager::IzatLocation*, izat_manager::IzatLocationStatus) line 113 “1”
01-17 10:46:45.919: E/LocSvc_eng_nmea(1751): I/<=== nmea_cb line 62 0x999267ac
01-17 10:46:45.919: E/LocSvc_eng_nmea(1751): I/<=== nmea_cb line 62 0x999267ac
01-17 10:46:45.919: E/LocSvc_eng_nmea(1751): I/<=== nmea_cb line 62 0x999267ac
01-17 10:46:45.919: E/LocSvc_eng_nmea(1751): I/<=== nmea_cb line 62 0x999267ac
01-17 10:46:46.038: D/WtProcessStrategy(3268): do trim { PackageName :com.miui.securitycenter Pid: 5040 Uid: 1000 Start by: service Score:40 Old score:40 state:0 mBackgroundTimeInMillis:1516157135660 WakelockCount:0 wakelogsize:0 ActivityDestroied:false Activity size: 0 PackageInfo:{WhetstonePackageInfo#PacakgeName:com.miui.securitycenter uid:1000 uiMemoryThresold:0 nonUiMemoryThresold:0 Flag:-2147479612,0x80000fc4 [,DestoryActivity,TRIMHEAPS,TRIM_OPENGL,SOFT_RESET,APP_SYSTEM,ZRAM,TRIMPROCESS_BY_ACTIVITY] Type:0[] } tasknum:-1}
01-17 10:46:46.039: D/WtProcessStrategy(3268): do trim { PackageName :com.android.settings Pid: 27666 Uid: 1000 Start by: broadcast Score:40 Old score:40 state:0 mBackgroundTimeInMillis:1516157135711 WakelockCount:0 wakelogsize:0 ActivityDestroied:false Activity size: 1 PackageInfo:{WhetstonePackageInfo#PacakgeName:com.android.settings uid:1000 uiMemoryThresold:0 nonUiMemoryThresold:0 Flag:-2147480636,0x80000bc4 [,DestoryActivity,TRIMHEAPS,TRIM_OPENGL,APP_SYSTEM,ZRAM,TRIMPROCESS_BY_ACTIVITY] Type:0[] } tasknum:4279}
01-17 10:46:46.040: D/WtProcessStrategy(3268): do trim { PackageName :com.android.settings Pid: 3865 Uid: 1000 Start by: unknown Score:40 Old score:40 state:0 mBackgroundTimeInMillis:1516157135710 WakelockCount:0 wakelogsize:0 ActivityDestroied:false Activity size: 0 PackageInfo:{WhetstonePackageInfo#PacakgeName:com.android.settings uid:1000 uiMemoryThresold:0 nonUiMemoryThresold:0 Flag:-2147480636,0x80000bc4 [,DestoryActivity,TRIMHEAPS,TRIM_OPENGL,APP_SYSTEM,ZRAM,TRIMPROCESS_BY_ACTIVITY] Type:0[] } tasknum:-1}
01-17 10:46:46.343: I/ThermalEngine(331): Sensor:batt_temp:344 mC
01-17 10:46:46.523: I/WtEventController(3268): Receive am_crash event for pid: 1751
01-17 10:46:46.525: A/DEBUG(288): Tombstone written to: /data/tombstones/tombstone_00
01-17 10:46:46.525: E/DEBUG(288): AM write failed: Broken pipe
01-17 10:46:46.525: I/octvm_klo(5146): get event file: /data/tombstones/tombstone_00
01-17 10:46:46.525: I/octvm_klo(5146): klo lock
01-17 10:46:46.528: I/BootReceiver(1751): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)
01-17 10:46:46.536: I/octvm_klo(5146): start gathering logcat log…
01-17 10:46:46.570: W/ActivityManager(1751): Force finishing activity com.maitian.jsyzmj/.AppActivity
01-17 10:46:46.573: E/ActivityManager(1751): Invalid thumbnail dimensions: 0x0
01-17 10:46:46.575: D/WtProcessController(3268): onAMPauseActivity callback
01-17 10:46:46.594: E/LocationStats(1751): Reference counting corrupted in usage statistics.
01-17 10:46:46.596: D/NuPlayerDriver(293): reset(0xb1acf640)
01-17 10:46:46.596: D/NuPlayerDriver(293): notifyListener_l(0xb1acf640), (8, 0, 0)
01-17 10:46:46.597: I/AudioFlinger(293): setAppName(), name=[/system/bin/mediaserver], active=[0]
01-17 10:46:46.597: V/EffectDiracSound(293): DiracSound_command() start, cmdCode=23
01-17 10:46:46.597: V/EffectDiracSound(293): DiracSound_Command EFFECT_CMD_SET_APP_NAME: stream=3, name=-/system/bin/mediaserver
01-17 10:46:46.597: I/AudioFlinger(293): setAppName(), name=[/system/bin/mediaserver], active=[1]
01-17 10:46:46.597: V/EffectDiracSound(293): DiracSound_command() start, cmdCode=23
01-17 10:46:46.597: V/EffectDiracSound(293): DiracSound_Command EFFECT_CMD_SET_APP_NAME: stream=3, name=+/system/bin/mediaserver
01-17 10:46:46.605: I/AudioFlinger(293): setAppName(), name=[/system/bin/mediaserver], active=[0]
01-17 10:46:46.605: V/EffectDiracSound(293): DiracSound_command() start, cmdCode=23
01-17 10:46:46.605: V/EffectDiracSound(293): DiracSound_Command EFFECT_CMD_SET_APP_NAME: stream=3, name=-/system/bin/mediaserver
01-17 10:46:46.605: W/AudioFlinger(293): session id 1718 not found for pid 23666
01-17 10:46:46.611: D/NuPlayerDriver(293): notifyResetComplete(0xb1acf640)
01-17 10:46:46.645: I/ActivityManager(1751): Process com.maitian.jsyzmj (pid 23666) has died

哪位大神帮忙看看

目前为止, 我遇到过两类和你这个错误相似的崩溃:

  1. Cocos2dxJavascriptJavaBridge.evalString 没有放到 open gl 线程.
  2. android:configChanges 中漏掉了一些属性, 导致这些属性发生变化后没正确接收到通知并处理导致崩溃, 如: 横竖屏切换啥的.

那么你在崩溃前后都做了啥呢? 第一个问题可以参考这个 http://forum.cocos.com/t/1-8-cocos2dxjavascriptjavabridge-evalstring/55531, 第二个加上对应的属性就好了.

非常感谢,确实是线程的问题。主要是小概率出现,不是必现,所以就没往Android层考虑。