SIGPIPE crash when switching background task

北城以北 提交于 2019-12-07 09:56:56

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!