• 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
Funny crash in on Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Funny crash in on Tiger


  • Subject: Funny crash in on Tiger
  • From: James Housley <email@hidden>
  • Date: Mon, 27 Jun 2005 15:18:25 -0400

I am having problems with some code causing a crash on Tiger, sometimes. If the code is compiled on Tiger it runs fine. If it is compiled on 10.3.9 Development it is fine. If it is compiled Deployment it will crash. Here are the code segments.

- (NSString *)makeUniqueString:(NSString *)filename aURL:(NSString *)aURL
{
int x;
unsigned char out[MD5_DIGEST_LENGTH+1];


for (x = 0; x < 48; x++) out[x] = '\0';
NSString *source = [NSString stringWithFormat:@"Filename: %@, URL: %@, Right now: %@", filename, aURL, [NSCalendarDate date]];
MD5((unsigned char *)[source cString], [source cStringLength], out);
NSMutableString *retVal = [[NSMutableString alloc] initWithCapacity:64];
for (x = 0; x < 16; x++)
{
[retVal appendString:[NSString stringWithFormat:@"%.2X", 0x0FF&out[x]]];
}
return [[retVal retain] autorelease];
}


#define FeedsDictUniqueIdentifier	@"UniqueIdentifier"


NSMutableDictionary *feed = [[NSMutableDictionary alloc] initWithCapacity:1];
[feed setValue:[destinationFile lastPathComponent] forKey:FeedsDictfeedFileName];
[feed setValue:[aURL absoluteString] forKey:FeedsDictfeedURL];
[feed setValue:[NSNumber numberWithInt:1] forKey:FeedsDictphysicallyExists];
[feed setValue:[NSNumber numberWithInt:0] forKey:FeedsDictisTransient];
NSString *uniqueString = [self makeUniqueString:[destinationFile lastPathComponent] aURL:[aURL absoluteString]];
-->> [feed setValue:uniqueString forKey:FeedsDictUniqueIdentifier];


I tried using the intermediate string "uniqueString" and that seemed to help in some places the code was being called. I have also messed with what is returned from makeUniqueString:, but that hasn't helped. I must be doing something wrong, but I can't figure it out. Any and all pointers would be helpful.

Jim

--

/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
 X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
email@hidden      http://www.FreeBSD.org     The Power to Serve
email@hidden  http://www.TheHousleys.net
---------------------------------------------------------------------
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Funny crash in on Tiger
      • From: Corbin Dunn <email@hidden>
    • Re: Funny crash in on Tiger
      • From: glenn andreas <email@hidden>
    • Re: Funny crash in on Tiger
      • From: j o a r <email@hidden>
  • Prev by Date: Multiple singletons
  • Next by Date: Re: RTP support for VIOP streaming wanted...
  • Previous by thread: Re: Multiple singletons
  • Next by thread: Re: Funny crash in on Tiger
  • Index(es):
    • Date
    • Thread