Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cannot form weak reference to instance of class KoreBotSDK.RTMTimer #18

Open
jserranoglobant opened this issue Jul 15, 2019 · 0 comments

Comments

@jserranoglobant
Copy link

jserranoglobant commented Jul 15, 2019

Issue found on iOS-Kore-SDK tag version 0.16

When the disconnect method of BotClient is called continuously the RTMTimer is generating a crash. The RTMPersistenceConnection is deallocating the timerSource and after that in the deinit, the timer.setEventHandler {} is accessing a bad reference because the timer is nil. The log error message from Xcode console is: Cannot form weak reference to instance (0x1c524bca0) of class KoreBotSDK.RTMTimer. It is possible that this object was over-released, or is in the process of deallocation.

Please see the following evidence:

koreSDKCrashEvidence0

BotClient.swift
koreSDKCrashEvidence1

RTMPersistenceConnection.swift
koreSDKCrashEvidence2

RTMPersistenceConnection.swift - RTMTimer
koreSDKCrashEvidence3
koreSDKCrashEvidence4

RTMPersistenceConnection.swift - RTMTimer
koreSDKCrashEvidence5
koreSDKCrashEvidence6

This is our crash report from Crashlytics:

crashReport-main-threadKoreEvidence1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant