Description
A crash occurs when executing singularLinksHandler in Swift 6.
Crashed: com.apple.root.default-qos
0 libdispatch.dylib 0x64d8 _dispatch_assert_queue_fail
1 libdispatch.dylib 0x6460 _dispatch_assert_queue_fail
2 libswift_Concurrency.dylib 0x62b78 swift_task_isCurrentExecutorImpl(swift::SerialExecutorRef) + 284
3 projectName.debug.dylib 0x4d90d8 closure #1 in SceneDelegate.getConfig() + 740 (SceneDelegate.swift:740)
4 projectName.debug.dylib 0x4caf54 thunk for @escaping @callee_guaranteed (@guaranteed SingularLinkParams?) -> () (<compiler-generated>)
5 projectName.debug.dylib 0x4caf08 thunk for @escaping @callee_unowned @convention(block) (@unowned SingularLinkParams?) -> () (<compiler-generated>)
6 projectName.debug.dylib 0x4caf54 thunk for @escaping @callee_guaranteed (@guaranteed SingularLinkParams?) -> () (<compiler-generated>)
7 libdispatch.dylib 0x2370 _dispatch_call_block_and_release
8 libdispatch.dylib 0x40d0 _dispatch_client_callout
9 libdispatch.dylib 0x7218 _dispatch_queue_override_invoke
10 libdispatch.dylib 0x15d8c _dispatch_root_queue_drain
11 libdispatch.dylib 0x16590 _dispatch_worker_thread2
12 libsystem_pthread.dylib 0x4c40 _pthread_wqthread + 228
13 libsystem_pthread.dylib 0x1488 start_wqthread + 8
When I annotate the closure with Sendable, the crash no longer occurs.
let singularConfig = SingularConfig(apiKey: "xxx", andSecret: "yyy")
singularConfig.singularLinksHandler = { @Sendable params in
// works fine
}
Question
Could you please update the SDK so that the handler is correctly marked Sendable (or otherwise compatible with Swift 6)?
Environment
- Singular SDK version: 12.8.1
- Xcode version: 16.2
- Swift version: 6.0
Description
A crash occurs when executing singularLinksHandler in Swift 6.
When I annotate the closure with Sendable, the crash no longer occurs.
Question
Could you please update the SDK so that the handler is correctly marked Sendable (or otherwise compatible with Swift 6)?
Environment