Find out what's wrong with an NSString?
Find out what's wrong with an NSString?
- Subject: Find out what's wrong with an NSString?
- From: Jan Van Boghout <email@hidden>
- Date: Fri, 3 Jan 2003 16:50:05 +0100
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@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.