ListMonitor throws EXC_BAD_ACCESS on deinit #47

Closed
opened 2025-12-29 15:22:56 +01:00 by adam · 24 comments
Owner

Originally created by @jamesbebbington on GitHub (Mar 29, 2016).

After having upgraded from CoreStore v1.4.4 to v1.6.1 I'm getting a repeatable crash when my ListMonitor is deinitialized when the controller it is a property of is deallocated:

screen shot 2016-03-29 at 10 40 30

My ListMonitor is instantiated like so:

class ProjectController: UITableViewController, ListSectionObserver, TableViewDisabling {

    

    var project: Project? {
        didSet {
            guard let project = self.project else { return }
            questions.refetch(Where("project.id == %d", project.id))
        }
    }

    /// Questions monitor
    let questions = CoreStore.monitorSectionedList(
        From(Question),
        SectionBy("category.name"),
        OrderBy(.Ascending("position")),
        Where(false) // Overridden in .project property observer
    )

    

}

Explicitly removing the observer when the controller is deallocated doesn't help.

I'm not sure how to go about debugging this one, could you give me some pointers please.

Thanks.

Originally created by @jamesbebbington on GitHub (Mar 29, 2016). After having upgraded from CoreStore v1.4.4 to v1.6.1 I'm getting a repeatable crash when my `ListMonitor` is deinitialized when the controller it is a property of is deallocated: <img width="961" alt="screen shot 2016-03-29 at 10 40 30" src="https://cloud.githubusercontent.com/assets/5934/14104037/e64983ac-f59a-11e5-9819-52e5cdd36298.png"> My `ListMonitor` is instantiated like so: ``` swift class ProjectController: UITableViewController, ListSectionObserver, TableViewDisabling { … var project: Project? { didSet { guard let project = self.project else { return } questions.refetch(Where("project.id == %d", project.id)) } } /// Questions monitor let questions = CoreStore.monitorSectionedList( From(Question), SectionBy("category.name"), OrderBy(.Ascending("position")), Where(false) // Overridden in .project property observer ) … } ``` Explicitly removing the observer when the controller is deallocated doesn't help. I'm not sure how to go about debugging this one, could you give me some pointers please. Thanks.
adam added the fixedcorestore bug labels 2025-12-29 15:22:56 +01:00
adam closed this issue 2025-12-29 15:22:57 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Mar 29, 2016):

@fractious Are you using a Tweak clause?

@JohnEstropia commented on GitHub (Mar 29, 2016): @fractious Are you using a `Tweak` clause?
Author
Owner

@JohnEstropia commented on GitHub (Mar 29, 2016):

btw, is that stacktrace the stopping point of an Exception Breakpoint?

@JohnEstropia commented on GitHub (Mar 29, 2016): btw, is that stacktrace the stopping point of an Exception Breakpoint?
Author
Owner

@jamesbebbington commented on GitHub (Mar 29, 2016):

Nope, no tweaking.

It might be also worth noting that this affected me both before and after the upgrade to swift 2.2.

@jamesbebbington commented on GitHub (Mar 29, 2016): Nope, no `tweak`ing. It might be also worth noting that this affected me both before and after the upgrade to swift 2.2.
Author
Owner

@jamesbebbington commented on GitHub (Mar 29, 2016):

I'll double-check but if I recall correctly, the All Exceptions breakpoint made no difference either way. I also tried Enabling Zombies and the Address Sanitizer but couldn't get anything helpful in the console.

@jamesbebbington commented on GitHub (Mar 29, 2016): I'll double-check but if I recall correctly, the All Exceptions breakpoint made no difference either way. I also tried Enabling Zombies and the Address Sanitizer but couldn't get anything helpful in the console.
Author
Owner

@JohnEstropia commented on GitHub (Mar 29, 2016):

Can you try to add this to ListMonitor's deinit and see if there are any improvements?

    deinit {

        self.observerForWillChangePersistentStore = nil
        self.observerForDidChangePersistentStore = nil

        self.fetchedResultsControllerDelegate.fetchedResultsController = nil
        self.isPersistentStoreChanging = false
    }

The stack trace comes from deallocation of a NotificationObserver, which leads me to believe that it's a release timing problem.

@JohnEstropia commented on GitHub (Mar 29, 2016): Can you try to add this to `ListMonitor`'s `deinit` and see if there are any improvements? ``` swift deinit { self.observerForWillChangePersistentStore = nil self.observerForDidChangePersistentStore = nil self.fetchedResultsControllerDelegate.fetchedResultsController = nil self.isPersistentStoreChanging = false } ``` The stack trace comes from deallocation of a `NotificationObserver`, which leads me to believe that it's a release timing problem.
Author
Owner

@jamesbebbington commented on GitHub (Mar 29, 2016):

No improvement I'm afraid:

screen shot 2016-03-29 at 21 05 50
@jamesbebbington commented on GitHub (Mar 29, 2016): No improvement I'm afraid: <img width="1072" alt="screen shot 2016-03-29 at 21 05 50" src="https://cloud.githubusercontent.com/assets/5934/14122125/28aa2114-f5f2-11e5-895b-f84e616485a4.png">
Author
Owner

@JohnEstropia commented on GitHub (Mar 29, 2016):

can you show me the 7 __lldb_unnamed_function6... part of the stack trace?

@JohnEstropia commented on GitHub (Mar 29, 2016): can you show me the `7 __lldb_unnamed_function6...` part of the stack trace?
Author
Owner

@jamesbebbington commented on GitHub (Mar 29, 2016):

Here you go:

screen shot 2016-03-29 at 21 12 25

And the previous frame if that's of any help:

screen shot 2016-03-29 at 21 12 45
@jamesbebbington commented on GitHub (Mar 29, 2016): Here you go: <img width="1072" alt="screen shot 2016-03-29 at 21 12 25" src="https://cloud.githubusercontent.com/assets/5934/14122275/f6a5cc94-f5f2-11e5-8d42-0704aecf1c9b.png"> And the previous frame if that's of any help: <img width="1072" alt="screen shot 2016-03-29 at 21 12 45" src="https://cloud.githubusercontent.com/assets/5934/14122303/16bb8456-f5f3-11e5-90ee-3dcc5eb2fe9e.png">
Author
Owner

@JohnEstropia commented on GitHub (Mar 29, 2016):

@fractious Looks like a bug happening when the NSFetchRequest captured by a swift closure gets deallocated. Can you try this commit? 48a8694720

@JohnEstropia commented on GitHub (Mar 29, 2016): @fractious Looks like a bug happening when the NSFetchRequest captured by a swift closure gets deallocated. Can you try this commit? https://github.com/JohnEstropia/CoreStore/commit/48a86947205787310f78245ceebf126506c5ebe8
Author
Owner

@jamesbebbington commented on GitHub (Mar 29, 2016):

My dinner is frantically beeping at me now so I'll give it a whirl in a bit. Thanks for taking the time to investigate this, much appreciated. I'll let you know how I get on with it later.

@jamesbebbington commented on GitHub (Mar 29, 2016): My dinner is frantically beeping at me now so I'll give it a whirl in a bit. Thanks for taking the time to investigate this, much appreciated. I'll let you know how I get on with it later.
Author
Owner

@JohnEstropia commented on GitHub (Mar 29, 2016):

Sure, no problem! Thanks for the report! Weird though, we've never seen this bug before..

@JohnEstropia commented on GitHub (Mar 29, 2016): Sure, no problem! Thanks for the report! Weird though, we've never seen this bug before..
Author
Owner

