EXC_BAD_ACCESS in NSLinguisticTagger
| Originator: | stephan.michels | ||
| Number: | rdar://17693065 | Date Originated: | 16-Jul-2014 10:52 AM |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | Mac OS X 10.9.4 (13E28) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
The NSLinguisticTagger crashes in for some defined parameters
Steps to Reproduce:
Following code crash in [NSLinguisticTagger tagAtIndex:scheme:tokenRange:sentenceRange:]. It crashes on Mavericks and also Yosemite Beta 3.
NSString *string = @"X\n\u00a0\n\u00a0\nX";
NSUInteger characterIndex = 3;
NSLinguisticTagger* tagger = [[NSLinguisticTagger alloc] initWithTagSchemes:@[NSLinguisticTagSchemeTokenType] options:0];
tagger.string = string;
NSRange range;
NSString *tag = [tagger tagAtIndex:characterIndex
scheme:NSLinguisticTagSchemeTokenType
tokenRange:&range
sentenceRange:NULL];
Expected Results:
I would no crash expect.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!