• 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: Strange "exit due to Signal 11"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange "exit due to Signal 11"


  • Subject: Re: Strange "exit due to Signal 11"
  • From: Michael Ströck <email@hidden>
  • Date: Sat, 6 Aug 2005 18:45:51 +0200

Hi Nick,

Thank you, I generally use that format, but this is an early prototype and the file I use contains nothing that could NSLog barf. Still, you are right, I should probably do it correctly all the time.

Michael

Am 06.08.2005 um 18:27 schrieb Nick Zitzmann:


On Aug 6, 2005, at 7:49 AM, Michael Ströck wrote:


    NSLog([tmpArray objectAtIndex:1]);


I wrote this yesterday:


But in general, when a function takes a variable amount of arguments like NSLog() does, then you shouldn't pass anything into its string argument that is not a printf-style formatted string. Otherwise, if you passed in a string that has a % character in it or something similar, then you could easily crash the program. Instead, do this:

NSLog(@"%@", someObject);


Nick Zitzmann <http://www.chronosnet.com/>



_______________________________________________ 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: 
 >Strange "exit due to Signal 11" (From: Michael Ströck <email@hidden>)
 >Re: Strange "exit due to Signal 11" (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Strange "exit due to Signal 11"
  • Next by Date: Re: Name of data model file
  • Previous by thread: Re: Strange "exit due to Signal 11"
  • Next by thread: Name of data model file
  • Index(es):
    • Date
    • Thread