问题
I'm experiencing a weird crash when sending my app into the background, loading a new app, switching the device into sleep mode, waking up the device, closing the new app and then opening my app from the background tasks. A black screen will appear and I cannot exit this black screen with the home button, and in the debugger I am shown this message:
Program received signal: “SIGPIPE”. Data Formatters unavailable (Error calling dlopen for: "/Developer/usr/lib/libXcodeDebuggerSupport.dylib": "dlopen(/Developer/usr/lib/libXcodeDebuggerSupport.dylib, 10): no suitable image found. Did find: /Developer/usr/lib/libXcodeDebuggerSupport.dylib: out of address space /Developer/usr/lib/libXcodeDebuggerSupport.dylib: stat() failed with errno=868226285
How do I fix this?
回答1:
Set SO_NOSIGPIPE
on your socket via setsockopt()
, or ignore all SIGPIPE
signals with:
signal(SIGPIPE, SIG_IGN)
.
来源:https://stackoverflow.com/questions/5714162/sigpipe-crash-when-switching-background-task