@jamesbebbington commented on GitHub (Mar 29, 2016):

No change I'm afraid:

screen shot 2016-03-29 at 22 21 26
@jamesbebbington commented on GitHub (Mar 29, 2016): No change I'm afraid: <img width="1072" alt="screen shot 2016-03-29 at 22 21 26" src="https://cloud.githubusercontent.com/assets/5934/14124288/9a38ba98-f5fc-11e5-827e-471b4e37e46f.png">
Author
Owner

@JohnEstropia commented on GitHub (Mar 30, 2016):

Aww... Can you try running with NSZombies on and see if we find something?

@JohnEstropia commented on GitHub (Mar 30, 2016): Aww... Can you try running with NSZombies on and see if we find something?
Author
Owner

@jamesbebbington commented on GitHub (Mar 30, 2016):

Does this help?

screen shot 2016-03-30 at 10 13 06
2016-03-30 09:49:58.667 Liveminds[16399:171795] *** -[CFString release]: message sent to deallocated instance 0x7ff48485b1a0
CoreFoundation`___forwarding___:
    0x10a4db930 <+0>:    pushq  %rbp
    0x10a4db931 <+1>:    movq   %rsp, %rbp
    0x10a4db934 <+4>:    pushq  %r15
    0x10a4db936 <+6>:    pushq  %r14
    0x10a4db938 <+8>:    pushq  %r13
    0x10a4db93a <+10>:   pushq  %r12
    0x10a4db93c <+12>:   pushq  %rbx
    0x10a4db93d <+13>:   subq   $0x18, %rsp
    0x10a4db941 <+17>:   movq   %rsi, -0x38(%rbp)
    0x10a4db945 <+21>:   movq   %rdi, %r15
    0x10a4db948 <+24>:   movabsq $0x7000000000000000, %rdx ; imm = 0x7000000000000000 
    0x10a4db952 <+34>:   testq  %rsi, %rsi
    0x10a4db955 <+37>:   setne  %al
    0x10a4db958 <+40>:   movq   0x2e68a9(%rip), %r13      ; (void *)0x000000010ca5c800: objc_msgSend
    0x10a4db95f <+47>:   cmovneq 0x2e68b9(%rip), %r13      ; (void *)0x000000010ca5ce00: objc_msgSend_stret
    0x10a4db967 <+55>:   movzbl %al, %eax
    0x10a4db96a <+58>:   movq   0x8(%r15,%rax,8), %rcx
    0x10a4db96f <+63>:   movq   %rcx, -0x30(%rbp)
    0x10a4db973 <+67>:   movq   (%r15,%rax,8), %rbx
    0x10a4db977 <+71>:   leaq   (,%rax,8), %r14
    0x10a4db97f <+79>:   testq  %rbx, %rbx
    0x10a4db982 <+82>:   jns    0x10a4db98d               ; <+93>
    0x10a4db984 <+84>:   testq  %rbx, %rdx
    0x10a4db987 <+87>:   je     0x10a4dbba4               ; <+628>
    0x10a4db98d <+93>:   movq   %r14, -0x40(%rbp)
    0x10a4db991 <+97>:   movq   %rbx, %rdi
    0x10a4db994 <+100>:  callq  0x10a5ec018               ; symbol stub for: object_getClass
    0x10a4db999 <+105>:  movq   %rax, %r12
    0x10a4db99c <+108>:  movq   %r12, %rdi
    0x10a4db99f <+111>:  callq  0x10a5ebf22               ; symbol stub for: class_getName
    0x10a4db9a4 <+116>:  movq   %rax, %r14
    0x10a4db9a7 <+119>:  movq   0x2d45f2(%rip), %rsi      ; "forwardingTargetForSelector:"
    0x10a4db9ae <+126>:  movq   %r12, %rdi
    0x10a4db9b1 <+129>:  callq  0x10a5ebf34               ; symbol stub for: class_respondsToSelector
    0x10a4db9b6 <+134>:  testb  %al, %al
    0x10a4db9b8 <+136>:  je     0x10a4dba00               ; <+208>
    0x10a4db9ba <+138>:  movq   0x2d45df(%rip), %rsi      ; "forwardingTargetForSelector:"
    0x10a4db9c1 <+145>:  movq   %rbx, %rdi
    0x10a4db9c4 <+148>:  movq   -0x30(%rbp), %rdx
    0x10a4db9c8 <+152>:  callq  *0x2e683a(%rip)           ; (void *)0x000000010ca5c800: objc_msgSend
    0x10a4db9ce <+158>:  testq  %rax, %rax
    0x10a4db9d1 <+161>:  je     0x10a4dba00               ; <+208>
    0x10a4db9d3 <+163>:  cmpq   %rbx, %rax
    0x10a4db9d6 <+166>:  je     0x10a4dba00               ; <+208>
    0x10a4db9d8 <+168>:  testq  %rax, %rax
    0x10a4db9db <+171>:  movq   -0x40(%rbp), %r14
    0x10a4db9df <+175>:  movabsq $0x7000000000000000, %rcx ; imm = 0x7000000000000000 
    0x10a4db9e9 <+185>:  jns    0x10a4db9f4               ; <+196>
    0x10a4db9eb <+187>:  testq  %rax, %rcx
    0x10a4db9ee <+190>:  je     0x10a4dbba1               ; <+625>
    0x10a4db9f4 <+196>:  movq   %rax, (%r15,%r14)
    0x10a4db9f8 <+200>:  xorl   %r15d, %r15d
    0x10a4db9fb <+203>:  jmp    0x10a4dbbd1               ; <+673>
    0x10a4dba00 <+208>:  movq   %rbx, -0x40(%rbp)
    0x10a4dba04 <+212>:  leaq   0x2acafa(%rip), %rsi      ; "_NSZombie_"
    0x10a4dba0b <+219>:  movl   $0xa, %edx
    0x10a4dba10 <+224>:  movq   %r14, %rdi
    0x10a4dba13 <+227>:  callq  0x10a5ec798               ; symbol stub for: strncmp
    0x10a4dba18 <+232>:  testl  %eax, %eax
    0x10a4dba1a <+234>:  je     0x10a4dbbe3               ; <+691>
    0x10a4dba20 <+240>:  movq   0x2d4541(%rip), %rsi      ; "methodSignatureForSelector:"
    0x10a4dba27 <+247>:  movq   %r12, %rdi
    0x10a4dba2a <+250>:  callq  0x10a5ebf34               ; symbol stub for: class_respondsToSelector
    0x10a4dba2f <+255>:  testb  %al, %al
    0x10a4dba31 <+257>:  movq   -0x40(%rbp), %r14
    0x10a4dba35 <+261>:  movq   -0x38(%rbp), %r13
    0x10a4dba39 <+265>:  je     0x10a4dbc34               ; <+772>
    0x10a4dba3f <+271>:  movq   0x2d4522(%rip), %rsi      ; "methodSignatureForSelector:"
    0x10a4dba46 <+278>:  movq   %r14, %rdi
    0x10a4dba49 <+281>:  movq   -0x30(%rbp), %rdx
    0x10a4dba4d <+285>:  callq  *0x2e67b5(%rip)           ; (void *)0x000000010ca5c800: objc_msgSend
    0x10a4dba53 <+291>:  movq   %rax, %r12
    0x10a4dba56 <+294>:  testq  %r12, %r12
    0x10a4dba59 <+297>:  je     0x10a4dbc91               ; <+865>
    0x10a4dba5f <+303>:  movq   0x2d44d2(%rip), %rsi      ; "_frameDescriptor"
    0x10a4dba66 <+310>:  movq   %r12, %rdi
    0x10a4dba69 <+313>:  callq  *0x2e6799(%rip)           ; (void *)0x000000010ca5c800: objc_msgSend
    0x10a4dba6f <+319>:  movq   %rax, %rbx
    0x10a4dba72 <+322>:  movq   (%rbx), %rax
    0x10a4dba75 <+325>:  movzwl 0x22(%rax), %eax
    0x10a4dba79 <+329>:  shrl   $0x6, %eax
    0x10a4dba7c <+332>:  andq   $0x1, %rax
    0x10a4dba80 <+336>:  cmpq   %r13, %rax
    0x10a4dba83 <+339>:  je     0x10a4dbac9               ; <+409>
    0x10a4dba85 <+341>:  movq   -0x30(%rbp), %rdi
    0x10a4dba89 <+345>:  callq  0x10a5ec03c               ; symbol stub for: sel_getName
    0x10a4dba8e <+350>:  movq   %rax, %rdx
    0x10a4dba91 <+353>:  movq   (%rbx), %rax
    0x10a4dba94 <+356>:  movzwl 0x22(%rax), %eax
    0x10a4dba98 <+360>:  leaq   0x2a3bb9(%rip), %rsi      ; ""
    0x10a4dba9f <+367>:  leaq   0x2b34c1(%rip), %r8       ; " not"
    0x10a4dbaa6 <+374>:  testb  $0x40, %al
    0x10a4dbaa8 <+376>:  movq   %r8, %rcx
    0x10a4dbaab <+379>:  cmovneq %rsi, %rcx
    0x10a4dbaaf <+383>:  testq  %r13, %r13
    0x10a4dbab2 <+386>:  cmovneq %rsi, %r8
    0x10a4dbab6 <+390>:  leaq   0x2fc843(%rip), %rsi      ; @"*** NSForwarding: warning: method signature and compiler disagree on struct-return-edness of '%s'.  Signature thinks it does%s return a struct, and compiler thinks it does%s."
    0x10a4dbabd <+397>:  movl   $0x4, %edi
    0x10a4dbac2 <+402>:  xorl   %eax, %eax
    0x10a4dbac4 <+404>:  callq  0x10a522a50               ; CFLog
    0x10a4dbac9 <+409>:  movq   %rbx, %r13
    0x10a4dbacc <+412>:  movq   0x2d4f85(%rip), %rdi      ; (void *)0x000000010a7b3448: NSInvocation
    0x10a4dbad3 <+419>:  movq   0x2d449e(%rip), %rsi      ; "_invocationWithMethodSignature:frame:"
    0x10a4dbada <+426>:  movq   %r12, %rdx
    0x10a4dbadd <+429>:  movq   %r15, %rcx
    0x10a4dbae0 <+432>:  callq  *0x2e6722(%rip)           ; (void *)0x000000010ca5c800: objc_msgSend
    0x10a4dbae6 <+438>:  movq   %rax, %rbx
    0x10a4dbae9 <+441>:  movq   %r14, %rdi
    0x10a4dbaec <+444>:  callq  0x10a5ec018               ; symbol stub for: object_getClass
    0x10a4dbaf1 <+449>:  movq   0x2d44b0(%rip), %rsi      ; "forwardInvocation:"
    0x10a4dbaf8 <+456>:  movq   %rax, %rdi
    0x10a4dbafb <+459>:  callq  0x10a5ebf34               ; symbol stub for: class_respondsToSelector
    0x10a4dbb00 <+464>:  testb  %al, %al
    0x10a4dbb02 <+466>:  je     0x10a4dbb19               ; <+489>
    0x10a4dbb04 <+468>:  movq   0x2d449d(%rip), %rsi      ; "forwardInvocation:"
    0x10a4dbb0b <+475>:  movq   %r14, %rdi
    0x10a4dbb0e <+478>:  movq   %rbx, %rdx
    0x10a4dbb11 <+481>:  callq  *0x2e66f1(%rip)           ; (void *)0x000000010ca5c800: objc_msgSend
    0x10a4dbb17 <+487>:  jmp    0x10a4dbb3a               ; <+522>
    0x10a4dbb19 <+489>:  movq   %r14, %rdi
    0x10a4dbb1c <+492>:  callq  0x10a5ec01e               ; symbol stub for: object_getClassName
    0x10a4dbb21 <+497>:  movq   %rax, %rcx
    0x10a4dbb24 <+500>:  leaq   0x2fc7f5(%rip), %rsi      ; @"*** NSForwarding: warning: object %p of class '%s' does not implement forwardInvocation: -- dropping message"
    0x10a4dbb2b <+507>:  movl   $0x4, %edi
    0x10a4dbb30 <+512>:  xorl   %eax, %eax
    0x10a4dbb32 <+514>:  movq   %r14, %rdx
    0x10a4dbb35 <+517>:  callq  0x10a522a50               ; CFLog
    0x10a4dbb3a <+522>:  movq   0x2d578f(%rip), %rax      ; NSInvocation._retainedArgs
    0x10a4dbb41 <+529>:  cmpb   $0x0, (%rbx,%rax)
    0x10a4dbb45 <+533>:  je     0x10a4dbb79               ; <+585>
    0x10a4dbb47 <+535>:  movq   (%r13), %rax
    0x10a4dbb4b <+539>:  testb  $-0x80, 0x22(%rax)
    0x10a4dbb4f <+543>:  je     0x10a4dbb79               ; <+585>
    0x10a4dbb51 <+545>:  movq   0x2d5768(%rip), %rcx      ; NSInvocation._frame
    0x10a4dbb58 <+552>:  movq   (%rbx,%rcx), %rcx
    0x10a4dbb5c <+556>:  movl   0x1c(%rax), %edx
    0x10a4dbb5f <+559>:  movzbl 0x20(%rax), %esi
    0x10a4dbb63 <+563>:  addq   %rdx, %rsi
    0x10a4dbb66 <+566>:  movq   (%r15,%rsi), %rdi
    0x10a4dbb6a <+570>:  movq   (%rcx,%rsi), %rsi
    0x10a4dbb6e <+574>:  movq   (%rax), %rax
    0x10a4dbb71 <+577>:  movl   0x10(%rax), %edx
    0x10a4dbb74 <+580>:  callq  0x10a5ec58e               ; symbol stub for: memmove
    0x10a4dbb79 <+585>:  movq   0x2d5738(%rip), %rax      ; NSInvocation._retdata
    0x10a4dbb80 <+592>:  movq   (%rbx,%rax), %r15
    0x10a4dbb84 <+596>:  movq   0x2d4425(%rip), %rsi      ; "methodReturnType"
    0x10a4dbb8b <+603>:  movq   %r12, %rdi
    0x10a4dbb8e <+606>:  callq  *0x2e6674(%rip)           ; (void *)0x000000010ca5c800: objc_msgSend
    0x10a4dbb94 <+612>:  movzbl (%rax), %eax
    0x10a4dbb97 <+615>:  cmpl   $0x44, %eax
    0x10a4dbb9a <+618>:  jne    0x10a4dbbd1               ; <+673>
    0x10a4dbb9c <+620>:  fldt   (%r15)
    0x10a4dbb9f <+623>:  jmp    0x10a4dbbd1               ; <+673>
    0x10a4dbba1 <+625>:  movq   %rax, %rbx
    0x10a4dbba4 <+628>:  movq   %rbx, %rdi
    0x10a4dbba7 <+631>:  callq  0x10a5961f0               ; getAtomTarget
    0x10a4dbbac <+636>:  movq   %rax, %r12
    0x10a4dbbaf <+639>:  movq   %r12, (%r15,%r14)
    0x10a4dbbb3 <+643>:  movl   $0x400, %ecx              ; imm = 0x400 
    0x10a4dbbb8 <+648>:  xorl   %r8d, %r8d
    0x10a4dbbbb <+651>:  movq   %r13, %rdi
    0x10a4dbbbe <+654>:  movq   %r15, %rsi
    0x10a4dbbc1 <+657>:  movq   %r15, %rdx
    0x10a4dbbc4 <+660>:  callq  0x10a475540               ; __invoking___
    0x10a4dbbc9 <+665>:  cmpq   %r12, (%r15)
    0x10a4dbbcc <+668>:  jne    0x10a4dbbd1               ; <+673>
    0x10a4dbbce <+670>:  movq   %rbx, (%r15)
    0x10a4dbbd1 <+673>:  movq   %r15, %rax
    0x10a4dbbd4 <+676>:  addq   $0x18, %rsp
    0x10a4dbbd8 <+680>:  popq   %rbx
    0x10a4dbbd9 <+681>:  popq   %r12
    0x10a4dbbdb <+683>:  popq   %r13
    0x10a4dbbdd <+685>:  popq   %r14
    0x10a4dbbdf <+687>:  popq   %r15
    0x10a4dbbe1 <+689>:  popq   %rbp
    0x10a4dbbe2 <+690>:  retq   
    0x10a4dbbe3 <+691>:  leaq   0x2e1f96(%rip), %rax      ; __CFOASafe
    0x10a4dbbea <+698>:  cmpb   $0x0, (%rax)
    0x10a4dbbed <+701>:  je     0x10a4dbc04               ; <+724>
    0x10a4dbbef <+703>:  movl   $0x15, %edi
    0x10a4dbbf4 <+708>:  xorl   %edx, %edx
    0x10a4dbbf6 <+710>:  xorl   %ecx, %ecx
    0x10a4dbbf8 <+712>:  xorl   %r8d, %r8d
    0x10a4dbbfb <+715>:  movq   -0x40(%rbp), %rsi
    0x10a4dbbff <+719>:  callq  0x10a55f740               ; __CFRecordAllocationEvent
    0x10a4dbc04 <+724>:  addq   $0xa, %r14
    0x10a4dbc08 <+728>:  movq   -0x30(%rbp), %rdi
    0x10a4dbc0c <+732>:  callq  0x10a5ec03c               ; symbol stub for: sel_getName
    0x10a4dbc11 <+737>:  movq   %rax, %rcx
    0x10a4dbc14 <+740>:  leaq   0x2fc645(%rip), %rsi      ; @"*** -[%s %s]: message sent to deallocated instance %p"
    0x10a4dbc1b <+747>:  movl   $0x3, %edi
    0x10a4dbc20 <+752>:  xorl   %eax, %eax
    0x10a4dbc22 <+754>:  movq   %r14, %rdx
    0x10a4dbc25 <+757>:  movq   -0x40(%rbp), %r8
    0x10a4dbc29 <+761>:  callq  0x10a522a50               ; CFLog
    0x10a4dbc2e <+766>:  int3   
->  0x10a4dbc2f <+767>:  jmp    0x10a4dbd22               ; <+1010>
    0x10a4dbc34 <+772>:  movq   %r12, %rdi
    0x10a4dbc37 <+775>:  callq  0x10a5ebf28               ; symbol stub for: class_getSuperclass
    0x10a4dbc3c <+780>:  movq   %rax, %rbx
    0x10a4dbc3f <+783>:  movq   %r14, %rdi
    0x10a4dbc42 <+786>:  callq  0x10a5ec01e               ; symbol stub for: object_getClassName
    0x10a4dbc47 <+791>:  movq   %rax, %r15
    0x10a4dbc4a <+794>:  testq  %rbx, %rbx
    0x10a4dbc4d <+797>:  jne    0x10a4dbc78               ; <+840>
    0x10a4dbc4f <+799>:  movq   %r14, %rdi
    0x10a4dbc52 <+802>:  callq  0x10a5ec01e               ; symbol stub for: object_getClassName
    0x10a4dbc57 <+807>:  movq   %rax, %rbx
    0x10a4dbc5a <+810>:  leaq   0x2fc61f(%rip), %rsi      ; @"*** NSForwarding: warning: object %p of class '%s' does not implement methodSignatureForSelector: -- did you forget to declare the superclass of '%s'?"
    0x10a4dbc61 <+817>:  movl   $0x4, %edi
    0x10a4dbc66 <+822>:  xorl   %eax, %eax
    0x10a4dbc68 <+824>:  movq   %r14, %rdx
    0x10a4dbc6b <+827>:  movq   %r15, %rcx
    0x10a4dbc6e <+830>:  movq   %rbx, %r8
    0x10a4dbc71 <+833>:  callq  0x10a522a50               ; CFLog
    0x10a4dbc76 <+838>:  jmp    0x10a4dbc91               ; <+865>
    0x10a4dbc78 <+840>:  leaq   0x2fc621(%rip), %rsi      ; @"*** NSForwarding: warning: object %p of class '%s' does not implement methodSignatureForSelector: -- trouble ahead"
    0x10a4dbc7f <+847>:  movl   $0x4, %edi
    0x10a4dbc84 <+852>:  xorl   %eax, %eax
    0x10a4dbc86 <+854>:  movq   %r14, %rdx
    0x10a4dbc89 <+857>:  movq   %r15, %rcx
    0x10a4dbc8c <+860>:  callq  0x10a522a50               ; CFLog
    0x10a4dbc91 <+865>:  movq   -0x30(%rbp), %rbx
    0x10a4dbc95 <+869>:  movq   %rbx, %rdi
    0x10a4dbc98 <+872>:  callq  0x10a5ec03c               ; symbol stub for: sel_getName
    0x10a4dbc9d <+877>:  movq   %rax, %r15
    0x10a4dbca0 <+880>:  movq   %r15, %rdi
    0x10a4dbca3 <+883>:  callq  0x10a5ec042               ; symbol stub for: sel_getUid
    0x10a4dbca8 <+888>:  movq   %rax, %r8
    0x10a4dbcab <+891>:  cmpq   %rbx, %r8
    0x10a4dbcae <+894>:  movq   %rbx, %r12
    0x10a4dbcb1 <+897>:  je     0x10a4dbccc               ; <+924>
    0x10a4dbcb3 <+899>:  leaq   0x2fc606(%rip), %rsi      ; @"*** NSForwarding: warning: selector (%p) for message '%s' does not match selector known to Objective C runtime (%p)-- abort"
    0x10a4dbcba <+906>:  movl   $0x4, %edi
    0x10a4dbcbf <+911>:  xorl   %eax, %eax
    0x10a4dbcc1 <+913>:  movq   %r12, %rdx
    0x10a4dbcc4 <+916>:  movq   %r15, %rcx
    0x10a4dbcc7 <+919>:  callq  0x10a522a50               ; CFLog
    0x10a4dbccc <+924>:  movq   %r14, %rdi
    0x10a4dbccf <+927>:  callq  0x10a5ec018               ; symbol stub for: object_getClass
    0x10a4dbcd4 <+932>:  movq   0x2d3de5(%rip), %rsi      ; "doesNotRecognizeSelector:"
    0x10a4dbcdb <+939>:  movq   %rax, %rdi
    0x10a4dbcde <+942>:  callq  0x10a5ebf34               ; symbol stub for: class_respondsToSelector
    0x10a4dbce3 <+947>:  testb  %al, %al
    0x10a4dbce5 <+949>:  je     0x10a4dbcfd               ; <+973>
    0x10a4dbce7 <+951>:  movq   0x2d3dd2(%rip), %rsi      ; "doesNotRecognizeSelector:"
    0x10a4dbcee <+958>:  movq   %r14, %rdi
    0x10a4dbcf1 <+961>:  movq   %r12, %rdx
    0x10a4dbcf4 <+964>:  callq  *0x2e650e(%rip)           ; (void *)0x000000010ca5c800: objc_msgSend
    0x10a4dbcfa <+970>:  int3   
    0x10a4dbcfb <+971>:  jmp    0x10a4dbd22               ; <+1010>
    0x10a4dbcfd <+973>:  movq   %r14, %rbx
    0x10a4dbd00 <+976>:  movq   %rbx, %rdi
    0x10a4dbd03 <+979>:  callq  0x10a5ec01e               ; symbol stub for: object_getClassName
    0x10a4dbd08 <+984>:  movq   %rax, %rcx
    0x10a4dbd0b <+987>:  leaq   0x2fc5ce(%rip), %rsi      ; @"*** NSForwarding: warning: object %p of class '%s' does not implement doesNotRecognizeSelector: -- abort"
    0x10a4dbd12 <+994>:  movl   $0x4, %edi
    0x10a4dbd17 <+999>:  xorl   %eax, %eax
    0x10a4dbd19 <+1001>: movq   %rbx, %rdx
    0x10a4dbd1c <+1004>: callq  0x10a522a50               ; CFLog
    0x10a4dbd21 <+1009>: int3   
    0x10a4dbd22 <+1010>: callq  0x10a5ec468               ; symbol stub for: getpid
    0x10a4dbd27 <+1015>: movl   $0x9, %esi
    0x10a4dbd2c <+1020>: movl   %eax, %edi
    0x10a4dbd2e <+1022>: callq  0x10a5ec4c2               ; symbol stub for: kill
    0x10a4dbd33 <+1027>: nopw   %cs:(%rax,%rax)
@jamesbebbington commented on GitHub (Mar 30, 2016): Does this help? <img width="1552" alt="screen shot 2016-03-30 at 10 13 06" src="https://cloud.githubusercontent.com/assets/5934/14137534/0cff0b6e-f660-11e5-8ea2-1dde24ff7819.png"> ``` 2016-03-30 09:49:58.667 Liveminds[16399:171795] *** -[CFString release]: message sent to deallocated instance 0x7ff48485b1a0 ``` ``` CoreFoundation`___forwarding___: 0x10a4db930 <+0>: pushq %rbp 0x10a4db931 <+1>: movq %rsp, %rbp 0x10a4db934 <+4>: pushq %r15 0x10a4db936 <+6>: pushq %r14 0x10a4db938 <+8>: pushq %r13 0x10a4db93a <+10>: pushq %r12 0x10a4db93c <+12>: pushq %rbx 0x10a4db93d <+13>: subq $0x18, %rsp 0x10a4db941 <+17>: movq %rsi, -0x38(%rbp) 0x10a4db945 <+21>: movq %rdi, %r15 0x10a4db948 <+24>: movabsq $0x7000000000000000, %rdx ; imm = 0x7000000000000000 0x10a4db952 <+34>: testq %rsi, %rsi 0x10a4db955 <+37>: setne %al 0x10a4db958 <+40>: movq 0x2e68a9(%rip), %r13 ; (void *)0x000000010ca5c800: objc_msgSend 0x10a4db95f <+47>: cmovneq 0x2e68b9(%rip), %r13 ; (void *)0x000000010ca5ce00: objc_msgSend_stret 0x10a4db967 <+55>: movzbl %al, %eax 0x10a4db96a <+58>: movq 0x8(%r15,%rax,8), %rcx 0x10a4db96f <+63>: movq %rcx, -0x30(%rbp) 0x10a4db973 <+67>: movq (%r15,%rax,8), %rbx 0x10a4db977 <+71>: leaq (,%rax,8), %r14 0x10a4db97f <+79>: testq %rbx, %rbx 0x10a4db982 <+82>: jns 0x10a4db98d ; <+93> 0x10a4db984 <+84>: testq %rbx, %rdx 0x10a4db987 <+87>: je 0x10a4dbba4 ; <+628> 0x10a4db98d <+93>: movq %r14, -0x40(%rbp) 0x10a4db991 <+97>: movq %rbx, %rdi 0x10a4db994 <+100>: callq 0x10a5ec018 ; symbol stub for: object_getClass 0x10a4db999 <+105>: movq %rax, %r12 0x10a4db99c <+108>: movq %r12, %rdi 0x10a4db99f <+111>: callq 0x10a5ebf22 ; symbol stub for: class_getName 0x10a4db9a4 <+116>: movq %rax, %r14 0x10a4db9a7 <+119>: movq 0x2d45f2(%rip), %rsi ; "forwardingTargetForSelector:" 0x10a4db9ae <+126>: movq %r12, %rdi 0x10a4db9b1 <+129>: callq 0x10a5ebf34 ; symbol stub for: class_respondsToSelector 0x10a4db9b6 <+134>: testb %al, %al 0x10a4db9b8 <+136>: je 0x10a4dba00 ; <+208> 0x10a4db9ba <+138>: movq 0x2d45df(%rip), %rsi ; "forwardingTargetForSelector:" 0x10a4db9c1 <+145>: movq %rbx, %rdi 0x10a4db9c4 <+148>: movq -0x30(%rbp), %rdx 0x10a4db9c8 <+152>: callq *0x2e683a(%rip) ; (void *)0x000000010ca5c800: objc_msgSend 0x10a4db9ce <+158>: testq %rax, %rax 0x10a4db9d1 <+161>: je 0x10a4dba00 ; <+208> 0x10a4db9d3 <+163>: cmpq %rbx, %rax 0x10a4db9d6 <+166>: je 0x10a4dba00 ; <+208> 0x10a4db9d8 <+168>: testq %rax, %rax 0x10a4db9db <+171>: movq -0x40(%rbp), %r14 0x10a4db9df <+175>: movabsq $0x7000000000000000, %rcx ; imm = 0x7000000000000000 0x10a4db9e9 <+185>: jns 0x10a4db9f4 ; <+196> 0x10a4db9eb <+187>: testq %rax, %rcx 0x10a4db9ee <+190>: je 0x10a4dbba1 ; <+625> 0x10a4db9f4 <+196>: movq %rax, (%r15,%r14) 0x10a4db9f8 <+200>: xorl %r15d, %r15d 0x10a4db9fb <+203>: jmp 0x10a4dbbd1 ; <+673> 0x10a4dba00 <+208>: movq %rbx, -0x40(%rbp) 0x10a4dba04 <+212>: leaq 0x2acafa(%rip), %rsi ; "_NSZombie_" 0x10a4dba0b <+219>: movl $0xa, %edx 0x10a4dba10 <+224>: movq %r14, %rdi 0x10a4dba13 <+227>: callq 0x10a5ec798 ; symbol stub for: strncmp 0x10a4dba18 <+232>: testl %eax, %eax 0x10a4dba1a <+234>: je 0x10a4dbbe3 ; <+691> 0x10a4dba20 <+240>: movq 0x2d4541(%rip), %rsi ; "methodSignatureForSelector:" 0x10a4dba27 <+247>: movq %r12, %rdi 0x10a4dba2a <+250>: callq 0x10a5ebf34 ; symbol stub for: class_respondsToSelector 0x10a4dba2f <+255>: testb %al, %al 0x10a4dba31 <+257>: movq -0x40(%rbp), %r14 0x10a4dba35 <+261>: movq -0x38(%rbp), %r13 0x10a4dba39 <+265>: je 0x10a4dbc34 ; <+772> 0x10a4dba3f <+271>: movq 0x2d4522(%rip), %rsi ; "methodSignatureForSelector:" 0x10a4dba46 <+278>: movq %r14, %rdi 0x10a4dba49 <+281>: movq -0x30(%rbp), %rdx 0x10a4dba4d <+285>: callq *0x2e67b5(%rip) ; (void *)0x000000010ca5c800: objc_msgSend 0x10a4dba53 <+291>: movq %rax, %r12 0x10a4dba56 <+294>: testq %r12, %r12 0x10a4dba59 <+297>: je 0x10a4dbc91 ; <+865> 0x10a4dba5f <+303>: movq 0x2d44d2(%rip), %rsi ; "_frameDescriptor" 0x10a4dba66 <+310>: movq %r12, %rdi 0x10a4dba69 <+313>: callq *0x2e6799(%rip) ; (void *)0x000000010ca5c800: objc_msgSend 0x10a4dba6f <+319>: movq %rax, %rbx 0x10a4dba72 <+322>: movq (%rbx), %rax 0x10a4dba75 <+325>: movzwl 0x22(%rax), %eax 0x10a4dba79 <+329>: shrl $0x6, %eax 0x10a4dba7c <+332>: andq $0x1, %rax 0x10a4dba80 <+336>: cmpq %r13, %rax 0x10a4dba83 <+339>: je 0x10a4dbac9 ; <+409> 0x10a4dba85 <+341>: movq -0x30(%rbp), %rdi 0x10a4dba89 <+345>: callq 0x10a5ec03c ; symbol stub for: sel_getName 0x10a4dba8e <+350>: movq %rax, %rdx 0x10a4dba91 <+353>: movq (%rbx), %rax 0x10a4dba94 <+356>: movzwl 0x22(%rax), %eax 0x10a4dba98 <+360>: leaq 0x2a3bb9(%rip), %rsi ; "" 0x10a4dba9f <+367>: leaq 0x2b34c1(%rip), %r8 ; " not" 0x10a4dbaa6 <+374>: testb $0x40, %al 0x10a4dbaa8 <+376>: movq %r8, %rcx 0x10a4dbaab <+379>: cmovneq %rsi, %rcx 0x10a4dbaaf <+383>: testq %r13, %r13 0x10a4dbab2 <+386>: cmovneq %rsi, %r8 0x10a4dbab6 <+390>: leaq 0x2fc843(%rip), %rsi ; @"*** NSForwarding: warning: method signature and compiler disagree on struct-return-edness of '%s'. Signature thinks it does%s return a struct, and compiler thinks it does%s." 0x10a4dbabd <+397>: movl $0x4, %edi 0x10a4dbac2 <+402>: xorl %eax, %eax 0x10a4dbac4 <+404>: callq 0x10a522a50 ; CFLog 0x10a4dbac9 <+409>: movq %rbx, %r13 0x10a4dbacc <+412>: movq 0x2d4f85(%rip), %rdi ; (void *)0x000000010a7b3448: NSInvocation 0x10a4dbad3 <+419>: movq 0x2d449e(%rip), %rsi ; "_invocationWithMethodSignature:frame:" 0x10a4dbada <+426>: movq %r12, %rdx 0x10a4dbadd <+429>: movq %r15, %rcx 0x10a4dbae0 <+432>: callq *0x2e6722(%rip) ; (void *)0x000000010ca5c800: objc_msgSend 0x10a4dbae6 <+438>: movq %rax, %rbx 0x10a4dbae9 <+441>: movq %r14, %rdi 0x10a4dbaec <+444>: callq 0x10a5ec018 ; symbol stub for: object_getClass 0x10a4dbaf1 <+449>: movq 0x2d44b0(%rip), %rsi ; "forwardInvocation:" 0x10a4dbaf8 <+456>: movq %rax, %rdi 0x10a4dbafb <+459>: callq 0x10a5ebf34 ; symbol stub for: class_respondsToSelector 0x10a4dbb00 <+464>: testb %al, %al 0x10a4dbb02 <+466>: je 0x10a4dbb19 ; <+489> 0x10a4dbb04 <+468>: movq 0x2d449d(%rip), %rsi ; "forwardInvocation:" 0x10a4dbb0b <+475>: movq %r14, %rdi 0x10a4dbb0e <+478>: movq %rbx, %rdx 0x10a4dbb11 <+481>: callq *0x2e66f1(%rip) ; (void *)0x000000010ca5c800: objc_msgSend 0x10a4dbb17 <+487>: jmp 0x10a4dbb3a ; <+522> 0x10a4dbb19 <+489>: movq %r14, %rdi 0x10a4dbb1c <+492>: callq 0x10a5ec01e ; symbol stub for: object_getClassName 0x10a4dbb21 <+497>: movq %rax, %rcx 0x10a4dbb24 <+500>: leaq 0x2fc7f5(%rip), %rsi ; @"*** NSForwarding: warning: object %p of class '%s' does not implement forwardInvocation: -- dropping message" 0x10a4dbb2b <+507>: movl $0x4, %edi 0x10a4dbb30 <+512>: xorl %eax, %eax 0x10a4dbb32 <+514>: movq %r14, %rdx 0x10a4dbb35 <+517>: callq 0x10a522a50 ; CFLog 0x10a4dbb3a <+522>: movq 0x2d578f(%rip), %rax ; NSInvocation._retainedArgs 0x10a4dbb41 <+529>: cmpb $0x0, (%rbx,%rax) 0x10a4dbb45 <+533>: je 0x10a4dbb79 ; <+585> 0x10a4dbb47 <+535>: movq (%r13), %rax 0x10a4dbb4b <+539>: testb $-0x80, 0x22(%rax) 0x10a4dbb4f <+543>: je 0x10a4dbb79 ; <+585> 0x10a4dbb51 <+545>: movq 0x2d5768(%rip), %rcx ; NSInvocation._frame 0x10a4dbb58 <+552>: movq (%rbx,%rcx), %rcx 0x10a4dbb5c <+556>: movl 0x1c(%rax), %edx 0x10a4dbb5f <+559>: movzbl 0x20(%rax), %esi 0x10a4dbb63 <+563>: addq %rdx, %rsi 0x10a4dbb66 <+566>: movq (%r15,%rsi), %rdi 0x10a4dbb6a <+570>: movq (%rcx,%rsi), %rsi 0x10a4dbb6e <+574>: movq (%rax), %rax 0x10a4dbb71 <+577>: movl 0x10(%rax), %edx 0x10a4dbb74 <+580>: callq 0x10a5ec58e ; symbol stub for: memmove 0x10a4dbb79 <+585>: movq 0x2d5738(%rip), %rax ; NSInvocation._retdata 0x10a4dbb80 <+592>: movq (%rbx,%rax), %r15 0x10a4dbb84 <+596>: movq 0x2d4425(%rip), %rsi ; "methodReturnType" 0x10a4dbb8b <+603>: movq %r12, %rdi 0x10a4dbb8e <+606>: callq *0x2e6674(%rip) ; (void *)0x000000010ca5c800: objc_msgSend 0x10a4dbb94 <+612>: movzbl (%rax), %eax 0x10a4dbb97 <+615>: cmpl $0x44, %eax 0x10a4dbb9a <+618>: jne 0x10a4dbbd1 ; <+673> 0x10a4dbb9c <+620>: fldt (%r15) 0x10a4dbb9f <+623>: jmp 0x10a4dbbd1 ; <+673> 0x10a4dbba1 <+625>: movq %rax, %rbx 0x10a4dbba4 <+628>: movq %rbx, %rdi 0x10a4dbba7 <+631>: callq 0x10a5961f0 ; getAtomTarget 0x10a4dbbac <+636>: movq %rax, %r12 0x10a4dbbaf <+639>: movq %r12, (%r15,%r14) 0x10a4dbbb3 <+643>: movl $0x400, %ecx ; imm = 0x400 0x10a4dbbb8 <+648>: xorl %r8d, %r8d 0x10a4dbbbb <+651>: movq %r13, %rdi 0x10a4dbbbe <+654>: movq %r15, %rsi 0x10a4dbbc1 <+657>: movq %r15, %rdx 0x10a4dbbc4 <+660>: callq 0x10a475540 ; __invoking___ 0x10a4dbbc9 <+665>: cmpq %r12, (%r15) 0x10a4dbbcc <+668>: jne 0x10a4dbbd1 ; <+673> 0x10a4dbbce <+670>: movq %rbx, (%r15) 0x10a4dbbd1 <+673>: movq %r15, %rax 0x10a4dbbd4 <+676>: addq $0x18, %rsp 0x10a4dbbd8 <+680>: popq %rbx 0x10a4dbbd9 <+681>: popq %r12 0x10a4dbbdb <+683>: popq %r13 0x10a4dbbdd <+685>: popq %r14 0x10a4dbbdf <+687>: popq %r15 0x10a4dbbe1 <+689>: popq %rbp 0x10a4dbbe2 <+690>: retq 0x10a4dbbe3 <+691>: leaq 0x2e1f96(%rip), %rax ; __CFOASafe 0x10a4dbbea <+698>: cmpb $0x0, (%rax) 0x10a4dbbed <+701>: je 0x10a4dbc04 ; <+724> 0x10a4dbbef <+703>: movl $0x15, %edi 0x10a4dbbf4 <+708>: xorl %edx, %edx 0x10a4dbbf6 <+710>: xorl %ecx, %ecx 0x10a4dbbf8 <+712>: xorl %r8d, %r8d 0x10a4dbbfb <+715>: movq -0x40(%rbp), %rsi 0x10a4dbbff <+719>: callq 0x10a55f740 ; __CFRecordAllocationEvent 0x10a4dbc04 <+724>: addq $0xa, %r14 0x10a4dbc08 <+728>: movq -0x30(%rbp), %rdi 0x10a4dbc0c <+732>: callq 0x10a5ec03c ; symbol stub for: sel_getName 0x10a4dbc11 <+737>: movq %rax, %rcx 0x10a4dbc14 <+740>: leaq 0x2fc645(%rip), %rsi ; @"*** -[%s %s]: message sent to deallocated instance %p" 0x10a4dbc1b <+747>: movl $0x3, %edi 0x10a4dbc20 <+752>: xorl %eax, %eax 0x10a4dbc22 <+754>: movq %r14, %rdx 0x10a4dbc25 <+757>: movq -0x40(%rbp), %r8 0x10a4dbc29 <+761>: callq 0x10a522a50 ; CFLog 0x10a4dbc2e <+766>: int3 -> 0x10a4dbc2f <+767>: jmp 0x10a4dbd22 ; <+1010> 0x10a4dbc34 <+772>: movq %r12, %rdi 0x10a4dbc37 <+775>: callq 0x10a5ebf28 ; symbol stub for: class_getSuperclass 0x10a4dbc3c <+780>: movq %rax, %rbx 0x10a4dbc3f <+783>: movq %r14, %rdi 0x10a4dbc42 <+786>: callq 0x10a5ec01e ; symbol stub for: object_getClassName 0x10a4dbc47 <+791>: movq %rax, %r15 0x10a4dbc4a <+794>: testq %rbx, %rbx 0x10a4dbc4d <+797>: jne 0x10a4dbc78 ; <+840> 0x10a4dbc4f <+799>: movq %r14, %rdi 0x10a4dbc52 <+802>: callq 0x10a5ec01e ; symbol stub for: object_getClassName 0x10a4dbc57 <+807>: movq %rax, %rbx 0x10a4dbc5a <+810>: leaq 0x2fc61f(%rip), %rsi ; @"*** NSForwarding: warning: object %p of class '%s' does not implement methodSignatureForSelector: -- did you forget to declare the superclass of '%s'?" 0x10a4dbc61 <+817>: movl $0x4, %edi 0x10a4dbc66 <+822>: xorl %eax, %eax 0x10a4dbc68 <+824>: movq %r14, %rdx 0x10a4dbc6b <+827>: movq %r15, %rcx 0x10a4dbc6e <+830>: movq %rbx, %r8 0x10a4dbc71 <+833>: callq 0x10a522a50 ; CFLog 0x10a4dbc76 <+838>: jmp 0x10a4dbc91 ; <+865> 0x10a4dbc78 <+840>: leaq 0x2fc621(%rip), %rsi ; @"*** NSForwarding: warning: object %p of class '%s' does not implement methodSignatureForSelector: -- trouble ahead" 0x10a4dbc7f <+847>: movl $0x4, %edi 0x10a4dbc84 <+852>: xorl %eax, %eax 0x10a4dbc86 <+854>: movq %r14, %rdx 0x10a4dbc89 <+857>: movq %r15, %rcx 0x10a4dbc8c <+860>: callq 0x10a522a50 ; CFLog 0x10a4dbc91 <+865>: movq -0x30(%rbp), %rbx 0x10a4dbc95 <+869>: movq %rbx, %rdi 0x10a4dbc98 <+872>: callq 0x10a5ec03c ; symbol stub for: sel_getName 0x10a4dbc9d <+877>: movq %rax, %r15 0x10a4dbca0 <+880>: movq %r15, %rdi 0x10a4dbca3 <+883>: callq 0x10a5ec042 ; symbol stub for: sel_getUid 0x10a4dbca8 <+888>: movq %rax, %r8 0x10a4dbcab <+891>: cmpq %rbx, %r8 0x10a4dbcae <+894>: movq %rbx, %r12 0x10a4dbcb1 <+897>: je 0x10a4dbccc ; <+924> 0x10a4dbcb3 <+899>: leaq 0x2fc606(%rip), %rsi ; @"*** NSForwarding: warning: selector (%p) for message '%s' does not match selector known to Objective C runtime (%p)-- abort" 0x10a4dbcba <+906>: movl $0x4, %edi 0x10a4dbcbf <+911>: xorl %eax, %eax 0x10a4dbcc1 <+913>: movq %r12, %rdx 0x10a4dbcc4 <+916>: movq %r15, %rcx 0x10a4dbcc7 <+919>: callq 0x10a522a50 ; CFLog 0x10a4dbccc <+924>: movq %r14, %rdi 0x10a4dbccf <+927>: callq 0x10a5ec018 ; symbol stub for: object_getClass 0x10a4dbcd4 <+932>: movq 0x2d3de5(%rip), %rsi ; "doesNotRecognizeSelector:" 0x10a4dbcdb <+939>: movq %rax, %rdi 0x10a4dbcde <+942>: callq 0x10a5ebf34 ; symbol stub for: class_respondsToSelector 0x10a4dbce3 <+947>: testb %al, %al 0x10a4dbce5 <+949>: je 0x10a4dbcfd ; <+973> 0x10a4dbce7 <+951>: movq 0x2d3dd2(%rip), %rsi ; "doesNotRecognizeSelector:" 0x10a4dbcee <+958>: movq %r14, %rdi 0x10a4dbcf1 <+961>: movq %r12, %rdx 0x10a4dbcf4 <+964>: callq *0x2e650e(%rip) ; (void *)0x000000010ca5c800: objc_msgSend 0x10a4dbcfa <+970>: int3 0x10a4dbcfb <+971>: jmp 0x10a4dbd22 ; <+1010> 0x10a4dbcfd <+973>: movq %r14, %rbx 0x10a4dbd00 <+976>: movq %rbx, %rdi 0x10a4dbd03 <+979>: callq 0x10a5ec01e ; symbol stub for: object_getClassName 0x10a4dbd08 <+984>: movq %rax, %rcx 0x10a4dbd0b <+987>: leaq 0x2fc5ce(%rip), %rsi ; @"*** NSForwarding: warning: object %p of class '%s' does not implement doesNotRecognizeSelector: -- abort" 0x10a4dbd12 <+994>: movl $0x4, %edi 0x10a4dbd17 <+999>: xorl %eax, %eax 0x10a4dbd19 <+1001>: movq %rbx, %rdx 0x10a4dbd1c <+1004>: callq 0x10a522a50 ; CFLog 0x10a4dbd21 <+1009>: int3 0x10a4dbd22 <+1010>: callq 0x10a5ec468 ; symbol stub for: getpid 0x10a4dbd27 <+1015>: movl $0x9, %esi 0x10a4dbd2c <+1020>: movl %eax, %edi 0x10a4dbd2e <+1022>: callq 0x10a5ec4c2 ; symbol stub for: kill 0x10a4dbd33 <+1027>: nopw %cs:(%rax,%rax) ```
Author
Owner

