I am keep seeing such errors but the xcode never shows the line that the error actually happened on, how to set the xcode to show the fault line directly? Till now it just point to the main function.
2012-06-27 21:46:33.513 Chapeng[838:f803] -[SendGiftViewController giftButtonClicked]: unrecognized selector sent to instance 0x6e392a0
The backtrace:
(lldb) bt
* thread #1: tid = 0x1f03, 0x92f359c6 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
frame #0: 0x92f359c6 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x916e6f78 libsystem_c.dylib`pthread_kill + 106
frame #2: 0x916d7bdd libsystem_c.dylib`abort + 167
frame #3: 0x01e38e78 libc++abi.dylib`_Unwind_DeleteException
frame #4: 0x01e3689e libc++abi.dylib`_ZL17default_terminatev + 34
frame #5: 0x01c94f17 libobjc.A.dylib`_objc_terminate + 94
frame #6: 0x01e368de libc++abi.dylib`_ZL19safe_handler_callerPFvvE + 13
frame #7: 0x01e36946 libc++abi.dylib`std::terminate() + 23
frame #8: 0x01e37b3e libc++abi.dylib`__cxa_rethrow + 83
frame #9: 0x01c94e15 libobjc.A.dylib`objc_exception_rethrow + 47
frame #10: 0x01612de0 CoreFoundation`CFRunLoopRunSpecific + 304
frame #11: 0x01612c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #12: 0x0222b7d8 GraphicsServices`GSEventRunModal + 190
frame #13: 0x0222b88a GraphicsServices`GSEventRun + 103
frame #14: 0x0061b626 UIKit`UIApplicationMain + 1163
frame #15: 0x00001ec2 Chapeng`main + 130 at main.m:16
(lldb)
Add a symbolic breakpoint on
objc-exception-throw. A tutorial on this is available here. This should make GDB / LLDB stop execution when an unrecognized selector is sent.EDIT: after reading your backtrace, it appears you have an invalid IB connection. Check all of your buttons on your view controller, and make sure they are linked to a proper selector.