• 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: Find out what's wrong with an NSString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find out what's wrong with an NSString?


  • Subject: Re: Find out what's wrong with an NSString?
  • From: Jan Van Boghout <email@hidden>
  • Date: Sat, 4 Jan 2003 11:16:43 +0100

Yeah, but I've got it figured out now. Apparently the string wasn't caught as nil, but it was @"". That counts as a string too, I should have known :)


Did you try:

if(passedString)
{
//string is valid, do stuff
}


On Friday, January 3, 2003, at 10:50 AM, Jan Van Boghout wrote:

So I am writing a parser, and at a given moment a pass a string to
another method to process it. The string I pass is filled with the
method [scanner scanUpToString:@">"
intoString:stringIAmPassingToTheOtherMethod] (where scanner is an
NSScanner). Now I randomly get crashes (I can open the same data twice
and it doesn't necessarily crash, but after opening a few docs I get a
certain crash with one of them), and I get the following exception:

Exception raised during posting of notification. Ignored. exception:
[NSPlaceholderMutableString initWithString:]: nil string (or other)
argument

Now when I get this, the app doesn't crash. When it does crash, it
happens in the line where I make a new NSMutableString from the passed
string. I've tried to check if the string is nil, but that doesn't
help. When I try to do a simple NSLog(@"%@",theString); , the app
crashes too. How can I determine whether I have a valid string here or
not? (Without crashing the app :)

Roarke Lynch
-------------------------------
email@hidden
_______________________________________________
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: 
 >Re: Find out what's wrong with an NSString? (From: Roarke Lynch <email@hidden>)

  • Prev by Date: Re: beginSheetForDirectory
  • Next by Date: Re: Cannot merge groups (yet) for wid...
  • Previous by thread: Re: Find out what's wrong with an NSString?
  • Next by thread: Crop an image in memory
  • Index(es):
    • Date
    • Thread