29,028
社区成员
发帖
与我相关
我的任务
分享
Sep 21 22:26:22 Raozhivende-iPhone TestChat[8124] <Warning>: Received "{"DataType":-1}"
Sep 21 22:26:32 Raozhivende-iPhone backboardd[31] <Warning>: BKUnsuspendLimit TestChat[8124] exceeded 15 wakes in 300 sec
Sep 21 22:26:32 Raozhivende-iPhone backboardd[31] <Warning>: Forcing crash report of TestChat[8124]...
Sep 21 22:26:32 Raozhivende-iPhone backboardd[31] <Warning>: Finished crash reporting.
Sep 21 22:26:32 Raozhivende-iPhone wifid[40] <Error>: WiFi:[433002392.576092]: Disable WoW requested by "UserEventAgent"
Sep 21 22:26:32 Raozhivende-iPhone com.apple.launchd[1] (UIKitApplication:com.squareup.TestChat[0x5017][8124]) <Notice>: (UIKitApplication:com.squareup.TestChat[0x5017]) Exited: Killed: 9
Sep 21 22:26:32 Raozhivende-iPhone backboardd[31] <Warning>: Application 'UIKitApplication:com.squareup.TestChat[0x5017]' exited abnormally with signal 9: Killed: 9
Sep 21 22:26:32 Raozhivende-iPhone SpringBoard[16] <Warning>: Encountered an XPC error while communicating with backboardd: <error: 0x193302cd0> { count = 1, contents =
"XPCErrorDescription" => <string: 0x193303108> { length = 22, contents = "Connection interrupted" }
}
Sep 21 22:26:32 Raozhivende-iPhone SpringBoard[16] <Warning>: Memory level is not normal or this app was killed by jetsam. Pending auto-relaunch of 'com.squareup.TestChat'.
Sep 21 22:26:32 Raozhivende-iPhone ReportCrash[8139] <Notice>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/TestChat_2014-09-21-222632_Raozhivende-iPhone.ips using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Sep 21 22:26:41 Raozhivende-iPhone touchsetupd[110] <Warning>: WPTransfer deallocing
Sep 21 22:26:41 Raozhivende-iPhone wirelessproxd[35] <Notice>: (Error) error event: (<OS_xpc_error: <error: 0x193302dc8> { count = 1, contents =
"XPCErrorDescription" => <string: 0x1933030d0> { length = 18, contents = "Connection invalid" }
}>)
Sep 21 22:26:47 Raozhivende-iPhone kernel[0] <Debug>: launchd[8140] Container: /private/var/mobile/Applications/DF75FDF4-47DB-480F-BC2B-913F38C563EF (sandbox)
Sep 21 22:26:47 Raozhivende-iPhone backboardd[31] <Error>: HID: The 'Passive' connection 'TestChat' access to protected services is denied.
- (void)_initializeStreams;
{
assert(_url.port.unsignedIntValue <= UINT32_MAX);
uint32_t port = _url.port.unsignedIntValue;
if (port == 0) {
if (!_secure) {
port = 80;
} else {
port = 443;
}
}
NSString *host = _url.host;
CFReadStreamRef readStream = NULL;
CFWriteStreamRef writeStream = NULL;
CFStreamCreatePairWithSocketToHost(NULL, (__bridge CFStringRef)host, port, &readStream, &writeStream);
_outputStream = CFBridgingRelease(writeStream);
_inputStream = CFBridgingRelease(readStream);
if (_secure) {
NSMutableDictionary *SSLOptions = [[NSMutableDictionary alloc] init];
[_outputStream setProperty:(__bridge id)kCFStreamSocketSecurityLevelNegotiatedSSL forKey:(__bridge id)kCFStreamPropertySocketSecurityLevel];
// If we're using pinned certs, don't validate the certificate chain
if ([_urlRequest SR_SSLPinnedCertificates].count) {
[SSLOptions setValue:[NSNumber numberWithBool:NO] forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain];
}
#if DEBUG
[SSLOptions setValue:[NSNumber numberWithBool:NO] forKey:(__bridge id)kCFStreamSSLValidatesCertificateChain];
NSLog(@"SocketRocket: In debug mode. Allowing connection to any root cert");
#endif
[_outputStream setProperty:SSLOptions
forKey:(__bridge id)kCFStreamPropertySSLSettings];
}
// Set up the connections to be VOIP
[_inputStream setProperty:NSStreamNetworkServiceTypeVoIP forKey:NSStreamNetworkServiceType];
[_outputStream setProperty:NSStreamNetworkServiceTypeVoIP forKey:NSStreamNetworkServiceType];
_inputStream.delegate = self;
_outputStream.delegate = self;
}
我在_initializeStreams方法里添加了这两句后,未加之前切换到后台几秒钟就断开了。切换到后台能正常执行一段时间,然后出现异常 lldb ,用 bt 得出异常信息如下:
* thread #1: tid = 0x1bdbaf, 0x0000000190511ca0 libsystem_kernel.dylib`mach_msg_trap + 8, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x0000000190511ca0 libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x0000000190511b0c libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x00000001838f2d24 CoreFoundation`__CFRunLoopServiceMachPort + 184
frame #3: 0x00000001838f0f18 CoreFoundation`__CFRunLoopRun + 936
frame #4: 0x0000000183831dd0 CoreFoundation`CFRunLoopRunSpecific + 452
frame #5: 0x0000000189519c0c GraphicsServices`GSEventRunModal + 168
frame #6: 0x0000000186962fc4 UIKit`UIApplicationMain + 1156
frame #7: 0x00000001001013f0 TestChat`main(argc=1, argv=0x000000016fd03c40) + 116 at main.m:16
frame #8: 0x000000019042faa0 libdyld.dylib`start + 4