• 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: NSLog and [NSDictionary description], bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSLog and [NSDictionary description], bug?


  • Subject: Re: NSLog and [NSDictionary description], bug?
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 6 Apr 2004 13:13:47 +0200

Stiphane,

On Tuesday, Apr 6, 2004, at 12:49 Europe/Prague, Stiphane Sudre wrote:

NSLog([myDictionary description]);
where myDictionary is a NSDictionary.
With some dictionaries, it crashes.

With which ones?

In my experience, NSDictionaries alas do not support cycles properly anymore (well, *unless my memory plays tricks on me*, they did in OpenStep). Anyway, as soon as an NSDictionary contains a loop, any description or NSLog or even po in gdb tends to crash for me :(((

122 /tmp> <q.m
#import <Foundation/Foundation.h>
int main() {
[NSAutoreleasePool new];
id md=[NSMutableDictionary dictionary];
[md setObject:md forKey:@"whatever"];
NSLog(@"%@",md);
return 0;
}
123 /tmp> cc -Wall -framework Foundation q.m && ./a.out
zsh: segmentation fault ./a.out
124 /tmp>

---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSLog and [NSDictionary description], bug? (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: What is the role of the CF- objects?
  • Next by Date: Re: NSLog and [NSDictionary description], bug?
  • Previous by thread: NSLog and [NSDictionary description], bug?
  • Next by thread: Re: NSLog and [NSDictionary description], bug?
  • Index(es):
    • Date
    • Thread