You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing the following crash after upgrading from v3.7.0 to v3.8.0
Invalid number value (NaN) in JSON write
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x18790896c __exceptionPreprocess
1 libobjc.A.dylib 0x187621028 objc_exception_throw
2 Foundation 0x187d83a18 _writeJSONNumber
3 Foundation 0x187d84790 ___writeJSONObject_block_invoke
4 Foundation 0x187d84960 ___writeJSONObject_block_invoke_2
5 CoreFoundation 0x187958990 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__
6 CoreFoundation 0x1877da740 -[__NSFrozenDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]
7 Foundation 0x187d83c80 _writeJSONObject
8 Foundation 0x187d84790 ___writeJSONObject_block_invoke
9 Foundation 0x187d84960 ___writeJSONObject_block_invoke_2
10 CoreFoundation 0x187958990 __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__
11 CoreFoundation 0x1877da740 -[__NSFrozenDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]
12 Foundation 0x187d83c80 _writeJSONObject
13 Foundation 0x187d84ab0 ___writeJSONArray_block_invoke
14 CoreFoundation 0x1878da66c __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__
15 CoreFoundation 0x1877d8d60 -[__NSArrayI enumerateObjectsWithOptions:usingBlock:]
16 Foundation 0x187d8414c _writeJSONArray
17 Foundation 0x187c2c764 -[_NSJSONWriter dataWithRootObject:options:error:]
18 Foundation 0x187c2c3fc +[NSJSONSerialization dataWithJSONObject:options:error:]
19 Analytics 0x10126f90c -[SEGFileStorage dataFromJSON:] + 190 (SEGFileStorage.m:190)
20 Analytics 0x10126f84c -[SEGFileStorage setJSON:forKey:] + 179 (SEGFileStorage.m:179)
21 Analytics 0x10126f3a4 -[SEGFileStorage setArray:forKey:] + 107 (SEGFileStorage.m:107)
22 Analytics 0x10127a0bc -[SEGSegmentIntegration persistQueue] + 655 (SEGSegmentIntegration.m:655)
23 Analytics 0x101279d44 __34-[SEGSegmentIntegration sendData:]_block_invoke_2 + 590 (SEGSegmentIntegration.m:590)
While TimeInterval.nan is a valid value used in NSPropertyListSerialization, it throws an exception when used in NSJSONSerialization which went unhandled in #854.
New events that attempt to include this value are disregarded gracefully by the try/catch found below, but this doesn't protect against already persisted plists that may fail conversion to JSON and cause crashes on flushing.
Hey there 👋
I'm experiencing the following crash after upgrading from v3.7.0 to v3.8.0
While
TimeInterval.nan
is a valid value used inNSPropertyListSerialization
, it throws an exception when used inNSJSONSerialization
which went unhandled in #854.New events that attempt to include this value are disregarded gracefully by the try/catch found below, but this doesn't protect against already persisted plists that may fail conversion to JSON and cause crashes on flushing.
analytics-ios/Analytics/Classes/SEGSegmentIntegration.m
Lines 308 to 320 in abc43e6
The text was updated successfully, but these errors were encountered: