首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >断开房间连接时出现Skylink IOS问题

断开房间连接时出现Skylink IOS问题
EN

Stack Overflow用户
提问于 2017-01-10 04:01:32
回答 1查看 49关注 0票数 0

我正在开发IOS版本的SkylinkJS。在网站上,这是好的。一切都运行正常。但在IOS上,我是由Swift编写应用程序的。

一切都很好,除了应用程序在试图断开与房间的连接时有时会崩溃。我很确定这个错误是因为房间断线造成的。因为如果我只是转到那个视图控制器,不连接到任何房间,或者只是连接到那个房间,然后不断开连接就离开。一切都会好起来的。

错误是:

代码语言:javascript
复制
2017-01-09 13:51:49.187237 Star Dial[8187:3318041] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[1]'
*** First throw call stack:
(0x1834c11b8 0x181ef855c 0x1833a4eac 0x1833a4d1c 0x1001bba70 0x102689218 0x102695a90 0x1001b7ee4 0x102689258 0x102689218 0x102696aec 0x10268cce0 0x102697088 0x102698e2c 0x102698b78 0x1825532a0 0x182552d8c)

libc++abi.dylib:使用类型NSException的未捕获异常终止

来自按钮断开连接的代码:

代码语言:javascript
复制
if self.skylinkConn != nil {
        self.skylinkConn?.disconnect({

            print(">>> PROFILE DISCONNECTED")

            if profile_before == "home" {
                profile_before  = ""
                self.dismiss(animated: true, completion: nil)
            } else if profile_before == "following" || profile_before == "follower" {
                profile_before  = ""
                self.dismiss(animated: true, completion: nil)
            } else {
                profile_before  = ""
                let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
                let next    = storyBoard.instantiateViewController(withIdentifier: "HomeView") as! HomeController
                self.present(next, animated: true, completion: nil)
            }
        })
}

profile_before来自根类。所以这不是原因。奇怪的是,这个错误只会在某些时候发生。就像当我打开这个控制器三四十次,它会崩溃一次…有时,我打开这个页面大约100次,然后崩溃。

当然,这也不是因为记忆。我检查了一下内存,在此期间平均为20-30 MB

EN

回答 1

Stack Overflow用户

发布于 2017-04-07 15:23:22

我在Temasys工程团队工作。所描述的问题已解决。如果任何人再次遇到此问题,请确保Temasys SDK for iOS是最新的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41555963

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档