SIGPIPE exception in iOS Project With BUMP API Integrated
Asked Answered
R

1

7

I am experiencing a SIGPIPE error in my Xcode Project. This error has been started showing since one week before. If I commented this method call : [self configureBump]; everything works fine. I had integrated BUMP API in my project. This API is working till one week before without any problems. I am not sure about the cause of this error. Could anyone please help me to resolve this error? Some of My friends are also reported this error.

Xcode Version : 4.5 iOS Version : iOS 6.0/iOS 5.0

Please see the below Stack Trace :

* thread #1: tid = 0x1c03, 0x95a887d2 libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGPIPE
    frame #0: 0x95a887d2 libsystem_kernel.dylib`mach_msg_trap + 10
    frame #1: 0x95a87cb0 libsystem_kernel.dylib`mach_msg + 68
    frame #2: 0x029ef13a CoreFoundation`__CFRunLoopServiceMachPort + 186
    frame #3: 0x02952580 CoreFoundation`__CFRunLoopRun + 1312
    frame #4: 0x02951db4 CoreFoundation`CFRunLoopRunSpecific + 212
    frame #5: 0x02951ccb CoreFoundation`CFRunLoopRunInMode + 123
    frame #6: 0x03093879 GraphicsServices`GSEventRunModal + 207
    frame #7: 0x0309393e GraphicsServices`GSEventRun + 114
    frame #8: 0x017a0a9b UIKit`UIApplicationMain + 1175
    frame #9: 0x00002dd7 iCard`main + 199 at main.m:17
    frame #10: 0x00002185 iCard`start + 53
Rome answered 20/12, 2012 at 5:29 Comment(2)
Another buggy API... Now see this: the Dropbox developers don't have a clue about variadic functions and corrupt your stack, is that any better?Northampton
[self configureBump] looks like it came straight from their sample app. it should be possible to dig a bit deeper by setting breakpoints in Xcode debugger, or by setting NSLog calls in configureBump method itself to determine with more precision exactly which of the calls is causing a SIGPIPE .Incline
S
9

There's a possibility that SIGPIPE being thrown on socket timeout or no/lost connection inside that lib. There might be some server failure on their side or something.

You can get around by ignoring SIGPIPE with:

signal(SIGPIPE, SIG_IGN); 

or

signal(SIGPIPE, SO_NOSIGPIPE);

Check this link for details.

On the other hand, you can debug further by setting your handler function with

signal(SIGPIPE, yourHandlerFunc);

and checking state of sockets/ivars/etc in it.

Stearoptene answered 8/1, 2013 at 14:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.