I have a (ReactiveSwift) timer running indefinitely that fires every x minutes. After ~6 days and having accumulated about 500 stack frames, the iOS application crashes with the following few stack frames:
0 libswiftCore.dylib 0x0000000191876178 getCache(swift::TargetTypeContextDescriptor<swift::InProcess> const&) + 8
1 LLLLLLLL 0x0000000100d62208 __swift_instantiateGenericMetadata (<compiler-generated>:0)
2 LLLLLLLL 0x0000000100d9f338 ReactiveSwift.Signal.(Core in _6DF632AE8A9288C3EAD8EFDF3D3AF99E).send(ReactiveSwift.Signal<A, B>.Event) -> () (<compiler-generated>:0)
3 LLLLLLLL 0x0000000100d9e364 ReactiveSwift.Signal.Observer.send(ReactiveSwift.Signal<A, B>.Event) -> () (Signal.Observer.swift:111)
4 LLLLLLLL 0x0000000100d7ca80 generic partial specialization <Signature = @escaping @convention(thin) @convention(method) <A, B><A1 where B: Swift.Error, A1 == ReactiveSwift.Lock> (@in_guaranteed ReactiveSwift.Signal<A, B>.Event, @guaranteed ReactiveSwift.Signal<A, B>.(Core in _6DF632AE8A9288C3EAD8EFDF3D3AF99E)<ReactiveSwift.Lock>) -> ()> of ReactiveSwift.Signal.(Core in _6DF632AE8A9288C3EAD8EFDF3D3AF99E).send(ReactiveSwift.Signal<A, B>.Event) -> () (Signal.swift:124)
The stack frames from 5 to 511 are repetitions of the following:
5 LLLLLLLL 0x0000000100d9e364 ReactiveSwift.Signal.Observer.send(ReactiveSwift.Signal<A, B>.Event) -> () (Signal.Observer.swift:111)
6 LLLLLLLL 0x0000000100d760b8 closure #3 (ReactiveSwift.Signal<A.Value, B>.Event) -> () in closure #1 (ReactiveSwift.Signal<A.Value, B>, ReactiveSwift.Disposable) -> () in closure #1 (ReactiveSwift.Signal<A, B>.Event) -> () in (extension in ReactiveSwift):ReactiveSwift.Signal< where A: ReactiveSwift.SignalProducerConvertible, B == A.Error>.(observeSwitchToLatest in _6345D8752C3E65AA1118F4C784F9873D)(ReactiveSwift.Signal<A.Value, B>.Observer, ReactiveSwift.SerialDisposable) -> ReactiveSwift.Disposable? (Flatten.swift:677)
Note that the app has been running for 6 days until the crash occurs.
Crash details are as follows:
Exception Type: SIGBUS
Exception Codes: BUS_ADRERR at 0x16f4a3f90
Crashed Thread: 0
Could this be a Swift runtime bug that causes the cache to get corrupted?