Tracking a EXC_BAD_ACCESS when zombies don't work
Tracking a EXC_BAD_ACCESS when zombies don't work
- Subject: Tracking a EXC_BAD_ACCESS when zombies don't work
- From: Keith Blount <email@hidden>
- Date: Tue, 15 Feb 2011 12:41:51 -0800 (PST)
Hello,
I'm trying to debug an EXC_BAD_ACCESS crash in my application and am tearing my hair out trying to find the cause. I have NSZombieEnabled set to YES, but this isn't providing me with any information (using NSZombieEnabled is always one of the first things I try with crashes like this one, and usually it leads to the culprit after a bit of work). I've read that zombies don't always help find EXC_BAD_ACCESS (for instance if a variable hasn't been initialised or if it's a CF type, although I'm not sure if the latter is still true), so presumably this is why it's returning nothing for me.
So, all I have to go on is an EXC_BAD_ACCESS, and a backtrace that seems to be different every time and usually contains none of my own methods. For instance:
#0 0x9685eed7 in objc_msgSend
#1 0x2601ee00 in ??
#2 0x98d33c6d in _CFAutoreleasePoolPop
#3 0x9867d0aa in NSPopAutoreleasePool
#4 0x9867cfd2 in -[NSAutoreleasePool drain]
#5 0x986c4596 in _NSAppleEventManagerGenericHandler
#6 0x91450f58 in aeDispatchAppleEvent
#7 0x91450e57 in dispatchEventAndSendReply
#8 0x91450d61 in aeProcessAppleEvent
#9 0x9519d389 in AEProcessAppleEvent
#10 0x93b9a9ca in _DPSNextEvent
#11 0x93b99fce in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#12 0x93b5c247 in -[NSApplication run]
#13 0x93b542d9 in NSApplicationMain
#14 0x00003271 in _start
#15 0x000031a0 in start
I do at least have a rough idea of the trigger - the trigger is in my page layout code. But I've been through the code and everything is initialised and I'm not over-releasing anything in that class. I've looked at the places it's called from too. (I have a sneaking suspicion it may have something to do with init'ing a text view using -initWithFrame:textContainer: which causes the text storage to own the text system, but the text storage gets swapped in and out... However my app has thousands of people using it, and only a handful have experienced these crashes - the trigger seems to be related to tables getting laid out too - and it's only today that someone has been able to provide me with a file that usually causes this crash when opened.)
If anyone has any suggestions about what I could try next to find the cause, I'd be very grateful. I've tried running with ObjectAlloc and Zombies in Instruments, but have so far come up blank.
Many thanks and all the best,
Keith
____________________________________________________________________________________
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden