I have an app that sometimes crashes. Not always, but every now and then it crashes. I think it has something to do with Just. I use this pod to do some network stuff. When I set an exception breakpoint, it jumps out at a function in the Just pod:
func makeTask(_ request: URLRequest, configuration: TaskConfiguration)
-> URLSessionDataTask? {
let task = session.dataTask(with: request)
taskConfigs[task.taskIdentifier] = configuration
return task
}
The console shows the error message: "[_NSCoreDataTaggedObjectID count]: unrecognized selector sent to instance 0x8000000000000000".
In the Crashlog it says:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x8000000000000008
VM Region Info: 0x8000000000000008 is not in any region. Bytes after previous region: 9223372025580486665
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_NANO 0000000280000000-00000002a0000000 [512.0M] rw-/rwx SM=PRV
--->
UNUSED SPACE AT END
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [28922]
Triggered by Thread: 4
Thread 4 looks like this:
Thread 4 name: Dispatch queue: NSOperationQueue 0x283042520 (QOS: UNSPECIFIED)
Thread 4 Crashed:
0 libswiftCore.dylib
1 Just
2 Just
3 Just
4 Just
5 Just
6 Just
7 [app name]
8 [app name]
9 [app name]
10 Foundation
11 Foundation
12 Foundation
13 Foundation
14 libdispatch.dylib
15 libdispatch.dylib
16 libdispatch.dylib
17 libdispatch.dylib
18 libdispatch.dylib
19 libdispatch.dylib
20 libsystem_pthread.dylib
21 libsystem_pthread.dylib
I have no clue why this happens. So I would appreciate some help from you guys.
Edit: This happens when I start the app on a newer iPhone, e.g iPhone 8 or iPhone X. When I run it on a 5s it doesn't crash. All devices have at least iOS 12.