• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Isolating a bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Isolating a bug?


  • Subject: Re: Isolating a bug?
  • From: Gregory Weston <email@hidden>
  • Date: Wed, 06 Apr 2005 09:54:39 -0400

On Wednesday, April 06, 2005, at 07:41AM, Ondra Cada <email@hidden> wrote:

>On 6.4.2005, at 12:46, Gregory Weston wrote:
>
>> Exception:  EXC_BAD_ACCESS (0x0001)
>> Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000006
>>
>> Thread 0 Crashed:
>> 0   com.apple.CoreFoundation 	0x901939cc CFHash + 0x18
>> 1   com.apple.CoreFoundation 	0x90192d28 __CFDictionaryFindBuckets1b +
>> 0x70
>> 2   com.apple.CoreFoundation 	0x90192184 CFDictionaryGetValue + 0xec
>> 3   com.apple.CoreFoundation 	0x901b0fb0
>> _CFApplicationPreferencesCreateValueForKey + 0x6c
>> 4   com.apple.Foundation     	0x909fb38c -[NSUserDefaults
>> objectForKey:] + 0x98
>> 5   my.program.signature	 	0x00008658 -[MyApplication
>> methodTakingAString:] + 0x5c
>>
>> The routine identified in line 5 is called repeatedly (although not
>> rapidly) while the program is running - it had been invoked hundreds
>> of times without error during this session. The argument to
>> objectForKey: at line 4 is freshly-created from
>> NSString>>stringWithFormat:. I'm not sure where to start looking for
>> the cause of a problem that manifests five invocations into external
>> code. Advice?
>
>For starters, log the "freshly-created from NSString>>stringWithFormat"
>just before the objectForKey: gets called. There is still a chance it
>gets something messed up somehow...

In the abstract that's reasonable, but:
1) The string is created on the line before the objectForKey: message is sent. There's not a whole lot of opportunity for corruption. To answer someone else's comment, I don't release it and I don't cache it such that I might be releasing it unintentionally later.
2) As noted, this has been deployed for about a year. As not noted, but worthy of note, it runs on a _lot_ of machines and this routine may run thousands of times a day. That's a lot of logging for something that may not show up for another year.

>If that does not help, I kind of fear the problem *may* be elsewhere,
>in an uninitialized pointer or something alike, whose result are
>mangled in-memory data.

My fear, too.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Isolating a bug? (From: Gregory Weston <email@hidden>)
 >Re: Isolating a bug? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: NSCalendarDate, NSTimer - Daylight Saving Time (DST) problem is tricky...
  • Next by Date: Re: NSCalendarDate, NSTimer - Daylight Saving Time (DST) problem is tricky...
  • Previous by thread: Re: Isolating a bug?
  • Next by thread: Enable Guard Malloc (was Re: Isolating a bug?)
  • Index(es):
    • Date
    • Thread