swift-sdk icon indicating copy to clipboard operation
swift-sdk copied to clipboard

[Bug]: crash on NWPathMonitor

Open CameronPorter95 opened this issue 1 year ago • 1 comments

Environment info:

iPhone X iOS 16.7.0 Xcode 15.0

Library Version:

6.4.13

Steps to reproduce

Crash on app launch

image

Logs

* thread #40, queue = 'NSManagedObjectContext 0x2817344e0', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
  * frame #1: 0x0000000105bf6b88 IterableSDK`NetworkMonitor.start(self=0x000000028233f180) at NetworkMonitor.swift:35:30
    frame #2: 0x0000000105bf7464 IterableSDK`protocol witness for NetworkMonitorProtocol.start() in conformance NetworkMonitor at <compiler-generated>:0
    frame #3: 0x0000000105bf14f0 IterableSDK`NetworkConnectivityManager.start(self=0x00000002817348f0) at NetworkConnectivityManager.swift:45:24
    frame #4: 0x0000000105bd1a34 IterableSDK`closure #1 in IterableTaskRunner.start(self=0x000000028191c900) at IterableTaskRunner.swift:46:39
    frame #5: 0x0000000105b338d8 IterableSDK`thunk for @escaping @callee_guaranteed () -> () at <compiler-generated>:0
    frame #6: 0x00000001df40ea18 CoreData`developerSubmittedBlockToNSManagedObjectContextPerform + 148
    frame #7: 0x0000000107b457a0 libdispatch.dylib`_dispatch_client_callout + 16
    frame #8: 0x0000000107b4c8e4 libdispatch.dylib`_dispatch_lane_serial_drain + 684
    frame #9: 0x0000000107b4d584 libdispatch.dylib`_dispatch_lane_invoke + 412
    frame #10: 0x0000000107b590ac libdispatch.dylib`_dispatch_workloop_worker_thread + 692
    frame #11: 0x00000002223e1bd0 libsystem_pthread.dylib`_pthread_wqthread + 284

Notes:

This looks to be the same issue found on an unrelated repo here: https://github.com/fluttercommunity/plus_plugins/issues/1953 which was fixed by updating the minimum ios version to 12+: https://github.com/fluttercommunity/plus_plugins/pull/2169

Update minimum deployment version to 12+ and podspec platform to 12.0 https://github.com/Iterable/swift-sdk/blob/master/Iterable-iOS-SDK.podspec#L15

CameronPorter95 avatar Nov 08 '23 05:11 CameronPorter95

I am also seeing this issue when compiling with Xcode 15. You can replicate this easily by putting the app into the background and then switch back. Crash happens when the app is put into the foreground.

woelmer avatar Apr 05 '24 14:04 woelmer