Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Objective-C iPhone App EXC_BREAKPOINT (SIGTRAP)

I recently released an application about a month ago, it was thoroughly tested by myself, my partner, and beta testers. Recently a user contacted me about the app not even being able to open (crashes after start up screen), they have the correct OS and they tried reinstalling.

I asked for the crash log and they sent me it...

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
Crashed Thread:  0

Thread 0 Crashed:
0   dyld                           0x2fe01060 0x2fe00000 + 4192
1   dyld                           0x2fe088d4 0x2fe00000 + 35028
2   dyld                           0x2fe0196c 0x2fe00000 + 6508
3   dyld                           0x2fe01048 0x2fe00000 + 4168

Thread 0 crashed with ARM Thread State:
    r0: 0x2fe23ca0    r1: 0x00000000      r2: 0x2fe23ca0      r3: 0x00000000
    r4: 0x2ffff4e0    r5: 0x2ffff4bc      r6: 0x2fe005c0      r7: 0x2ffffb00
    r8: 0x00000004    r9: 0x2fe57cf0     r10: 0x2fe236c8     r11: 0x00000009
    ip: 0x0000018d    sp: 0x2ffff5b8      lr: 0x2fe088dc      pc: 0x2fe01060
  cpsr: 0x00000010

Binary Images:
0x2fe00000 - 0x2fe22fff  dyld ??? (???) <f6a50d5f57a676b54276d0ecef46d5f0> /usr/lib/dyld

I can't seem to find a problem within my app, what type of problems cause EXC_BREAKPOINT (SIGTRAP)? I'm assuming the error is within my AppDelegate since it crashes right after the start up screen.

like image 659
avizzini Avatar asked Mar 03 '10 04:03

avizzini


2 Answers

I've gotten this error too and fixed it. This person is running OS3 most likely and you are using a code block from OS4 you need to set a weak link on the library so that it can properly load. in your build settings for LLVM -weak_library /usr/lib/libSystem.B.dylib

also discussed here iOS 4 app crashes at startup on iOS 3.1.3: Symbol not found: __NSConcreteStackBlock

like image 149
anurodhp Avatar answered Sep 23 '22 12:09

anurodhp


This is a pretty strange stack trace. It's crashing in dyld (the dynamic library loader). That suggests that it's having trouble loading a dynamic library or Framework, which means it's in the loading of system code (since you can't have a 3rdparty dynamic library on a standard iphone). Notice how in the Binary Images section, your code doesn't even seem to be loaded yet (or was the rest of the dump truncated)? Do you do any manual loading of dynamic libraries (dlopen() or the like)? Even if you were, you'd expect main() to be on the stack if your program had actually loaded....

When you say they've tried reinstalling, I assume you mean your app? Does that mean they deleted your app and then reinstalled it, or something else? The most likely cause that comes to mind is corruption of the bundle. But you'd think that deleting and reinstalling would fix that up. More aggressive would be delete, reboot, then reinstall.

My next question would be whether this is a jailbroken iPhone. I'd ask the user to reboot the iPhone if they haven't already. I'd even be tempted to ask them to do a restore of the OS, but that's always an awkward thing to ask a customer to do.

like image 38
Rob Napier Avatar answered Sep 24 '22 12:09

Rob Napier