SIGSEGV when getting string from NSLocalizedStringFromTable
I am getting a strange crash sometimes when getting a string from NSLocalizedStringFromTable. Here is the relevant section of my crash's stacktrace:
CoreFoundation 0x33c4b7f7 CFEqual 98
CoreFoundation 0x33cf6a14 __CFBasicHashStandardEquateKeys 20
CoreFoundation 0x33cf8770 ___CFBasicHashFindBucket_Linear 224
CoreFoundation 0x33c4b654 CFBasicHashFindBucket 228
CoreFoundation 0x33c4d4a1 CFDictionaryGetValue 56
CoreFoundation 0x33c528f5 CFBundleCopyLocalizedString 104
Foundation 0x32e6ab67 -[NSBundle localizedStringForKey:value:table:] 30
MyApp 0x000270eb MyApp 155883
The code which causes this is:
NSMutableArray* tableListOptions = [[NSMutableArray alloc] initWithCapacity:1];
[tableListOptions addObject:NSLocalizedStri开发者_开发技巧ngFromTable(@"My String", @"MyTable", @"")];
Any suggestions as to what might be causing this crash? I use NSLocalizedStringFromTable all the time throughout my app but this location seems to be causing problems, though I am having trouble duplicating the crash consistently.
精彩评论