15

i'm having problem debugging from the console with lldb debugger after upgrading to xcode 5. i used to type po object and it used to work fine, however now i get the error

error: instance method 'performBlock:afterDelay:' has incompatible result types in different translation units ('id' vs. 'void')
note: instance method 'performBlock:afterDelay:' also declared here

here is a screenshot of the stack, the code where the debugger stopped at, the values in the visual debugger and the debugger console. what might be the problem, is it a bug in xcode 5 or is there something i can do to rectify this?

akaralar
  • 1,103
  • 1
  • 10
  • 29
  • The Xcode 5 debugger works great for me, and I use the `p` and `po` commands all the time... did you make sure that your run configuration is actually set to `debug` and not `release` (which typically strips these) ? – JRG-Developer Sep 25 '13 at 13:29
  • 1
    Edit to the above: at least for my Xcode, if you set run configuration to `release`, it actually ignores break points... I also tried changing the `code generation` > `optimization level` via `build settings`, which also didn't reproduce this... not sure what you've changed... so, +1 and hopefully someone brighter than me can help you. :D – JRG-Developer Sep 25 '13 at 13:40
  • @JRG-Developer the run configuration is set to `debug`. i only made a symlink to iokit framework which is required for the project and doesn't compile otherwise (it gives a linker error, it seems apple did not create a symlink to the framework root directory unlike other framework root directories before shipping xcode 5) – akaralar Sep 25 '13 at 21:39

1 Answers1

7

I found a way to fix this issue. The problem was that my personal internal framework was declaring a method in a category on NSObject called:

- (void)performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay;

But a third party framework (here BlocksKit) was declaring the same kind of method:

- (id)performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay;

Those two seemed to interfere in LLDB's runtime and were producing this strange message. To fix it, I just changed one of the method name. Please let me know if this work for you.

MonsieurDart
  • 6,005
  • 2
  • 43
  • 45
  • If anyone has this issue and is using the UIKitCategoryAdditions project, it has a category on NSObject that causes just this issue. If you are using this project, I strongly suggest the above fix. – Michael Gaylord Oct 17 '13 at 11:56