2014-09-26 1 views
0

iOS 앱이 배포되었을 때만 (Ad Hoc) 충돌합니다. 앱을 로컬에서 테스트했는데 같은 문제가없는 것 같습니다. 그것은 HTTP Post 요청을 보내는 것과 관련이 있습니다. iOS 앱이 NSHRLConnection을 사용하여 Ad Hoc에서만 오류가 발생합니다.

는 충돌 로그입니다 :

Exception Type: EXC_BAD_ACCESS (SIGSEGV) 
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000c18bbec8 
Triggered by Thread: 0 

그리고 이것은 코드입니다 :

NSMutableURLRequest * request = [NSMutableURLRequest new]; 
    [request setURL:addURL]; 
    [request setHTTPMethod:@"POST"]; 

    // setup the request headers 
    [request setValue:@"application/json" forHTTPHeaderField:@"Accept"]; 
    [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; 
    [request setHTTPBody:holder]; 

NSURLResponse * response = nil; 
    NSData * receivedData = nil; 

    receivedData = [NSMutableData data]; 

    // this next line throws an error 
    receivedData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; 

의 배포 버전을 디버깅하는 노력을위한 응용 프로그램이 충돌하는 이유의 어떤 아이디어 (또는 팁 ?

Incident Identifier: 65D7C33B-D082-4E78-9F73-4489D528AC8B 
CrashReporter Key: 8722e51d4300c003d1ac939808b1a9c67f112194 
Hardware Model:  iPhone6,1 
Process:    [] [200] 
Path:    /private/var/mobile/Containers/Bundle/Application/5EE4D0E6-303F-4EF3-8C81-489A74425679/[].app/[] 
Identifier:   edu.self.[] 
Version:    1.1 (1.1) 
Code Type:   ARM-64 (Native) 
Parent Process:  launchd [1] 

Date/Time:   2014-09-26 19:57:39.918 -0400 
Launch Time:   2014-09-26 19:57:31.383 -0400 
OS Version:   iOS 8.0.2 (12A405) 
Report Version:  105 

Exception Type: EXC_BAD_ACCESS (SIGSEGV) 
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000001d111bec8 
Triggered by Thread: 0 

Thread 0 name: Dispatch queue: com.apple.main-thread 
Thread 0 Crashed: 
0 libsystem_kernel.dylib   0x000000019591a964 __kill + 8 
1 []        0x000000010010c404 CLSSignalHandler + 224 
2 libsystem_platform.dylib  0x00000001959b0958 _sigtramp + 64 
3 []        0x00000001000ca954 -[EditProjectViewController addStep] (EditProjectViewController.m:231) 
4 []        0x00000001000cb2a4 -[EditProjectViewController prepareForSegue:sender:] (EditProjectViewController.m:369) 
5 UIKit       0x0000000189902fc4 -[UIStoryboardSegueTemplate _perform:] + 188 
6 UIKit       0x000000018936ce64 -[UIApplication sendAction:to:from:forEvent:] + 92 
7 UIKit       0x000000018936ce64 -[UIApplication sendAction:to:from:forEvent:] + 92 
8 UIKit       0x0000000189355fbc -[UIControl _sendActionsForEvents:withEvent:] + 608 
9 UIKit       0x000000018936c800 -[UIControl touchesEnded:withEvent:] + 588 
10 UIKit       0x000000018932c294 _UIGestureRecognizerUpdate + 8532 
11 CoreFoundation     0x0000000184b6e384 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 28 
12 CoreFoundation     0x0000000184b6b310 __CFRunLoopDoObservers + 356 
13 CoreFoundation     0x0000000184b6b6f0 __CFRunLoopRun + 832 
14 CoreFoundation     0x0000000184a99660 CFRunLoopRunSpecific + 392 
15 GraphicsServices    0x000000018dbdb5a0 GSEventRunModal + 164 
16 UIKit       0x000000018939e4f4 UIApplicationMain + 1484 
17 []        0x00000001000cd2c8 main (main.m:17) 
18 libdyld.dylib     0x0000000195802a04 start + 0 

Thread 1 name: Dispatch queue: com.apple.libdispatch-manager 
Thread 1: 
0 libsystem_kernel.dylib   0x0000000195900c94 kevent64 + 8 
1 libdispatch.dylib    0x00000001957e897c _dispatch_mgr_invoke + 272 
2 libdispatch.dylib    0x00000001957db4a0 _dispatch_mgr_thread + 48 

Thread 2: 
0 libsystem_kernel.dylib   0x000000019591bc78 __workq_kernreturn + 8 
1 libsystem_pthread.dylib   0x00000001959b5390 _pthread_wqthread + 988 
2 libsystem_pthread.dylib   0x00000001959b4fa4 start_wqthread + 0 

Thread 3: 
0 libsystem_kernel.dylib   0x000000019591bc78 __workq_kernreturn + 8 
1 libsystem_pthread.dylib   0x00000001959b5390 _pthread_wqthread + 988 
2 libsystem_pthread.dylib   0x00000001959b4fa4 start_wqthread + 0 

Thread 4: 
0 libsystem_kernel.dylib   0x000000019591bc78 __workq_kernreturn + 8 
1 libsystem_pthread.dylib   0x00000001959b5390 _pthread_wqthread + 988 
2 libsystem_pthread.dylib   0x00000001959b4fa4 start_wqthread + 0 

Thread 5 name: com.crashlytics.MachExceptionServer 
Thread 5: 
0 libsystem_kernel.dylib   0x0000000195900e7c mach_msg_trap + 8 
1 libsystem_kernel.dylib   0x0000000195900cf4 mach_msg + 68 
2 []        0x00000001000fca00 CLSMachExceptionServer + 128 
3 libsystem_pthread.dylib   0x00000001959b7e7c _pthread_body + 160 
4 libsystem_pthread.dylib   0x00000001959b7dd8 _pthread_start + 156 
5 libsystem_pthread.dylib   0x00000001959b4fac thread_start + 0 

Thread 6: 
0 libsystem_kernel.dylib   0x000000019591bc78 __workq_kernreturn + 8 
1 libsystem_pthread.dylib   0x00000001959b5390 _pthread_wqthread + 988 
2 libsystem_pthread.dylib   0x00000001959b4fa4 start_wqthread + 0 

Thread 7: 
0 libsystem_kernel.dylib   0x000000019591bc78 __workq_kernreturn + 8 
1 libsystem_pthread.dylib   0x00000001959b5390 _pthread_wqthread + 988 
2 libsystem_pthread.dylib   0x00000001959b4fa4 start_wqthread + 0 

Thread 8 name: com.apple.NSURLConnectionLoader 
Thread 8: 
0 libsystem_kernel.dylib   0x0000000195900e7c mach_msg_trap + 8 
1 libsystem_kernel.dylib   0x0000000195900cf4 mach_msg + 68 
2 CoreFoundation     0x0000000184b6d804 __CFRunLoopServiceMachPort + 196 
3 CoreFoundation     0x0000000184b6b758 __CFRunLoopRun + 936 
4 CoreFoundation     0x0000000184a99660 CFRunLoopRunSpecific + 392 
5 CFNetwork      0x000000018459a054 +[NSURLConnection(Loader) _resourceLoadLoop:] + 436 
6 Foundation      0x0000000185a82608 __NSThread__main__ + 1068 
7 libsystem_pthread.dylib   0x00000001959b7e7c _pthread_body + 160 
8 libsystem_pthread.dylib   0x00000001959b7dd8 _pthread_start + 156 
9 libsystem_pthread.dylib   0x00000001959b4fac thread_start + 0 

Thread 9 name: com.apple.CFSocket.private 
Thread 9: 
0 libsystem_kernel.dylib   0x000000019591b498 __select + 8 
1 CoreFoundation     0x0000000184b731fc __CFSocketManager + 656 
2 libsystem_pthread.dylib   0x00000001959b7e7c _pthread_body + 160 
3 libsystem_pthread.dylib   0x00000001959b7dd8 _pthread_start + 156 
4 libsystem_pthread.dylib   0x00000001959b4fac thread_start + 0 

Thread 0 crashed with ARM Thread State (64-bit): 
    x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000001 x3: 0x00000001958315e4 
    x4: 0x000000016fd49928 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000a50 
    x8: 0x0000000199477360 x9: 0x000000019946b050 x10: 0x0000000000000000 x11: 0x000000000000000f 
    x12: 0x0000000000000001 x13: 0x000000000003dbd4 x14: 0x0000000000000015 x15: 0x0000000000000000 
    x16: 0x0000000000000025 x17: 0x0000000000000000 x18: 0x0000000000000000 x19: 0x000000000000000b 
    x20: 0x0000000000000003 x21: 0x000000016fd49928 x22: 0x000000016fd498c0 x23: 0x00000001001766f0 
    x24: 0x000000017805b1e0 x25: 0x0000000178053ad0 x26: 0x000000017804f5d0 x27: 0x0000000178053ad0 
    x28: 0x000000017822cc00 fp: 0x000000016fd49890 lr: 0x000000010010c408 
    sp: 0x000000016fd49840 pc: 0x000000019591a964 cpsr: 0x00000000 
: 응용 프로그램) 여기

전체 충돌 보고서입니다

+0

완전한 상징적 인 충돌 보고서를 제공해주십시오. 이미 노트로서 : 메인 쓰레드에서'sendSynchronousRequest'를 절대 사용하지 마십시오! 절대로. – Kerni

+0

대신 무엇을 사용 하시겠습니까? – scientiffic

+1

대신 sendAsynchronousRequest를 사용하십시오. 릴리스 구성에서 빌드를 시도하고 발생하는지 확인하십시오. – KDaker

답변

1

릴리스 빌드에서 UI가 약 2 초 이상 처리 할 수없는 입력을 받으면 응용 프로그램이 종료됩니다. 나는이 경우에 일어난 일이라고 생각합니다.