2011-12-22 30 views
7

Tôi đang chạy ứng dụng của mình đang chạy tốt cho đến khi tôi tiếp tục từ nền hoặc với dịch vụ vị trí, ứng dụng sẽ gặp sự cố.cách gỡ lỗi EXC_CRASH (SIGTRAP)

nhật ký sự cố hiển thị Loại ngoại lệ: EXC_CRASH (SIGTRAP)

Mọi người đều biết cách gỡ lỗi không?

Exception Type: EXC_CRASH (SIGTRAP) 
Exception Codes: 0x00000000, 0x00000000 
Crashed Thread: 0 

Thread 0 name: Dispatch queue: com.apple.main-thread 
Thread 0 Crashed: 
0 libsystem_kernel.dylib   0x36398848 __kill + 8 
1 FrogFinder      0x000b5034 0x69000 + 311348 
2 CoreFoundation     0x3447e980 __handleUncaughtException + 68 
3 libobjc.A.dylib     0x346ce2ca _objc_terminate + 122 
4 libc++abi.dylib     0x338a33be _ZL19safe_handler_callerPFvvE + 70 
5 libc++abi.dylib     0x338a344a std::terminate() + 14 
6 libc++abi.dylib     0x338a481e __cxa_rethrow + 82 
7 libobjc.A.dylib     0x346ce22e objc_exception_rethrow + 6 
8 CoreFoundation     0x343d453e CFRunLoopRunSpecific + 398 
9 CoreFoundation     0x343d439e CFRunLoopRunInMode + 98 
10 GraphicsServices    0x30c58fc6 GSEventRunModal + 150 
11 UIKit       0x3785573c UIApplicationMain + 1084 
12 FrogFinder      0x0006a7e6 0x69000 + 6118 
13 FrogFinder      0x0006a7a4 0x69000 + 6052 

Thread 1 name: Dispatch queue: com.apple.libdispatch-manager 
Thread 1: 
0 libsystem_kernel.dylib   0x363893b4 kevent + 24 
1 libdispatch.dylib    0x370b3e78 _dispatch_mgr_invoke + 708 
2 libdispatch.dylib    0x370b3b96 _dispatch_mgr_thread + 30 

Thread 2 name: WebThread 
Thread 2: 
0 libsystem_kernel.dylib   0x36389010 mach_msg_trap + 20 
1 libsystem_kernel.dylib   0x36389206 mach_msg + 50 
2 CoreFoundation     0x3445241c __CFRunLoopServiceMachPort + 120 
3 CoreFoundation     0x34451154 __CFRunLoopRun + 876 
4 CoreFoundation     0x343d44d6 CFRunLoopRunSpecific + 294 
5 CoreFoundation     0x343d439e CFRunLoopRunInMode + 98 
6 WebCore       0x368a8128 _ZL12RunWebThreadPv + 396 
7 libsystem_c.dylib    0x33224c16 _pthread_start + 314 
8 libsystem_c.dylib    0x33224ad0 thread_start + 0 

Thread 3 name: com.apple.NSURLConnectionLoader 
Thread 3: 
0 libsystem_kernel.dylib   0x36389010 mach_msg_trap + 20 
1 libsystem_kernel.dylib   0x36389206 mach_msg + 50 
2 CoreFoundation     0x3445241c __CFRunLoopServiceMachPort + 120 
3 CoreFoundation     0x34451154 __CFRunLoopRun + 876 
4 CoreFoundation     0x343d44d6 CFRunLoopRunSpecific + 294 
5 CoreFoundation     0x343d439e CFRunLoopRunInMode + 98 
6 Foundation      0x35dd4bc2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302 
7 Foundation      0x35dd4a8a -[NSThread main] + 66 
8 Foundation      0x35e6859a __NSThread__main__ + 1042 
9 libsystem_c.dylib    0x33224c16 _pthread_start + 314 
10 libsystem_c.dylib    0x33224ad0 thread_start + 0 

