Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
Crashed: com.apple.root.default-qos EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000007
Hi @eskimo, I have attached the Log file here.
Firebase.txt
Also, this is the code that potentially causes the crash.
func resolve(query: String, then resultHandler: @escaping ResultHandler<URL>) -> Request {
let request = DNSRequest()
var context = Context(query: query, request: request, resultHandler: resultHandler)
let semaphore = DispatchSemaphore(value: 0)
DispatchQueue.global().async {
var sdRef: DNSServiceRef?
let contextRef = withUnsafePointer(to: &context) {
UnsafeMutableRawPointer(mutating: $0)
}
DNSServiceQueryRecord(&sdRef, 0, 0, query, UInt16(kDNSServiceType_SRV), UInt16(kDNSServiceClass_IN), DNSServiceSRVLookup.dnsServiceQueryRecordReply, contextRef)
let timeout = DispatchWorkItem { [weak request] in
if let request = request, let timeout = request.timeoutWorkItem, !timeout.isCancelled {
request.timedOut(.failure(EndpointResolverError.timedOut))
}
}
request.sdRef = sdRef
request.resultHandler = resultHandler
request.timeoutWorkItem = timeout
DispatchQueue.main.asyncAfter(deadline: .now() + DNSServiceSRVLookup.timeout, execute: timeout)
semaphore.signal()
DNSServiceProcessResult(sdRef)
}
semaphore.wait()
return request
}