-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bringing app to foreground crash #33
Comments
I have the same problem but not in main-thread. It occurs above iOS 15.0, last func Stack maybe in Thread 13 Crashed: |
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 { I'll change the hostname to an IP and report back. |
I had a same issue and was able to solve it by making: public private(set) var responses: [PingResponse] = [] and private var erroredIndices = [Int]() threadsafe. private var _responses: [PingResponse] = []
public private(set) var responses: [PingResponse] {
get {
_serial_property.sync { self._responses }
}
set {
_serial_property.sync { self._responses = newValue }
}
} and private var _erroredIndices = [Int]()
private var erroredIndices: [Int] {
get {
_serial_property.sync { self._erroredIndices }
}
set {
_serial_property.sync { self._erroredIndices = newValue }
}
} |
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 (:84)
7 CoreFoundation 0x18efb78dc __CFSocketPerformV0 + 812
8 CoreFoundation 0x18efac9e8 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
9 CoreFoundation 0x18efac8e4 __CFRunLoopDoSource0 + 208
10 CoreFoundation 0x18efabbe8 __CFRunLoopDoSources0 + 268
11 CoreFoundation 0x18efa5bc8 __CFRunLoopRun + 820
12 CoreFoundation 0x18efa5360 CFRunLoopRunSpecific + 600
13 GraphicsServices 0x1a65e3734 GSEventRunModal + 164
14 UIKitCore 0x191a20584 -[UIApplication _run] + 1072
15 UIKitCore 0x191a25df4 UIApplicationMain + 168
16 MyApp 0x100c7b7ec main + 34 (AppDelegate.swift:34)
17 libdyld.dylib 0x18ec61cf8 start + 4
The text was updated successfully, but these errors were encountered: