Skip navigation.
 
mlFind out what's wrong with an NSString?
FROM : Jan Van Boghout
DATE : Fri Jan 03 16:50:05 2003

OK,

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 :)


Jan Van Boghout
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlFind out what's wrong with an NSString? Jan Van Boghout Jan 3, 16:50
mlRe: Find out what's wrong with an NSString? Roarke Lynch Jan 4, 04:04
mlRe: Find out what's wrong with an NSString? Jan Van Boghout Jan 4, 11:16