I am currently writing an iOS application with Xcode 4.3.2. In most parts of my code, debugging with LLDB works very well. However, at some point I get a strange message when I go through my code. When I hang over iVar, he says
Error [IRForTarget]: Unable to find Objective-C indirect symbol ivar OBJC_IVAR _ $ _ MyFancyClass.iVar
instead of showing me the meaning. However, in Variables View
, I see it just fine. Until I select Print Description of ...
because then Xcode crashes ... When I use GDB, the hang hangs, but the type and values โโof the variable are wrong.
I understand that something is wrong with my code, which in turn causes the debuggers to fail. However, the code is working fine. I would like to provide some sample code, but the class is quite long, and I cannot pinpoint the exact location of my debauchery. So has anyone encountered similar behavior?
UPDATE: Actually, it looks like this happens everywhere in my code, and not just in some specific files. If that helps, while LLDB shows the above message, GDB always shows the class object that owns iVar, not iVar itself. There seems to be something wrong with memory management. For example, if I say something like
[notificationCenter addObserver:self selector:@selector(foo) name:bar object:objA]
the selector is called even if I have
[notificationCenter postNotificationName:bar object:objB]