I'm working on an application which is nearing completion, but I'm getting these strange crashes that look to be deep in the cocoa framework. The thing is, I can't seem to diagnose these crashes, and I can't imagine that such bugs exist in the framework such that they pull down my application so frequently. So, I'm assuming it is something I'm doing. I am using garbage collection, and I'm getting an EXC_BAD_ACCESS error. And at least one crash that pops up every so often is below. It stops on the following line of code of the init method (#6 below) in my PrintView class:

NSFont *font = [NSFont fontWithName:@"Lucida Grande" size:fontSize];

#0      0x931ad644 in CFDictionaryGetValue
#1      0x901f4fb8 in TDescriptor::CreateMatchingDescriptorInternal
#2      0x901f4e1c in TDescriptor::InitBaseFont
#3      0x901f4d94 in TDescriptor::CreateMatchingDescriptor
#4      0x921d48ec in __NSFontFactoryWithName
#5      0x921d466c in +[NSFont fontWithName:size:]
#6 0x0005e2e0 in -[PrintView initWithScopeDeduction:andHelper:andDeductionController:] at PrintView.m:32 #7 0x00006a8c in -[MyDocument printOperationWithSettings:error:] at MyDocument.m:441 #8 0x9241bde8 in -[NSDocument _printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo :] #9 0x9241bce0 in -[NSDocument printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo :]
#10     0x921f58b8 in -[NSApplication sendAction:to:from:]
#11     0x922911d0 in -[NSMenu performActionForItemAtIndex:]
#12 0x92290f00 in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
#13     0x92290bc8 in -[NSMenu performKeyEquivalent:]
#14     0x9228f6ac in -[NSApplication _handleKeyEquivalent:]
#15     0x921c5d84 in -[NSApplication sendEvent:]
#16     0x92132e44 in -[NSApplication run]
#17     0x92103820 in NSApplicationMain
#18     0x00015bf8 in main at main.m:13

fontSize is valid. If I look into local variables, I get "_name" being "invalid". But if there is a problem with the name, that would be strange, since it works most of the time. Any ideas as to how I can diagnose this problem? I also have seemingly random crashes of this sort when the "open file" dialogue is opened. Thanks,
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to