NSZombie Enabled, MallocStackLogging - iphone

I am testing an EXE_BAD_ACCESS error. I have set NSZombieEnabled, MallocStackLogging, MallocStackLoggingNoCompact to YES. now in the debugger I get this message when I run my app in the debug mode from the device I could see this:
iota(3586) malloc: recording malloc stacks to disk using standard recorder
iota(3586) malloc: stack logs being written into /private/var/mobile/Applications/8E21A85B-369E-4487-962B-1550E56602DC/tmp/stack-logs.3586.iota.index
iota(3586) malloc: Please issue: cp /private/var/mobile/Applications/8E21A85B-369E-4487-962B-1550E56602DC/tmp/stack-logs.3586.iota.suRQjy.link /tmp/
and when I am about to hit the error I get,
2011-02-14 14:29:44.350 iota[3586:307] *** -[CFString autorelease]: message sent to deallocated instance 0x81eab70
Finally when I give the command in debugger to see the stack trace
(gdb) shell malloc_history 3586 0x81eab70
I get
malloc_history cannot examine process 3586 because the process does not exist.
Can anyone tell me what I am doing wrong, before the error is about the occur , I set
set env MallocStackLogging 1 in the debugger too
Thanks in Advance

You might not be able to look at the malloc_history because you're running this on the device. I had the same error and Instruments was also freezing or not starting my application.
But - if I ran in the iOS simulator and then configured the allocations tool to handle zombies (this option wasn't available on the device) then I can see pretty quickly the object which was prematurely released.

From what I understand you are releasing manually a string that is already on the autorelease Pool.
All strings created with
[NSString stringWithFormat:#"some %#", #"text"];
And
[NSString stringWithString:#"some text"];
must not be manually released.

Related

Debug Assertion Failed in mfc140ud

I use vs2015. When I run my program in debug mode this debug assertion failed happend.
Anyone knows how to deal with it?
Release mode is OK.
Thank you for your replys. I think the mainly reason is the socket workthread sendmessage to close the socket itself in a multi-thread application.

Terminal MacOS Fastlane/Gym/xcodebuild Error 65: GenerateDSYMFile, dsymutil malloc: pointer being freed was not allocated

I'm trying to make an little bash script for automatisation of ipa uploading on itunes. [From Xcode uploading it works fine].
For command:
gym
from Fastlane,some projects are uploading fine, others are failing with log:
The following build commands failed:
GenerateDSYMFile [...]
Exit status: 65
In gym logs:
GenerateDSYMFile [...]
dsymutil(20223,0x7fff724c3000) malloc: *** error for object 0x610000100000: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil failed with exit code 6
...tried all google solutions....
I've had the same issue.
I've found a reference in this thread, and also here
suggesting that it's the MallocNanoZone environment variable. after changing it (on terminal):
export MallocNanoZone=0
The build successfully completed.

Couldn't register com.xxx.appname with the bootstrap server. Error: unknown error code.Program received signal: “SIGABRT”

I am getting this error while running in device.
Couldn't register com.xxxx.appname with the bootstrap server.
Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.Program received signal: “SIGABRT”.
Now i rectified this problem .I have posted answer also if anyone got this error follow my post..
Try this,
Deleteing the app, restarting Xcode, clean build, didn't do anything
--> restart your computer
--> restart the phone

debugging crash logs

I have the following crash logs:
I am unsure my self, why this is happening. Any pointers? I think it has to do with blocks

Simulated iphone app quits, whenever I turned on debugging

I always build my app choosing with 'Build and run' (not 'build and debug'). While the app running smoothly I opt to put a breakpoint over a line. When I do this the simulated application suddenly quits with a message 'Loading debugger..,Debugging terminated'.
...Actually, this happens only on putting breakpoint on first time.
Any help, please.
Xcode consol log..
Session started at 2010-03-31 20:54:59 +0530.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar 5 04:43:10 UTC 2010)
...
This GDB was configured as "x86_64-apple-darwin".A0:0
..
Attaching to process 10016.
Pending breakpoint 1 - ""XXX.mm":247" resolved
Current language: auto; currently objective-c++
sharedlibrary apply-load-rules all
Loading program into debugger…
Pending breakpoint 1 - ""XXX":247" resolved
kill
consol app log....
31/03/10 8:55:02 PM com.apple.launchd.peruser.502[94] (UIKitApplication:com.xxxx.yyyyy[0x25ab][10016]) Exited: Killed
31/03/10 8:55:02 PM SpringBoard[10014] Application 'XXXXXX' exited abnormally with signal 9: Killed
31/03/10 8:55:02 PM SpringBoard[10014] Unable to create CFServerConnection. Telephony state may be incorrect.
Do you have a second monitor connected to your development machine ? If so, try unplugging it and see if that helps. Seriously: http://support.appcelerator.net/discussions/support/572-iphone-simulator-shows-no-windows
I have very similar experience, rebuilding your application will fix the issue.
If it is still crashing try to crack the crash report http://www.anoshkin.net/blog/2008/09/09/iphone-crash-logs/
There is similar topic discussed in another forum go through this http://forums.macrumors.com/showthread.php?t=474267