@JohnEstropia commented on GitHub (Mar 30, 2016):

Thanks! message sent to deallocated instance means there's definitely a leak somewhere. I'll try to dig through possible locations.

@JohnEstropia commented on GitHub (Mar 30, 2016): Thanks! `message sent to deallocated instance` means there's definitely a leak somewhere. I'll try to dig through possible locations.
Author
Owner

@JohnEstropia commented on GitHub (Mar 30, 2016):

I'm guessing you are importing CoreStore's source files directly in your project? (without using frameworks)
One thing I noticed in your stack trace

...
@objc CoreStoreFetchedResultsController
...

CoreStoreFetchedResultsController is being marked as @objc, which normally wouldn't happen if built as a framework. That in itself is not a problem, but the deallocation behavior probably is different so that's why I can't reproduce it on my side.

Anyway try out the commit here: 633ab0a249
If it works for you I'll update the master branch.

@JohnEstropia commented on GitHub (Mar 30, 2016): I'm guessing you are importing CoreStore's source files directly in your project? (without using frameworks) One thing I noticed in your stack trace ``` ... @objc CoreStoreFetchedResultsController ... ``` CoreStoreFetchedResultsController is being marked as `@objc`, which normally wouldn't happen if built as a framework. That in itself is not a problem, but the deallocation behavior probably is different so that's why I can't reproduce it on my side. Anyway try out the commit here: https://github.com/JohnEstropia/CoreStore/commit/633ab0a2498ebc655f6f75d5d93e35c4251f05f0 If it works for you I'll update the master branch.
Author
Owner

