[iOS] Use of deallocated memory



投稿日時:2023年8月09日

Hello!

During investigation of some crash with our own wrapper around 

ChatSDK + ChatProvidersSDK

I've noticed that SDK code itself is not safe via turning on "Address Sanitizer" (ChatSDK scheme at the top -> Edit Scheme -> Diagnostics -> tick Address Sanitizer)

even with simple demo APP ChatSDK_Auth:

https://github.com/zendesk/ios_sdk_demo_apps/tree/master/ChatSDKSamples/ChatSDK_Auth 

SPM versions:
ZendeskChatSDK: 4.0.1
ZendeskChatProvidersSDK: 4.0.1

Xcode 14.2
OSX Ventura 13.5

Could you please help with this ? We're actively using Address Sanitizer Tool during complex testing.

 

 

 


0

1

1件のコメント

Hey, it reproduces with XCode's default iOS empty UIViewController app with 2 additional lines of code in the AppDelegate's didFinishLaunchingWithOptions method:

Chat.initialize(accountKey: "********", appId: "------") // with or without real key and appId 
Chat.connectionProvider?.connect()

Please fix it, because we have recently lots of random crashes, and I assume that's the reason.

Maybe update your wrapper InnerWebSocket or better say SwiftWebSocket library, at least try it please. maybe somewhere there is [unowned self] usage, should be weak.

0


サインインしてコメントを残します。

お探しのものが見つかりませんか?

新規投稿