Thread 4: 
0 libsystem_kernel.dylib   0x36389010 mach_msg_trap + 20 
1 libsystem_kernel.dylib   0x36389206 mach_msg + 50 
2 CoreFoundation     0x3445241c __CFRunLoopServiceMachPort + 120 
3 CoreFoundation     0x34451154 __CFRunLoopRun + 876 
4 CoreFoundation     0x343d44d6 CFRunLoopRunSpecific + 294 
5 CoreFoundation     0x343d439e CFRunLoopRunInMode + 98 
6 Foundation      0x35dc8b7e -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 250 
7 Foundation      0x35de252c -[NSRunLoop(NSRunLoop) run] + 72 
8 FrogFinder      0x000c8da6 0x69000 + 392614 
9 Foundation      0x35dd4a8a -[NSThread main] + 66 
10 Foundation      0x35e6859a __NSThread__main__ + 1042 
11 libsystem_c.dylib    0x33224c16 _pthread_start + 314 
12 libsystem_c.dylib    0x33224ad0 thread_start + 0 

Thread 5 name: NetworkIO 
Thread 5: 
0 libsystem_kernel.dylib   0x36389010 mach_msg_trap + 20 
1 libsystem_kernel.dylib   0x36389206 mach_msg + 50 
2 CoreFoundation     0x3445241c __CFRunLoopServiceMachPort + 120 
3 CoreFoundation     0x34451154 __CFRunLoopRun + 876 
4 CoreFoundation     0x343d44d6 CFRunLoopRunSpecific + 294 
5 CoreFoundation     0x343d439e CFRunLoopRunInMode + 98 
6 MapKit       0x38030412 0x38022000 + 58386 
7 Foundation      0x35dd4a8a -[NSThread main] + 66 
8 Foundation      0x35e6859a __NSThread__main__ + 1042 
9 libsystem_c.dylib    0x33224c16 _pthread_start + 314 
10 libsystem_c.dylib    0x33224ad0 thread_start + 0 
+0

Tôi nghĩ bạn cần biểu thị dòng này: 1 FrogFinder 0x000b5034 0x69000 + 311348 để lấy tên của phương thức bị lỗi. Bạn có thể tìm thấy thông tin về biểu tượng ở đây: http://stackoverflow.com/questions/1460892/symbolicating-iphone-app-crash-reports – Johnmph

+0

bạn có bao giờ tìm hiểu nguyên nhân gây ra sự cố này không? – jasongregori

+1

Bạn đã giải quyết được sự cố này chưa? Nếu vậy, tôi rất thích nghe những gì gây ra vấn đề. Đây là một lỗi không bình thường. – SAHM

Trả lời

23

Bạn cũng có thể bật Điểm ngắt ngoại lệ. Trong XCode 4, nhấp vào dự án của bạn và chọn tab breakpoints. Ở dưới cùng của tab đó là | + | - | thanh tim kiêm. Chọn mục + và "Add Exeception Breakpoint". Bạn có thể để nó ở Tất cả hoặc chọn Mục tiêu-C. Bằng cách này, bạn sẽ đột nhập vào trình gỡ lỗi và có thể thấy điều gì đã gây ra sự lừa đảo.

9

Với ngoại lệ chưa xử lý Xcode 4.2 và iOS 5 dường như không còn hiển thị trong bảng điều khiển nữa. Tôi sẽ khuyên bạn nên thêm sau đây hoặc sửa đổi xử lý ngoại lệ uncaught hiện tại của bạn để đổ các callstack trường hợp ngoại lệ cho bạn.

#ifdef DEBUG 
void eHandler(NSException *); 

void eHandler(NSException *exception) { 
    NSLog(@"%@", exception); 
    NSLog(@"%@", [exception callStackSymbols]); 
} 
#endif 

int main(int argc, char *argv[]) { 

#ifdef DEBUG 
    NSSetUncaughtExceptionHandler(&eHandler); 
#endif 

...rest of your main function here... 

} 
+0

Điều này thật tuyệt! ;) –

Các vấn đề liên quan