@jamesbebbington commented on GitHub (Mar 30, 2016):

Actually I'm using cocoapods, my Podfile begins:

source 'https://github.com/CocoaPods/Specs'

platform :ios, '8.0'

use_frameworks!

…

I'll get back to you about that latest commit in about 30 mins.

Cheers.

@jamesbebbington commented on GitHub (Mar 30, 2016): Actually I'm using cocoapods, my `Podfile` begins: ``` source 'https://github.com/CocoaPods/Specs' platform :ios, '8.0' use_frameworks! … ``` I'll get back to you about that latest commit in about 30 mins. Cheers.
Author
Owner

@jamesbebbington commented on GitHub (Mar 30, 2016):

So 633ab0a249 crashes in CoreStoreFetchedResultsController:

screen shot 2016-03-30 at 15 20 21

This is with zombies enabled, nothing is printed to the console

@jamesbebbington commented on GitHub (Mar 30, 2016): So 633ab0a2498ebc655f6f75d5d93e35c4251f05f0 crashes in `CoreStoreFetchedResultsController`: <img width="1072" alt="screen shot 2016-03-30 at 15 20 21" src="https://cloud.githubusercontent.com/assets/5934/14145247/13f94dd2-f68b-11e5-95f3-2caf4732dd95.png"> This is with zombies enabled, nothing is printed to the console
Author
Owner

