We still have some old NewsstandKit
code that hasn't been updated in a few years.
For some reason, the version of our app that has been in the store since 2017 is now getting a flurry of crashes with iOS 11.3, seemingly caused when we call [NKLibrary sharedLibrary]
for the first time at app launch.
The stacktraces point to a network call deep in NewsstandKit
.
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000
Crashed: com.apple.main-thread
0 CoreFoundation 0x1810b63d4 CFBooleanGetValue + 80
1 CFNetwork 0x181823944 URLRequest::initialize(long, void const**, long, __CFDictionary const*) + 328
2 CFNetwork 0x1817d7298 _CFURLRequestCreateFromArchiveList + 136
3 CFNetwork 0x18195bfd4 -[NSURLRequest initWithCoder:] + 1660
4 Foundation 0x181ba01e8 _decodeObjectBinary + 1720
5 Foundation 0x181b9fa88 _decodeObject + 308
6 Foundation 0x181b2e8bc -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 432
7 NewsstandKit 0x1a24031a4 -[NKAssetDownload initWithCoder:] + 216
8 Foundation 0x181ba01e8 _decodeObjectBinary + 1720
9 Foundation 0x181b4d010 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1388
10 Foundation 0x181b53c54 -[NSArray(NSArray) initWithCoder:] + 220
11 Foundation 0x181ba01e8 _decodeObjectBinary + 1720
12 Foundation 0x181b9fa88 _decodeObject + 308
13 Foundation 0x181b2e8bc -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 432
14 NewsstandKit 0x1a2401a08 -[NKIssue initWithCoder:] + 316
15 Foundation 0x181ba01e8 _decodeObjectBinary + 1720
16 Foundation 0x181b4d010 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1388
17 Foundation 0x181b53c54 -[NSArray(NSArray) initWithCoder:] + 220
18 Foundation 0x181ba01e8 _decodeObjectBinary + 1720
19 Foundation 0x181b4d010 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1388
20 Foundation 0x181b4d340 -[NSDictionary(NSDictionary) initWithCoder:] + 224
21 Foundation 0x181ba01e8 _decodeObjectBinary + 1720
22 Foundation 0x181b9fa88 _decodeObject + 308
23 Foundation 0x181b2e8bc -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 432
24 Foundation 0x181bcac84 -[NSCoder(Exceptions) __tryDecodeObjectForKey:error:decodeBlock:] + 80
25 Foundation 0x181bca9e4 -[NSCoder decodeTopLevelObjectOfClasses:forKey:error:] + 92
26 Foundation 0x181c088e4 +[NSKeyedUnarchiver(NSKeyedUnarchiverSecureCodingInitializers) unarchivedObjectOfClasses:fromData:error:] + 140
27 NewsstandKit 0x1a240042c -[NKLibrary _load] + 272
28 NewsstandKit 0x1a23fe8b8 -[NKLibrary init] + 568
29 NewsstandKit 0x1a23fe628 __26+[NKLibrary sharedLibrary]_block_invoke + 92
30 libdispatch.dylib 0x180ae0ae4 _dispatch_client_callout + 16
31 libdispatch.dylib 0x180ae42ec dispatch_once_f$VARIANT$mp + 60
32 NewsstandKit 0x1a23fe5c8 +[NKLibrary sharedLibrary] + 112
33 MY_APP 0x1007d29e4 -[MYAPPCLASS MYAPPMETHOD] (MYFILE.m:90)
Line 33 is the point where we call [NKLibrary sharedLibrary].currentlyReadingIssue
, and that's all the info we're getting right now. This appears to be happening just after app launch but there's no info if this is triggered in background or foreground.
Just curious if anyone else has seen this? My only thought is that we need to remove NewsstandKit
.