iosobjective-cxcodeexc-bad-accessheyzap

Any idea what's broken here? XCODE


Preface: I'm making a an app using a cross platform engine (GameMaker Studio). So I'm not super fluent in objective C.

While testing HeyZap's ad sdk this happened:

enter image description here

How would I begin to debug this? It happened after I closed a video ad. It doesn't happen every time though, only sometimes.

Starific_vGIT`+[HZUtils dateWithoutTimeFromDate:]:
0x3491c4 <+0>:   push   {r4, r5, r6, r7, lr}
0x3491c6 <+2>:   add    r7, sp, #0xc
0x3491c8 <+4>:   push.w {r8, r11}
0x3491cc <+8>:   sub    sp, #0xc
0x3491ce <+10>:  mov.w  r8, #0x0
0x3491d2 <+14>:  cbz    r2, 0x34924c              ; <+136> at HZUtils.m:265
0x3491d4 <+16>:  movw   r0, #0x4664
0x3491d8 <+20>:  movt   r0, #0x5b
0x3491dc <+24>:  movw   r1, #0xbd6e
0x3491e0 <+28>:  movt   r1, #0x5b
0x3491e4 <+32>:  add    r0, pc
0x3491e6 <+34>:  add    r1, pc
0x3491e8 <+36>:  ldr    r4, [r0]
0x3491ea <+38>:  mov    r0, r2
0x3491ec <+40>:  ldr    r5, [r1]
0x3491ee <+42>:  blx    0x6c18cc                  ; symbol stub for: objc_retain
0x3491f2 <+46>:  mov    r11, r0
0x3491f4 <+48>:  mov    r0, r5
0x3491f6 <+50>:  mov    r1, r4
0x3491f8 <+52>:  blx    0x6c184c                  ; symbol stub for: objc_msgSend
0x3491fc <+56>:  mov    r7, r7
0x3491fe <+58>:  blx    0x6c18fc                  ; symbol stub for: objc_retainAutoreleasedReturnValue
0x349202 <+62>:  mov    r5, r0
0x349204 <+64>:  movw   r0, #0x463e
0x349208 <+68>:  movt   r0, #0x5b
0x34920c <+72>:  add    r3, sp, #0x8
0x34920e <+74>:  add    r0, pc
0x349210 <+76>:  movs   r2, #0x10
0x349212 <+78>:  str.w  r8, [sp, #0x8]
0x349216 <+82>:  ldr    r1, [r0]
0x349218 <+84>:  mov    r0, r5
0x34921a <+86>:  stm.w  sp, {r8, r11}
0x34921e <+90>:  blx    0x6c184c                  ; symbol stub for: objc_msgSend
0x349222 <+94>:  mov    r6, r0
0x349224 <+96>:  mov    r0, r11
0x349226 <+98>:  blx    0x6c18ac                  ; symbol stub for: objc_release
0x34922a <+102>: ldr    r0, [sp, #0x8]
0x34922c <+104>: blx    0x6c18cc                  ; symbol stub for: objc_retain
0x349230 <+108>: mov    r4, r0
0x349232 <+110>: mov    r0, r5
0x349234 <+112>: blx    0x6c18ac                  ; symbol stub for: objc_release
0x349238 <+116>: tst.w  r6, #0xff
0x34923c <+120>: beq    0x349246                  ; <+130> at HZUtils.m:265
0x34923e <+122>: mov    r0, r4
0x349240 <+124>: blx    0x6c18cc                  ; symbol stub for: objc_retain
0x349244 <+128>: mov    r8, r0
0x349246 <+130>: mov    r0, r4
0x349248 <+132>: blx    0x6c18ac                  ; symbol stub for: objc_release
0x34924c <+136>: mov    r0, r8
0x34924e <+138>: add    sp, #0xc
0x349250 <+140>: pop.w  {r8, r11}
0x349254 <+144>: pop.w  {r4, r5, r6, r7, lr}
0x349258 <+148>: b.w    0x6bf67c                  ; objc_autoreleaseReturnValue$shim

Update: I've run NSZombieEnabled and this is what I got: enter image description here Note, the crash is in a different place. The place changes each time it seems. It seems to imply a bad pointer to a string object? How would I debug this next?


Solution

  • Ok, strangely enough the problem turned out to be duplicate file references. The XCode analyzer turned this up, I had XCode solve the problem and voila. No more random crashes.