简体   繁体   中英

GCDWeb Server Crash issue in iOS

I am a iOS app developer. I am using GCD Server code from Git Hub for http communication in my app. But frequently crash in _NetServiceRegisterCallBack() function in GCDWebserver.m class. Please assist me.

The Whole things are given bellow:

In Console : (CFStreamError *) error = 0xbffb2b00 and BAD_EXE in the following line: 0x4bd3d0f: addl $0x91c, %esp

Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x186be9014 __pthread_kill + 8
1  libsystem_pthread.dylib        0x186cb3264 pthread_kill + 112
2  libsystem_c.dylib              0x186b5d9c4 abort + 140
3  GCDWebServer                   0x100ccf9fc _NetServiceRegisterCallBack + 372
4  CFNetwork                      0x18827ac1c _RegisterReply(_DNSServiceRef_t*, unsigned int, int, char const*, char const*, char const*, void*) + 308
5  libsystem_dnssd.dylib          0x186ba2cf8 handle_regservice_response + 152
6  libsystem_dnssd.dylib          0x186ba08fc DNSServiceProcessResult + 556
7  CFNetwork                      0x18827ad30 _SocketCallBack_NetService(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 40
8  CoreFoundation                 0x187ba22e8 __CFSocketPerformV0 + 956
9  CoreFoundation                 0x187b9d42c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
10 CoreFoundation                 0x187b9cd9c __CFRunLoopDoSources0 + 540
11 CoreFoundation                 0x187b9a9a8 __CFRunLoopRun + 744
12 CoreFoundation                 0x187acada4 CFRunLoopRunSpecific + 424
13 GraphicsServices               0x189535074 GSEventRunModal + 100
14 UIKit                          0x18dd7ec9c UIApplicationMain + 208

The crash happens you are building GCDWebServer in Debug more which calls abort() when there are certain unexpected errors or programming errors. In this case, CFNetServiceResolveWithTimeout() appears to fail which shouldn't be happening. It's likely due to your network setup and only matters if you are using Bonjour.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM