emqx / CocoaMQTT

MQTT 5.0 client library for iOS and macOS written in Swift
https://www.emqx.com/en
Other
1.59k stars 418 forks source link

Hello. After starting to subscribe for a while, it crashed. #372

Open aosic opened 3 years ago

aosic commented 3 years ago
image
leeway1208 commented 2 years ago

hello. We need some steps to reproduce the crash

ttnkha commented 1 year ago

Hi, I got the crash maybe relating to this issue, this log I got

`Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x8000000000000010 -> 0x0000000000000010 (possible pointer authentication failure) VM Region Info: 0x10 is not in any region. Bytes before following region: 4366483440 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START --->
__TEXT 104434000-104440000 [ 48K] r-x/r-x SM=COW ...rchantSandbox

Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [647] Triggered by Thread: 9

Thread 9 name: Thread 9 Crashed: 0 CocoaMQTT 0x0000000104567ed4 $sSh5countSivg9CocoaMQTT0B13MQTTWebSocketC9WriteItem33_E7331A8B74B4106D4653FB1F426555ECLLV_Tg5 + 0 (:0) 1 CocoaMQTT 0x0000000104567ed4 $sShyxGSlsSl5countSivgTW9CocoaMQTT0B13MQTTWebSocketC9WriteItem33_E7331A8B74B4106D4653FB1F426555ECLLV_Tg5 + 0 (:0) 2 CocoaMQTT 0x0000000104567ed4 $ss32_copyCollectionToContiguousArrayys0dE0Vy7ElementQzGxSlRzlFShy9CocoaMQTT0G13MQTTWebSocketC9WriteItem33_E7331A8B74B4106D4653FB1F426555ECLLVG_Tg5 + 0 (:0) 3 CocoaMQTT 0x0000000104567ed4 $sSlsE22_copyToContiguousArrays0cD0Vy7ElementQzGyFShy9CocoaMQTT0F13MQTTWebSocketC9WriteItem33_E7331A8B74B4106D4653FB1F426555ECLLVG_Tg5 + 0 (:0) 4 CocoaMQTT 0x0000000104567ed4 $sShyxGSTsST22_copyToContiguousArrays0cD0Vy7ElementQzGyFTW9CocoaMQTT0F13MQTTWebSocketC9WriteItem33_E7331A8B74B4106D4653FB1F426555ECLLVTg5 + 0 (:0) 5 CocoaMQTT 0x0000000104567ed4 specialized ContiguousArray.init(:) + 20 6 CocoaMQTT 0x0000000104560338 $ss15ContiguousArrayVyAByxGqdc7ElementQydRszSTRd__lufC9CocoaMQTT0D13MQTTWebSocketC9WriteItem33_E7331A8B74B4106D4653FB1F426555ECLLV_ShyAKGTg5 + 8 (:0) 7 CocoaMQTT 0x0000000104560338 $sSTsE6sorted2bySay7ElementQzGSbAD_ADtKXE_tKFShy9CocoaMQTT0D13MQTTWebSocketC9WriteItem33_E7331A8B74B4106D4653FB1F426555ECLLVGTg5 + 8 (:0) 8 CocoaMQTT 0x0000000104560338 CocoaMQTTWebSocket.checkScheduledWrites() + 264 9 CocoaMQTT 0x000000010455eba0 closure #1 in CocoaMQTTWebSocket.write(:withTimeout:tag:) + 364 (CocoaMQTTWebSocket.swift:136) 10 CocoaMQTT 0x00000001045329d4 thunk for @escaping @callee_guaranteed () -> () + 28 (:0) 11 libdispatch.dylib 0x00000001a54dc24c _dispatch_call_block_and_release + 32 (init.c:1454) 12 libdispatch.dylib 0x00000001a54dddb0 _dispatch_client_callout + 20 (object.m:559) 13 libdispatch.dylib 0x00000001a54e510c _dispatch_lane_serial_drain + 580 (inline_internal.h:2548) 14 libdispatch.dylib 0x00000001a54e5c5c _dispatch_lane_invoke + 408 (queue.c:3862) 15 libdispatch.dylib 0x00000001a54efd78 _dispatch_workloop_worker_thread + 708 (queue.c:6601) 16 libsystem_pthread.dylib 0x00000001f1399814 _pthread_wqthread + 276 (pthread.c:2211) 17 libsystem_pthread.dylib 0x00000001f13a076c start_wqthread + 8 (:-1)`

It happens randomly in version 2.0.5, I can't replicate it. Does anyone have any solutions?