I'm trying to do a little debugging in my iPhone project, and whenever i try to print out an object to see its description in one specific method i get this message in gdb:
"dwarf2_read_address: Corrupted DWARF
expression."
Does anyone know why this happens and how i would go about fixing it so that i can inspect my variables?
Apparently this is a known bug in gdb, fixed in later versions (6.7 and above). I've found a reference to it in this bugzilla thread, but that's all I managed to find that's in any manner useful. Try updating your GDB installation.
Related
I use Eclipse Luna with PyDev for Eclipse 4.0.0.201504132356.
My function returns a list, which is a list of objects from one class.
So i use it like this:
List = ListMaker()
print List[0].Stuff.Stuff
and this works(!); i see exactly what should be in the list.
However, when making a new new line of code and writing:
List[0].
i get immediately a Problem Occured Message:
No Message gotten (null message)
Java.lang.StackOverflowError
which is clearly wrong; since i see the output is fine and simply clicking the message away. I used the same project in Visual Studio with Python Tools for Visual Studio and never had this Problem either.
Clicking this message away is although pretty annoying. Does someone know how to fix this?
EDIT: The error occures in org.python.pydev.shared_core
I faced the same issue. I upgraded to Pydev 4.1.0 and it was resolved.
http://pydev.org/history_pydev.html
The the list of fixes that went in 4.1.0
This really seems like some recursion issue on the type inference analysis for PyDev.
Can you please report that as a bug at https://sw-brainwy.rhcloud.com/tracker/PyDev/ so that I can take a look to fix it?
If you could create a github repo with sources where I can reproduce the issue, that'd be awesome.
Also, your error log probably contains the stack trace where this happened... At http://pydev.org/faq.html#PyDevFAQ-HowdoIReportaBUG%3F there are instructions on how to get it (please include that in the bug report).
Hi I'am running a debug build with NO optimizations and "DWARF with dSYM file" as debugging format. Why can't I print my dictionary to console? Have I missed something? xCode version is 4.0.2 and Iam using LLVM 2.9 svn version with GDB debugger.
Can't say that I know for sure, but here are a few things to try...
Try "po [dict description]"
Try cleaning before you compile in case old symbols file stuck around for some reason
Are you attaching the debugger after launch? I've had problems with this.
Is this breakpoint firing during the launch? Also had problems with this.
Can you print anything else?
Try inserting an "NSLog(#"%#", [dict description])" in there.
Is your SessionManager for certain returning something that is both a) not nil and b) responds to the selector "description:"? If not you may get nothing.
Looking at your log, my first guess is that you're breaking before the debugger has had a chance to attach properly. Totally a guess, but try the NSLog thing and see if you get output.
Whilst using Xcode 4.0 and trying to debug and see what value is held in what variable - or see what objects are in an array etc, I always seem to get "Summary Unavailable" or "Invalid Summary".
The problem seems much like the one in 3.2.6 if you built and ran a release version with the symbols stripped.
Any chance that any one knows where I am going wrong, or what the resolution is
For years things worked smoothly - then Apple stepped in - again.
Thanks
You're not going wrong, Xcode 4 is. This problem is pretty common, unfortunately. Report it at http://bugreport.apple.com/ and hope for the best.
In the meantime you can inspect variables using the console, which appears at the bottom of Xcode 4's window during debugging. If you have an object "myObj", you can inspect it in the console by typing "po myObj". It's a lot less convenient but it's better than not getting the information at all.
You can also try changing the "Summary Format" in the GDB window. Try something like {(NSString *)[$VAR description]}:s as the Summary format - this works for NSManagedObject derived objects.
While waiting for Apple to fix Xcode 4 you can try using "Print Description", which prints the value to console.
Start your app up in debug
IN XCODE 4.02, go to Product/Debug/Shared Libraries
The window that appears tells you which dynamicLibs are loaded
Scroll down until you see "libXcodeDebuggerSupport.dylib
Click the "Load" button, and then "Done"
After stopping on a breakpoint, the contents of a string should be printed in blue after the object's address.
Hope this helps!
This happened to me upon upgrade to xCode 4.3.1.
I found that editting the Run/Debug scheme and changing the Debugger setting in the Info tab from LLDB to GDB fixed the problem.
I had that problem. If you explicitly declare the ivars in your h file, they should show up in the debugger as expected.
#synthesize will create the proper ivers for you, but it does not always make them accessible in the debugger endless you use the command line po to look at them.
I have battled this issue for quite a while and I finally figured out the issue. I have several build configurations in my application (Debug, Release, UAT). When I hit 'Run' on my main scheme then I am using the 'UAT' configuration -- not 'Debug'. I realized that I was stripping debug symbols for my 'UAT' and 'Release' configurations. I simply modified my build settings to not strip debug symbols for the 'UAT' build configuration and voila, all my symbols are available again.
I am using XCode 4.5.1, but have seen this issue for quite a while on various projects. I assume that most of my projects use the 'Debug' build configuration by default and therefore were working fine. Only when I started getting fancy with my schemes and build configurations did I come across this issue.
From times to times, while debugging an Application, I see this error on Xcode:
Program received signal: “EXC_BAD_ACCESS”.
and the debugger does not stop on the problematic line. In fact the debugger just shows me a page with a bunch assembly language code and that's it.
I have to have paranormal powers to figure out where the exact problem is.
Is there a way to force Xcode to give me more "nutritive" error messages – that can detail the problem – and stop on the offending line when such errors occur?
thanks for any help.
When the crash happens, open the Debugger in Xcode (Run -> Debugger). There should be 3 to 4 panes like this:
http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeDebugging/art/debugger_disassembly.jpg
On the top-left pane (the "stack trace"), select the topmost row which is not gray.
(Note: Sometimes the stack trace can only find internal functions because of bad memory management triggered in the run loop. Try to Build -> Build and Analyze to eliminate all potential memory management bugs first.)
You can enable NSZombies see here and I've found a good way to see where the actual problem is, is to run and debug the program with the debugger open.
This way when the program stops executing it more often then shows the line that was executing when the program crashed.
I wrote up a blog that tells you how to use some compiler switches that help a lot in finding crashes that are the result of releasing objects before you are done with them.
http://loufranco.com/blog/files/debugging-memory-iphone.html
Build and Analyze is ok, but not as good as scan-build (which it is based on). Instructions for installing that are here:
http://loufranco.com/blog/files/scan-build-better-than-build-analyze.html
My iphone app randomly received this message. I know certain it is memory release problem. However what is the best way to find which object leads this problem. Here are what I have tried
Use Instrument Leak and
ObjectAllocation Trace. Dont saw any
help to know which object have this
problem
Put NSZombieEnabled=YES and project executive ... Dont saw any
help either
Put NSLog everywhere but the EXE_BAD_ACCESS just appear anywhere.
in the debuger, just saw the code
happened in the assembly. like
objc-msg send.
review code many times and read memory management a lot time
and research online a lot time. but
no surprise.
Is there a completed solution to figure out this problem easily. I am a previous Visual C++ programmer, I deal with memory management with years and it is easy to debug and figure out in Visual C++.
If you couldn't see any helpful debug info, I would suggest you find all the places that you are doing a release. It is most likely the case that you have released something that did not need to be released. Code would help us in tracing the issue with you.
As Juan noted, the first stop is the Debugger - what does the debug window give for a stack trace when the app crashes? You should be able to see the line it crashed on... you said in a comment to one response that you saw the crash happen around the lines:
CGPDFDocumnetRef docA=CGPDFDocumentCreatWithURL(myurl);
CGPDFDocumnetRef docB=CGPDFDocumentCreatWithURL(myurl);
Are you really using the same URL object for both calls? Which line is it exactly?
It could be something around the way you make use of the CGPDFDocumentRef, you can find example code how Apple uses them in the QuartzDemo project, file "QuartzImageDrawing.m" (you can find the demo project from the developer portal or embedded in the iPhone documentation with XCode).
XCode is actually pretty powerful, but it does things differently from other IDE's.
In addition to Erich answer, I'd want to add go backward. Start with the most recently added release and work from there.
I ran in to this and it turned out I was releasing an auto-released object that was returned from a convenience method built in to the Cocoa-Touch framework. My problem was as Erich described -- I released this auto-released object. When the system attempted to release it, the program gave the error you are describing.
Regards,Frank
The best way to know what happend is using the xCode Debbuger, give it a try.
You will also receive the message when you don't pass enough parameters to a variable argument method. For example having a NSLog statement like this: NSLog(#"Hello %#");
To check what the error might be
Use NSZombieEnabled.
To activate the NSZombieEnabled facility in your application:
Choose Project > Edit Active Executable to open the executable Info window.
Click Arguments.
Click the add (+) button in the “Variables to be set in the environment” section.
Enter NSZombieEnabled in the Name column and YES in the Value column.
Make sure that the checkmark for the NSZombieEnabled entry is selected.
found this on iPhoneSDK