Iterable / swift-sdk

Iterable's iOS SDK. Receive and track pushes to Iterable from your iOS app.
https://iterable.com/
MIT License
86 stars 71 forks source link

EXC_BAD_ACCESS KERN_INVALID_ADDRESS Crash when syncing message dictionary in InAppManager #582

Open bhawkerfetch opened 1 year ago

bhawkerfetch commented 1 year ago

Hello,

Getting a number of user crashes in the wild in InAppManager.finishSync() on SDK version 6.4.7, when trying to access the ordered dictionary of messages to persist them.

This was happening occasionally in older versions of the SDK but seemingly much more now.

Looking through some of the crashes, my best lead is that this is during normal app usage (not on app startup) when a message arrives.

Any ideas on getting this resolved with an SDK update?

Crashed: com.apple.NSURLSession-delegate EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000 Crashed: com.apple.NSURLSession-delegate 0 IterableSDK 0x21348 $s11IterableSDK17OrderedDictionaryV6valuesSayq_GvgSS_AA0A12InAppMessageCTB5 + 212 1 IterableSDK 0x23f24 $s11IterableSDK12InAppManagerC10finishSync33_DF59196118A2335C445AC651F3842B40LL12inboxChangedySb_tF + 864 2 IterableSDK 0x23b90 $s11IterableSDK12InAppManagerC11synchronize33_DF59196118A2335C445AC651F3842B40LL10appIsReadyAA6FutureCySbs5Error_pGSbtFSbAA19MergeMessagesResultVcfU0 + 500 3 IterableSDK 0x6ebb8 $s11IterableSDK6FutureC3mapyACyqdq_GqdxclFyxcfU_AA19MergeMessagesResultV_s5Error_pSbTB5 + 52 4 IterableSDK 0x33514 $sxIegn_xytIegnr_s5ErrorR_r0_lTR11IterableSDK19MergeMessagesResultV_sAA_pTG5TA + 52 5 IterableSDK 0x17c90 $s11IterableSDK6FutureC6report33_356D129435571A56DF59A9C74EA36600LL6resultys6ResultOyxq_G_tFAA013MergeMessagesL0V_s5Error_pTB5 + 292 6 IterableSDK 0x6ed34 $s11IterableSDK6FutureC3mapyACyqdq_GqdxclFyxcfU_SayAA0A12InAppMessageCG_s5Error_pAA19MergeMessagesResultVTg5 + 248 7 IterableSDK 0x31494 $sxIegn_xytIegnr_s5ErrorR_r0_lTRSDys11AnyHashableVypG_11IterableSDK011SendRequestA0VTG5TA + 36 8 IterableSDK 0x17994 $s11IterableSDK6FutureC6report33_356D129435571A56DF59A9C74EA36600LL6resultys6ResultOyxq_G_tFSayAA0A12InAppMessageCG_s5Error_pTg5 + 120 9 IterableSDK 0xa18fc $s11IterableSDK6FutureC10mapFailureyACyxqdGqdq_cs5ErrorRdlFyxcfU_SayAA0A12InAppMessageCG_AA011SendRequestF0VsAF_pTg5 + 128 10 IterableSDK 0x31494 $sxIegn_xytIegnr_s5ErrorR_r0_lTRSDys11AnyHashableVypG_11IterableSDK011SendRequestA0VTG5TA + 36 11 IterableSDK 0x178d8 $s11IterableSDK6FutureC6report33_356D129435571A56DF59A9C74EA36600LL6resultys6ResultOyxq_G_tFSDys11AnyHashableVypG_AA16SendRequestErrorVTg5Tm + 332 12 IterableSDK 0x6eb48 $s11IterableSDK6FutureC3mapyACyqdq_GqdxclFyxcfU_SDys11AnyHashableVypG_AA16SendRequestErrorVSayAA0A12InAppMessageCGTg5 + 236 13 IterableSDK 0x31494 $sxIegn_xytIegnr_s5ErrorR_r0_lTRSDys11AnyHashableVypG_11IterableSDK011SendRequestA0VTG5TA + 36 14 IterableSDK 0x178d8 $s11IterableSDK6FutureC6report33_356D129435571A56DF59A9C74EA36600LL6resultys6ResultOyxq_G_tFSDys11AnyHashableVypG_AA16SendRequestErrorVTg5Tm + 332 15 IterableSDK 0xa1784 $s11IterableSDK6FutureC10mapFailureyACyxqdGqdq_cs5ErrorRdlFyxcfU_SDys11AnyHashableVypG_AA07NetworkF0VAA011SendRequestF0VTg5 + 212 16 IterableSDK 0x31494 $sxIegn_xytIegnr_s5ErrorR_r0_lTRSDys11AnyHashableVypG_11IterableSDK011SendRequestA0VTG5TA + 36 17 IterableSDK 0x170f8 $s11IterableSDK6FutureC6report33_356D129435571A56DF59A9C74EA36600LL6resultys6ResultOyxq_G_tFSDys11AnyHashableVypG_AA12NetworkErrorVTg5 + 324 18 IterableSDK 0x9e544 $s11IterableSDK13NetworkHelperV11sendRequest_9converter12usingSessionAA6FutureCyxAA0C5ErrorVG10Foundation10URLRequestV_xSgAL4DataVKcAA0cI8Protocol_ptlFZyAQSg_So13NSURLResponseCSgs0K0_pSgtcfU_SDys11AnyHashableVypG_Tg5 + 612 19 IterableSDK 0x94b8c $sSo12NSURLSessionC11IterableSDKE11makeRequest_17completionHandlery10Foundation10URLRequestV_yAF4DataVSg_So13NSURLResponseCSgs5Error_pSgtctFyAK_AnPtcfU_TA + 20 20 IterableSDK 0x6a1fc $s10Foundation4DataVSgSo13NSURLResponseCSgs5Error_pSgIegggg_So6NSDataCSgAGSo7NSErrorCSgIeyByyy_TR + 148 21 FirebasePerformance 0x1bc64 __InstrumentDataTaskWithRequestCompletionHandler_block_invoke_2 + 220 22 FirebasePerformance 0x1bc64 __InstrumentDataTaskWithRequestCompletionHandler_block_invoke_2 + 220 23 CFNetwork 0x22b6c CFURLRequestSetMainDocumentURL + 3000 24 CFNetwork 0x33d80 _CFNetworkErrorCopyLocalizedDescriptionWithHostname + 11944 25 libdispatch.dylib 0x1e6c _dispatch_call_block_and_release + 32 26 libdispatch.dylib 0x3a30 _dispatch_client_callout + 20 27 libdispatch.dylib 0xb124 _dispatch_lane_serial_drain + 668 28 libdispatch.dylib 0xbcb4 _dispatch_lane_invoke + 444 29 libdispatch.dylib 0x16500 _dispatch_workloop_worker_thread + 648 30 libsystem_pthread.dylib 0x10bc _pthread_wqthread + 288 31 libsystem_pthread.dylib 0xe5c start_wqthread + 8