instacart / TrueTime.swift

NTP library for Swift and Objective-C. Get the true time impervious to device clock changes.
https://tech.instacart.com/truetime/
Apache License 2.0
589 stars 131 forks source link

Crash on retain cycle #102

Open Ankish opened 2 years ago

Ankish commented 2 years ago

Using 5.0.3 version

Thread 27 name:
Thread 27 Crashed:
0   libobjc.A.dylib                 0x00000001998669c8 objc_retain + 8 (objc-os.h:223)
1   libswiftCore.dylib              0x000000018595d6fc swift_bridgeObjectRetain + 48 (SwiftObject.mm:589)
2   TrueTime                        0x0000000103c7a088 initializeWithCopy for FrozenNetworkTime + 164 (<compiler-generated>:0)
3   TrueTime                        0x0000000103c6fe2c outlined init with copy of FrozenNetworkTime + 52 (<compiler-generated>:0)
4   TrueTime                        0x0000000103c775cc min + 52 (<compiler-generated>:0)
5   TrueTime                        0x0000000103c775cc map + 216 (NTPResponse.swift:42)
6   TrueTime                        0x0000000103c775cc bestTime(fromResponses:) + 660 (NTPResponse.swift:41)
7   TrueTime                        0x0000000103c6de10 closure #1 in NTPClient.query(addresses:host:) + 2112 (NTPClient.swift:198)
8   TrueTime                        0x0000000103c70638 closure #2 in static NTPConnection.query(addresses:config:logger:callbackQueue:progress:) + 36 (NTPConnection.swift:36)
9   TrueTime                        0x0000000103c73800 partial apply for closure #1 in NTPConnection.complete(_:) + 60 (NTPConnection.swift:196)
10  TrueTime                        0x0000000103c6b23c thunk for @escaping @callee_guaranteed () -> () + 28 (<compiler-generated>:0)
11  libdispatch.dylib               0x00000001807afe6c _dispatch_call_block_and_release + 32 (init.c:1517)
12  libdispatch.dylib               0x00000001807b1a30 _dispatch_client_callout + 20 (object.m:560)
13  libdispatch.dylib               0x00000001807b9124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
14  libdispatch.dylib               0x00000001807b9c80 _dispatch_lane_invoke + 392 (queue.c:3944)
15  libdispatch.dylib               0x00000001807c4500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
16  libsystem_pthread.dylib         0x00000001f12650bc _pthread_wqthread + 288 (pthread.c:2599)
17  libsystem_pthread.dylib         0x00000001f1264e5c start_wqthread + 8 (:-1)