2014-09-12 22 views
18

Tôi nhận được các báo cáo sự cố sau. Họ chỉ xuất hiện trên các thiết bị chạy iOS phiên bản 8. Thông báo thông điệp: Báo cáoiOS 8 NSInternalInconsistencyException

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'this request has been neutered - you can't call -sendResponse: twice nor after encoding it' 

sụp đổ:

Date/Time:  2014-08-31T01:39:15Z 
OS Version:  iPhone OS 8.0 (12A4345d) 
Report Version: 104 

Exception Type: SIGABRT 
Exception Codes: #0 at 0x1964cb270 
Crashed Thread: 0 

Application Specific Information: 
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'this request has been neutered - you can't call -sendResponse: twice nor after encoding it' 

Last Exception Backtrace: 
0 CoreFoundation      0x0000000186192084 CFDateGetTimeIntervalSinceDate + 19604 
1 libobjc.A.dylib      0x0000000195d3c0e4 objc_exception_throw + 56 
2 CoreFoundation      0x0000000186191f44 CFDateGetTimeIntervalSinceDate + 19280 
3 Foundation       0x0000000187075e20 _NSSetExceptionRaiser + 340 
4 BaseBoard       0x000000018c1deb90 BSMainScreenOrientation + 4856 
5 libdispatch.dylib     0x000000019638d254 0x19638c000 + 4692 
6 libdispatch.dylib     0x0000000196395d50 dispatch_barrier_sync_f + 1176 
7 BaseBoard       0x000000018c1deae4 BSMainScreenOrientation + 4684 
8 UIKit        0x000000018ac9df88 _UIBackdropViewSettingsColorCancelRed + 28984 
9 libdispatch.dylib     0x000000019638d294 0x19638c000 + 4756 
10 libdispatch.dylib     0x000000019638d254 0x19638c000 + 4692 
11 libdispatch.dylib     0x000000019639103c _dispatch_main_queue_callback_4CF + 952 
12 CoreFoundation      0x00000001861498dc CFRunLoopTimerSetTolerance + 4196 
13 CoreFoundation      0x0000000186147984 _CFRunLoopGet2b + 3316 
14 CoreFoundation      0x0000000186075664 CFRunLoopRunSpecific + 392 
15 GraphicsServices      0x000000018f0a75a4 GSEventRunModal + 164 
16 UIKit        0x000000018a82e164 UIApplicationMain + 1484 
17 Taptalk        0x00000001000bfccc main (main.m:21) 
18 libdyld.dylib      0x00000001963b2a08 _tlv_bootstrap + 232 

tôi không thể tái tạo nó, nhưng nó dường như xảy ra khi khởi động ứng dụng từ nền. Tôi nên bắt đầu tìm kiếm ở đâu?

+0

Có phải '-sendResponse:' được gọi là bất kỳ đâu trong mã của bạn không? – Moxy

+0

Không, có vẻ như là cuộc gọi nội bộ. –

+0

Bạn có thể gỡ lỗi hoặc báo cáo sự cố đã được gửi cho bạn không? – Moxy

Trả lời

25

Lỗi là ở callback sau:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler

Vụ tai nạn xảy ra khi bạn gọi completionHandler hai lần. Điều này xảy ra sau iOS8.

+0

Bạn kích hoạt phương pháp này bằng cách nào? Đây có phải là một phần của giao thức NSNotification không? – Steven

+0

này cần phải có được những điều sau đây: '- (void) ứng dụng: (UIApplication *) ứng dụng didReceiveRemoteNotification: (NSDictionary *) UserInfo fetchCompletionHandler: (void (^) (UIBackgroundFetchResult kết quả)) completionHandler' Vì vậy, đó là một đại biểu UIApplication phương pháp được kích hoạt bởi một thông báo từ xa. –