Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
513 views
in Technique[技术] by (71.8m points)

objective c - Weird error message in Xcode 4.3 with LLDB

I am currently writing an iOS app with Xcode 4.3.2. In most parts of my code, debugging with LLDB works just fine. However at some point I am getting a strange message while stepping through my code. When I hover over an iVar, it says

Error [IRForTarget]: Couldn't find Objective-C indirect ivar symbol OBJC_IVAR_$_MyFancyClass.iVar

instead of showing me the value. However, in the Variables View, I can see it just fine. Until I'm selecting Print Description of ... that is, because then, Xcode crashes... When I use GDB, the hovering works but the type and values of the variable are wrong.

I recon that there is something wrong with my code which in turn causes the debuggers to fail. However, the code runs fine. I'd love to provide some samplecode but the class is rather long and I can't pinpoint the exact location of my screwup. So has anybody encountered a similar behavior?

UPDATE: Actually, it seems as if this happens everywhere in my code, not just in some specific files. If it helps, while LLDB show the above message, GDB always shows an object of the Class that is owning the iVar, instead of the iVar itself. It looks as if there is something wrong with the memory management. For example, if I say something like

[notificationCenter addObserver:self selector:@selector(foo) name:bar object:objA];

the selector is invoked even when I have

[notificationCenter postNotificationName:bar object:objB];
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The cause of this error are incorrect build settings, as indicated by the discussion in the question post comments. This can be fixed by setting "Deployment Postprocessing" back to NO for Debug-Mode (the default value).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...