How can I find the source of random crashes when using debug frameworks
How can I find the source of random crashes when using debug frameworks
- Subject: How can I find the source of random crashes when using debug frameworks
- From: Markus Spoettl <email@hidden>
- Date: Fri, 27 Jun 2008 20:42:40 -0700
Hello All,
I'm trying to hunt down a crash bug for two days now and I'm at a
complete loss, have finally run out of ideas what else I can try.
I've read the Corbin Dunn's EXC_BAD_ACCESS blog post as well as the
debugger magic tech note. I turned on debug frameworks,
NSZombieEnabled and NSAutoreleaseFreedObjectCheckEnabled environment
variables and since then all hell broke loose. I'm getting crashes
deep in the frameworks, some called from my code, some seemingly random.
One thing I noticed is that I don't get any Zombie warnings. I don't
know whether that means that it actually is working as expected (in
the sense that I'm not over-releasing objects) or that something is
corrupt and the system is unable to tell me what's going on for some
reason.
I've reviewed my code over and over again and disabled large portions,
and while I'm sure there is something wrong that I cause, I have no
idea how I could be causing crashes like the ones below. If anyone has
an idea what I can do to get to the source of this, I'd really
appreciate pointers.
I'm using Xcode 3.0 on 10.5.3. The app uses WebKit and QuartzCore
frameworks. I'm using the debug build configuration (no default
settings changed) and I've set up the target to use the "debug"
framework suffix and set NSZombieEnabled and
NSAutoreleaseFreedObjectCheckEnabled to YES in the target's
environment variables.
Regards
Markus
Example Crash Stack 1
GDB: Program received signal: “EXC_BAD_ACCESS”.
#0 0x943a9036 in CFEqual
#1 0x94375ac5 in __CFDictionaryFindBuckets2
#2 0x943780cc in CFDictionaryAddValue
#3 0x948c4ddf in _LSCopyDownloadAssessmentDictionaryInternal
#4 0x948c338a in _LSCopyDownloadAssessmentDictionary
#5 0x9579fdc9 in _initDownloadAssessment
#6 0x9579f926 in CFURLResponseCopySuggestedFilename
#7 0x931de91e in -[NSURLResponse suggestedFilename]
#8 0x92bca05b in WebCore::ResourceResponse::doUpdateResourceResponse
#9 0x92b75deb in WebCore::ResourceResponseBase::updateResourceResponse
#10 0x92b75dc2 in WebCore::ResourceResponseBase::mimeType
#11 0x92c3ed23 in WebCore::SubresourceLoader::didReceiveResponse
#12 0x92bc9a00 in -[WebCoreResourceHandleAsDelegate
connection:didReceiveResponse:]
#13 0x931de81a in -[NSURLConnection(NSURLConnectionReallyInternal)
sendDidReceiveResponse:]
#14 0x931de76a in _NSURLConnectionDidReceiveResponse
#15 0x9579f645 in sendDidReceiveResponseCallback
#16 0x9579dcde in _CFURLConnectionSendCallbacks
#17 0x9579d63f in muxerSourcePerform
#18 0x943a660e in CFRunLoopRunSpecific
#19 0x943a6cf8 in CFRunLoopRunInMode
#20 0x94e28da4 in RunCurrentEventLoopInMode
#21 0x94e28bbd in ReceiveNextEventCommon
#22 0x94e28a31 in BlockUntilNextEventMatchingListInMode
#23 0x9162d505 in _DPSNextEvent
#24 0x9162cdb8 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
#25 0x91625df3 in -[NSApplication run]
#26 0x915f3030 in NSApplicationMain
#27 0x0000394c in main at main.m:13
Example Crash Stack 2
GDB: Program received signal: “EXC_BAD_ACCESS”.
#0 0x943a91d5 in CFHash
#1 0x943ac7fb in __CFSetFindBuckets1b
#2 0x943acfdd in CFSetGetValue
#3 0x943a1890 in __CFRunLoopFindMode
#4 0x943a515c in CFRunLoopAddTimer
#5 0x931ba517 in -[NSObject(NSDelayedPerforming)
performSelector:withObject:afterDelay:inModes:]
#6 0x917d10a5 in -[NSToolbarView windowDidUpdate:]
#7 0x9317954a in _nsnote_callback
#8 0x943879ba in __CFXNotificationPost
#9 0x94387c93 in _CFXNotificationPostNotification
#10 0x931767b0 in -[NSNotificationCenter
postNotificationName:object:userInfo:]
#11 0x9317fff8 in -[NSNotificationCenter postNotificationName:object:]
#12 0x916ec312 in -[NSWindow update]
#13 0x94414c85 in -[NSArray makeObjectsPerformSelector:]
#14 0x9162eb22 in -[NSApplication(NSWindowCache)
_updateWindowsUsingCache]
#15 0x9162e955 in -[NSApplication updateWindows]
#16 0x9162e897 in _handleWindowsNeedUpdateNote
#17 0x943a49a2 in __CFRunLoopDoObservers
#18 0x943a5d05 in CFRunLoopRunSpecific
#19 0x943a6cf8 in CFRunLoopRunInMode
#20 0x94e28da4 in RunCurrentEventLoopInMode
#21 0x94e28bbd in ReceiveNextEventCommon
#22 0x94e28a31 in BlockUntilNextEventMatchingListInMode
#23 0x9162d505 in _DPSNextEvent
#24 0x9162cdb8 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
#25 0x91625df3 in -[NSApplication run]
#26 0x915f3030 in NSApplicationMain
#27 0x0000394c in main at main.m:13
--
__________________________________________
Markus Spoettl
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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