Introduction:
I’m encountering a consistent crash in production on iOS 26.2 (build 23C55). The crash occurs deep within libicucore when calling [NSDateFormatter dateFromString:].
Crash Summary:
Exception Type: SIGSEGV (SEGV_ACCERR)
Fault Address: 0xffffffff
Thread: Crashed on Main Thread (Thread 0)
Library: libicucore.A.dylib
Code Snippet:
The crash is triggered by the following method. It converts a string to an NSDate using a specific format and locale:
// 获取日期date
- (NSDate *)getDateWithTime:(NSString *)time formatter:(NSString *)formatterStr {
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:formatterStr];
formatter.timeZone = [NSTimeZone timeZoneWithName:@"Asia/Shanghai"];
formatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
return [formatter dateFromString:time];
}
Backtrace:
Here is the relevant part of the crash report:
Incident Identifier: E24485B6-C53E-4115-A6CF-A7E4A952AD50
CrashReporter Key: 21FAC1CF-F56B-409A-98AA-351D3D2EB06C
Hardware Model: iPhone18,2
Code Type: ARM-64
Parent Process: [1]
Date/Time: 2026-01-12T01:32:25Z
OS Version: iPhone OS 26.2 (23C55)
Report Version: 105
SDK Version: 0.0.4
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0xffffffff
Crashed Thread: 0
Thread 0 Crashed:
0 libicucore.A.dylib 0x000000019b81def8 0x19b74a000 + 868088
1 libicucore.A.dylib 0x000000019b7da91c 0x19b74a000 + 592156
2 libicucore.A.dylib 0x000000019b8d8340 0x19b74a000 + 1631040
3 libicucore.A.dylib 0x000000019b8eae18 0x19b74a000 + 1707544
4 libicucore.A.dylib 0x000000019b8eb600 0x19b74a000 + 1709568
5 libicucore.A.dylib 0x000000019b878be4 0x19b74a000 + 1240036
6 libicucore.A.dylib 0x000000019b87ae84 0x19b74a000 + 1248900
7 libicucore.A.dylib 0x000000019b87b2dc 0x19b74a000 + 1250012
8 libicucore.A.dylib 0x000000019b9564ac 0x19b74a000 + 2147500
9 libicucore.A.dylib 0x000000019b954afc 0x19b74a000 + 2140924
10 libicucore.A.dylib 0x000000019b952794 0x19b74a000 + 2131860
11 libicucore.A.dylib 0x000000019b98689c 0x19b74a000 + 2345116
12 CoreFoundation 0x00000001895dbfe0 0x18953d000 + 651232
13 CoreFoundation 0x00000001895dbaa0 0x18953d000 + 649888
14 Foundation 0x0000000186d2029c 0x186b88000 + 1671836
15 Foundation 0x00000001874a62dc 0x186b88000 + 9560796
16 Foundation 0x00000001874a6384 0x186b88000 + 9560964
17 xxxx 0x0000000105ea6e30 -[xxxxx getDateWithTime:formatter:] + 168
and
Thread 0 crashed with ARM-64 Thread State:
pc: 0x000000019b81def8 fp: 0x000000016f96bc10 sp: 0x000000016f96bbd0 x0: 0x00000000ffffffff
x1: 0x000000019ba1e8e0 x2: 0x0000000000000002 x3: 0x000000000000000b x4: 0x0000000000000074
x5: 0x0000000000000069 x6: 0x0000000000000000 x7: 0xfffff0003ffff800 x8: 0x000000009ba18014
x9: 0x00000001148dffd0 x10: 0x0000000000000002 x11: 0x0000000000000004 x12: 0x0000000000000220
x13: 0x0000000000000030 x14: 0x000000015b6f36b8 x15: 0x000000015cfe0000 x16: 0x00000002a19d0ff0
x17: 0x00000001f5590a70 x18: 0x0000000000000000 x19: 0x000000016f96bc30 x20: 0x0000000000000000
x21: 0x000000015cfe3200 x22: 0x000000019ba18014 x23: 0x0000000000000000 x24: 0x000000015cfe32a0
x25: 0x0000000000000003 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x000000015cfe3200
lr: 0x000000019b7da958 cpsr: 0x00000000a0000000
Topic:
App & System Services
SubTopic:
General
Tags:
Foundation
iOS
Objective-C
Internationalization