我在 iOS 中创建了套接字连接机制。它工作得很好。但有时(大约 1%)它会崩溃。这是崩溃日志,你知道为什么会这样吗?
Thread 0 Crashed:
0 libobjc.A.dylib 0x3b01b5b0 _objc_msgSend + 16
1 CoreFoundation 0x332957cf _signalEventSync + 75
2 CoreFoundation 0x3329b623 _cfstream_solo_signalEventSync + 75
3 CoreFoundation 0x33295507 _CFStreamSignalEvent + 327
4 CFNetwork 0x32ffa6ff CoreWriteStreamCFStreamSupport::coreStreamWriteEvent(__CoreWriteStream*, unsigned long) + 99
5 CFNetwork 0x32ffa0b5 CoreWriteStreamClient::coreStreamEventsAvailable(unsigned long) + 37
6 CFNetwork 0x32ffb365 CoreStreamBase::_callClientNow() + 45
7 CFNetwork 0x32ffb0f9 CoreStreamBase::_streamSetEventAndScheduleDelivery(unsigned long, unsigned char) + 89
8 CFNetwork 0x32ffb4ff CoreStreamBase::_streamInterface_SignalEvent(unsigned long, CFStreamError const*) + 35
9 CFNetwork 0x32f69b57 SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 135
10 CFNetwork 0x32f69ab3 SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 75
11 CoreFoundation 0x332cfd81 __CFSocketPerformV0 + 385
12 CoreFoundation 0x332cd683 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
13 CoreFoundation 0x332ccf7f __CFRunLoopDoSources0 + 363
14 CoreFoundation 0x332cbcb7 __CFRunLoopRun + 647
15 CoreFoundation 0x3323eebd _CFRunLoopRunSpecific + 357
16 CoreFoundation 0x3323ed49 _CFRunLoopRunInMode + 105
17 GraphicsServices 0x36e172eb _GSEventRunModal + 75
18 UIKit 0x35154301 _UIApplicationMain + 1121
19 Okey101Plus 0x000e19ab main (main.m:16)