@JohnEstropia commented on GitHub (Mar 31, 2016):

Ookaay... if it's not the delegate that's leaking then this is most probably an ARC bug. I need to find the pattern that triggers it but I cannot reproduce this on my side, so if you have a project that you can send to me that would definitely help.

@JohnEstropia commented on GitHub (Mar 31, 2016): Ookaay... if it's not the delegate that's leaking then this is most probably an ARC bug. I need to find the pattern that triggers it but I cannot reproduce this on my side, so if you have a project that you can send to me that would definitely help.
Author
Owner

@jamesbebbington commented on GitHub (Mar 31, 2016):

Thanks John, I'll see if I can make a minimal test case from my app. Where do you want me to send it?

EDIT: An email address please, so I can create you a login to pull down some test data. Thanks.

@jamesbebbington commented on GitHub (Mar 31, 2016): Thanks John, I'll see if I can make a minimal test case from my app. Where do you want me to send it? EDIT: An email address please, so I can create you a login to pull down some test data. Thanks.
Author
Owner

@JohnEstropia commented on GitHub (Mar 31, 2016):

You can find my address here https://github.com/JohnEstropia/CoreStore/blob/master/CoreStore.podspec

@JohnEstropia commented on GitHub (Mar 31, 2016): You can find my address here https://github.com/JohnEstropia/CoreStore/blob/master/CoreStore.podspec
Author
Owner

