I have an iOS app that records via the mic using an Output RemoteIO Audio Unit and saves the file in the app's docs directory.
Elsewhere I use an AVAudioPlayer to playback this file.
All has been running fine for weeks, but since adding some unrelated ASIHTTPRequest code, I'm getting an intermittent crash when the
It's one of those annoying scenarios where I can't figure out if there is a latent problem in the audio code, or whether some memory is getting trashed elsewhere, and just happens to manifest itself here.
Needle in a haystack I guess, but if anyone has any ideas where I could even hunt for clues ;)
AudioToolbox`AudioSessionPropertyListeners::AddPropertyListener(unsigned long, void (*)(void*, unsigned long, unsigned long, void const*), void*):
0x3648ccf0: push {r4, r5, r6, r7, lr}
0x3648ccf2: add r7, sp, #12
0x3648ccf4: push.w {r8, r10, r11}
0x3648ccf8: vpush {d8, d9, d10, d11, d12, d13, d14, d15}
0x3648ccfc: sub sp, #80
0x3648ccfe: stm.w sp, {r0, r1, r2}
0x3648cd02: movw r0, #34466
0x3648cd06: movt r0, #2385
0x3648cd0a: add r0, pc
0x3648cd0c: ldr r0, [r0, #4]
0x3648cd0e: str r0, [sp, #16]
0x3648cd10: ldr r0, [sp, #16]
0x3648cd12: str r0, [sp, #20]
0x3648cd14: ldr r0, [sp, #20]
0x3648cd16: ldr r0, [r0]
0x3648cd18: ldr r1, [r0, #8] //**** Thread 1 : EXC_BAD_ACCESS (Code=1, address=0x8) ****
0x3648cd1a: ldr r0, [sp, #16]
0x3648cd1c: blx r1
0x3648cd1e: movw r1, #34572
0x3648cd22: ldr r2, #228
0x3648cd24: movt r1, #2384
0x3648cd28: strb.w r0, [sp, #24]
0x3648cd2c: movw r0, #33224
0x3648cd30: add r1, pc
0x3648cd32: movt r0, #2385
0x3648cd36: add r2, pc
0x3648cd38: add r0, pc
0x3648cd3a: ldr r3, [r1]
0x3648cd3c: ldr r0, [r0]
0x3648cd3e: str r0, [sp, #12]
0x3648cd40: str r2, [sp, #56]
0x3648cd42: str r3, [sp, #52]
0x3648cd44: str r7, [sp, #60]
0x3648cd46: str.w sp, [sp, #68]
0x3648cd4a: add r1, sp, #28
0x3648cd4c: add.w r0, r1, #32
0x3648cd50: movs r1, #0
0x3648cd52: mov r1, pc
0x3648cd54: adds r1, r1, #7
0x3648cd56: str r1, [r0, #4]
0x3648cd58: movs r0, #0
0x3648cd5a: b 0x3648cd5e ; AudioSessionPropertyListeners::AddPropertyListener(unsigned long, void (*)(void*, unsigned long, unsigned long, void const*), void*) + 110
0x3648cd5c: movs r0, #1
0x3648cd5e: cmp r0, #0
0x3648cd60: bne 0x3648cdfa ; AudioSessionPropertyListeners::AddPropertyListener(unsigned long, void (*)(void*, unsigned long, unsigned long, void const*), void*) + 266
0x3648cd62: add r0, sp, #28
0x3648cd64: blx #875944 ; 0x36562b10 _Unwind_SjLj_Register
0x3648cd68: ldr r0, [sp, #12]
0x3648cd6a: cbnz r0, 0x3648cd8c ; AudioSessionPropertyListeners::AddPropertyListener(unsigned long, void (*)(void*, unsigned long, unsigned long, void const*), void*) + 156
0x3648cd6c: movs r0, #1
0x3648cd6e: str r0, [sp, #32]
0x3648cd70: movs r0, #12
0x3648cd72: blx #876396 ; 0x36562ce0 operator new(unsigned long)
0x3648cd76: movs r1, #0
0x3648cd78: str r1, [r0]
0x3648cd7a: str r1, [r0, #4]
0x3648cd7c: str r1, [r0, #8]
0x3648cd7e: movw r1, #33144
0x3648cd82: movt r1, #2385
0x3648cd86: str r0, [sp, #12]
0x3648cd88: add r1, pc
0x3648cd8a: str r0, [r1]
0x3648cd8c: ldr r0, [sp, #12]
0x3648cd8e: mov.w r12, #2
0x3648cd92: ldm.w sp, {r1, r2, r3}
0x3648cd96: str.w r12, [sp, #32]
0x3648cd9a: bl #-390 ; 0x3648cc18 AudioSessionPropertyListeners::AddPropertyListenerImp(unsigned long, void (*)(void*, unsigned long, unsigned long, void const*), void*)
0x3648cd9e: mov r4, r0
0x3648cda0: ldrb.w r0, [sp, #24]
0x3648cda4: cbz r0, 0x3648cdb6 ; AudioSessionPropertyListeners::AddPropertyListener(unsigned long, void (*)(void*, unsigned long, unsigned long, void const*), void*) + 198
0x3648cda6: ldr r0, [sp, #20]
0x3648cda8: mov.w r2, #4294967295
0x3648cdac: ldr r0, [r0]
0x3648cdae: ldr r1, [r0, #12]
0x3648cdb0: ldr r0, [sp, #16]
0x3648cdb2: str r2, [sp, #32]
0x3648cdb4: blx r1
0x3648cdb6: add r0, sp, #28
0x3648cdb8: blx #875892 ; 0x36562b30 _Unwind_SjLj_Unregister
0x3648cdbc: mov r0, r4
0x3648cdbe: add sp, #80
0x3648cdc0: vpop {d8, d9, d10, d11}
0x3648cdc4: vpop {d12, d13, d14, d15}
0x3648cdc8: pop.w {r8, r10, r11}
0x3648cdcc: pop {r4, r5, r6, r7, pc}
0x3648cdce: ldr r4, [sp, #36]
0x3648cdd0: ldr r2, [sp, #40]
0x3648cdd2: ldrb.w r2, [sp, #24]
0x3648cdd6: cbz r2, 0x3648cde6 ; AudioSessionPropertyListeners::AddPropertyListener(unsigned long, void (*)(void*, unsigned long, unsigned long, void const*), void*) + 246
0x3648cdd8: ldr r0, [sp, #20]
0x3648cdda: movs r2, #3
0x3648cddc: ldr r0, [r0]
0x3648cdde: ldr r1, [r0, #12]
0x3648cde0: ldr r0, [sp, #16]
0x3648cde2: str r2, [sp, #32]
0x3648cde4: blx r1
0x3648cde6: mov.w r0, #4294967295
0x3648cdea: str r0, [sp, #32]
0x3648cdec: mov r0, r4
0x3648cdee: blx #875824 ; 0x36562b20 _Unwind_SjLj_Resume
0x3648cdf2: ldr r0, [sp, #36]
0x3648cdf4: ldr r0, [sp, #40]
0x3648cdf6: blx #876200 ; 0x36562ca0 std::terminate()
0x3648cdfa: ldr r0, [sp, #32]
0x3648cdfc: cmp r0, #2
0x3648cdfe: blo 0x3648cfce ; MutableADTSHeader::SetPayloadFrameLength(unsigned long) + 14
0x3648ce00: cmp r0, #2
0x3648ce02: beq 0x3648cff2 ; ACMP4BitStreams::DefaultPrimingFromDecoderConfig(DecoderConfigDescr const&, unsigned long&) + 6
0x3648ce04: trap
0x3648ce06: nop
0x3648ce08: bvs 0x3648cf08 ; std::vector<unsigned long, std::allocator<unsigned long> >::_M_fill_insert(__gnu_cxx::__normal_iterator<unsigned long*, std::vector<unsigned long, std::allocator<unsigned long> > >, unsigned long, unsigned long const&) + 252
0x3648ce0a: movs r5, r1