0
我正在SkylinkJS IOS版本。在网站上,这很好。一切正常运行。但在iOS上,我由Swift编写应用程序。Skylink IOS问题,当断开房间
一切都很好,除了应用程序只是试图断开房间时崩溃。我知道这个错误来自房间断开。因为如果我只是去那个视图控制器,不要连接到任何房间,或者只是连接到那个房间并离开而没有断开连接。一切都会变好。
错误是:
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
从按钮断开的代码:
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是从根类。所以这不是原因。奇怪的是,这个错误只发生在某个时候...比如当我打开这个控制器30,40次时,它会崩溃一次......有时候,我打开这个页面大约100次并崩溃。
当然,这不是因为回忆。我检查内存,在那段时间内的平均值是20-30 MB