SwiftyPing
SwiftyPing copied to clipboard
Bringing app to foreground crash
I'm wondering if you had this issue before, maybe I'm doing something wrong. It crashes when bringing up the app to foreground after being in the background for a while and setting handleBackgroundTransitions = true
Crashed: com.apple.main-thread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000121bec008
Crashed: com.apple.main-thread
0 libswiftCore.dylib 0x192f1162c swift_release + 44
1 libswiftCore.dylib 0x192bac8a8 Array.makeUniqueAndReserveCapacityIfNotUnique() + 212
2 libswiftCore.dylib 0x192bacac8 Array.append(:) + 40
3 MyApp 0x100cd8984 SwiftyPing.informObserver(of:) + 435 (SwiftyPing.swift:435)
4 MyApp 0x100cdaa1c SwiftyPing.socket(socket:didReadData:) + 571 (SwiftyPing.swift:571)
5 MyApp 0x100cd6558 closure #1 in closure #1 in SwiftyPing.createSocket() + 281 (SwiftyPing.swift:281)
6 MyApp 0x100cd660c @objc closure #1 in closure #1 in SwiftyPing.createSocket() + 84 (
I have the same problem but not in main-thread. It occurs above iOS 15.0, last func Stack maybe in private func informObserver(of response: PingResponse) {
Thread 13 Crashed:
0 libsystem_platform.dylib 0x00000001f0d5cab0 platform_memmove
1 MyApp 0x00000001055708c8 $sSa16_createNewBuffer14bufferIsUnique15minimumCapacity13growForAppendySb_SiSbtF5YDASR12PingResponseV_Tg5 + [
I'm having the same issue as well
Also having this issue, anybody solve this?
I had a crash when coming to foreground, possibly to do with resolving an address.
public static func getIPv4AddressFromHost(host: String) throws -> Data { var streamError = CFStreamError() let cfhost = CFHostCreateWithName(nil, host as CFString).takeRetainedValue() let status = CFHostStartInfoResolution(cfhost, .addresses, &streamError)
I'll change the hostname to an IP and report back.