Open perlasivakrishna opened 6 years ago
Hi @perlasivakrishna
We are sorry that you are experiencing the crash. Can you provide some more info about the issue such as which iOS SDK and version you are using? based on the stacktrace I am assuming you are using the Chat SDK but just want to make sure.
Thanks.
Hello @perlasivakrishna,
A couple of requests for you so we can route you to the right team to help:
bt all
Thank you, Randy
Hello Im using "TwilioIPMessagingClient (0.14.2)". Please find my crash full crash report . carsh report.txt
Thanks Siva Krishna
Hi Siva,
Thank you for the full thread trace. It looks like in this application trace, the crash occurred as the application was exiting for other reasons (idleness, low memory on device, etc) and is not reflective of a crash while the application is in-use:
#0. com.apple.main-thread
0 libsystem_kernel.dylib 0x18160c0f0 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x181722ce4 _pthread_cond_wait$VARIANT$mp + 640
2 SendASitterCarePartner 0x100ba6700 TwilioPoco::EventImpl::waitImpl(long) + 1216444
3 SendASitterCarePartner 0x100bbeea4 TwilioPoco::ThreadImpl::joinImpl(long) + 1316704
4 SendASitterCarePartner 0x100bc01ac TwilioPoco::PooledThread::release() + 1321576
5 SendASitterCarePartner 0x100bc0a18 TwilioPoco::ThreadPool::stopAll() + 1323732
6 SendASitterCarePartner 0x100bc0920 TwilioPoco::ThreadPool::~ThreadPool() + 1323484
7 libsystem_pthread.dylib 0x181722ce4 _pthread_cond_wait$VARIANT$mp + 640
8 SendASitterCarePartner 0x100bc14f4 TwilioPoco::ThreadPoolSingletonHolder::~ThreadPoolSingletonHolder() + 1326512
9 libsystem_c.dylib 0x18157bbbc __cxa_finalize_ranges + 384
10 libsystem_c.dylib 0x1815250a0 exit + 24
11 UIKit 0x18b137fe4 -[UIApplication applicationWillTerminate] + 466
12 UIKit 0x18b5b2964 __98-[__UICanvasLifecycleMonitor_Compatability deactivateEventsOnly:withContext:forceExit:completion:]_block_invoke.271 + 344
13 UIKit 0x18b31eb3c _runAfterCACommitDeferredBlocks + 292
14 UIKit 0x18b311ef0 _cleanUpAfterCAFlushAndRunDeferredBlocks + 288
15 UIKit 0x18b0a354c _afterCACommitHandler + 132
16 CoreFoundation 0x181aa1edc __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
17 CoreFoundation 0x181a9f894 __CFRunLoopDoObservers + 412
18 CoreFoundation 0x181a9fe50 __CFRunLoopRun + 1292
19 CoreFoundation 0x1819bfe58 CFRunLoopRunSpecific + 436
20 GraphicsServices 0x18386cf84 GSEventRunModal + 100
21 UIKit 0x18b11467c UIApplicationMain + 236
22 SendASitterCarePartner 0x100581ad4 main (AppDelegate.swift:22)
23 libdyld.dylib 0x1814dc56c start + 4
We have resolved this in newer versions of the SDK under the hood but you may be able to resolve this by calling the TwilioIPMessagingClient’s shutdown method in your applicationWillTerminate: delegate method on the AppDelegate.
We’ve made many improvements since 0.14.2 was released in Jun 2016, I believe it woud be best for you to update to one of our newer releases (I recommend 2.2.0) to resolve this issue. You can find migration guides and information about our latest releases here: https://www.twilio.com/docs/api/chat/changelogs/ios#migration-guides
Versions of Programmable Chat (IP Messaging) prior to our GA date of May 2017 will soon be formally retired.
Thank you, Randy
Hey. Thanks for help. I will try that out. Thanks Siva Krishna
hi @rbeiter As u suggested I'm trying to update to chat. Im facing one strange issue. Im unable to join the channel. Im getting "50404" error "Member already exists". But every thing working fine with my old code. Please help me to solve the issue.
Thanks Siva Krishna
Hi @perlasivakrishna,
It sounds like the member is already a member of the channel. In prior releases, we silently ignored requests to join/add/invite members to a channel they are already a member of but now we raise an error to make sure the developer is aware of this situation. That sounds like whats happening here. You may wish to check the channel object's status
property and if the status is already TCHChannelStatusJoined
you can skip over the join call. Joins to a channel persist between chat sessions, so the member will already be on the channel in future runs.
Thank you, Randy
Hi @rbeiter So before joining channel we need to check the status of channel whether it is joined or not.
func joinGeneralChatRoomWithCompletion(completion: @escaping (Bool) -> Void) {
let uniqueName = ChannelManager.defaultChannelUniqueName
let uniqueId = ChannelManager.defaultChannelId
if let channelsList = self.channelsList {
channelsList.channel(withSidOrUniqueName: uniqueId!) { result, channel in
self.generalChannel = channel
if self.generalChannel.status == .joined{
completion(true)
} else {
if self.generalChannel != nil {
self.joinGeneralChatRoomWithUniqueName(name: nil, completion: completion)
} else {
self.createGeneralChatRoomWithCompletion { succeeded in
if (succeeded) {
self.joinGeneralChatRoomWithUniqueName(name: uniqueName, completion: completion)
return
}
completion(false)
}
}
}
}
}
}
This is how I'm checking. It seems working fine, Hope this is the right way.
Thank you, Siva Krishna
Hello, Please help me on these https://github.com/twilio/twilio-chat-demo-ios/issues/39
Thanks
Im facing this issue for so many users. Please let me know the fix for that issue.