@JohnEstropia commented on GitHub (Mar 31, 2016):

Thanks for the test app! I found the culprit and it seems to be an old Core Data bug: http://stackoverflow.com/questions/14396375/nsfetchedresultscontroller-crashes-in-ios-6-if-affectedstores-is-specified

Seems fixable with an NSFetchRequest subclass (0b24072259). Try out the develop branch, hopefully it works fine for you.

@JohnEstropia commented on GitHub (Mar 31, 2016): Thanks for the test app! I found the culprit and it seems to be an old Core Data bug: http://stackoverflow.com/questions/14396375/nsfetchedresultscontroller-crashes-in-ios-6-if-affectedstores-is-specified Seems fixable with an NSFetchRequest subclass (https://github.com/JohnEstropia/CoreStore/commit/0b24072259afdabb9157cd5c562482c44329ba2c). Try out the develop branch, hopefully it works fine for you.
Author
Owner

@jamesbebbington commented on GitHub (Mar 31, 2016):

That seems to have done the trick! Loving your work, cheers John.

@jamesbebbington commented on GitHub (Mar 31, 2016): That seems to have done the trick! Loving your work, cheers John.
Author
Owner

@JohnEstropia commented on GitHub (Mar 31, 2016):

Great, I'll merge to master and push the pod update then.

@JohnEstropia commented on GitHub (Mar 31, 2016): Great, I'll merge to master and push the pod update then.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#47