0

我使用 WSDL2Objc 生成的代码成功地从我的应用程序调用 WS。我将我的应用程序发送给同事进行测试,他们向我报告说应用程序在尝试连接到 WS 时崩溃。事实是 iPad 落后于 HTTP 身份验证代理。

据我了解,身份验证代理将连接重定向到显示类似“请提供凭据”的消息的 HTTP 页面

我必须避免崩溃并简单地显示错误,但我无法理解崩溃发生的位置。我已经标记了崩溃日志,而崩溃的线程就是这个粘贴的。

任何帮助表示赞赏。

Thread 3 Crashed:
0   CoreFoundation                  0x3592d75c CFHash + 124
1   CoreFoundation                  0x359d89f4 __CFBasicHashStandardHashKey + 8
2   CoreFoundation                  0x359da614 ___CFBasicHashFindBucket_Linear_NoCollision + 40
3   CoreFoundation                  0x359dc680 __CFBasicHashAddValue + 684
4   CoreFoundation                  0x35932f98 CFDictionarySetValue + 68
5   CFNetwork                       0x37516684 URLCredentialStorage::_SetCredentialForProtectionSpace(__CFDictionary*, _CFURLCredential const*, _CFURLProtectionSpace*) + 80
6   CFNetwork                       0x37516f4c URLCredentialStorage::setDefaultCredentialForProtectionSpace(_CFURLCredential const*, _CFURLProtectionSpace*) + 340
7   CFNetwork                       0x374e0e78 CFURLCredentialStorageSetDefaultCredentialForProtectionSpace + 20
8   CFNetwork                       0x3750cbe0 HTTPProtocol::RemoveCredentialPasswordForProtectionSpace(_CFURLCredential const*, _CFURLProtectionSpace*, unsigned char) + 60
9   CFNetwork                       0x3750e49c HTTPProtocol::_CFHTTPProtHasCredentialsForChallenge(__CFHTTPMessage*) + 832
10  CFNetwork                       0x3750f85a HTTPProtocol::attemptAuthentication(__CFHTTPMessage*) + 170
11  CFNetwork                       0x3750f9a4 HTTPProtocol::performHeaderRead() + 280
12  CFNetwork                       0x3750fee6 HTTPProtocol::httpReadStreamEvent(unsigned long) + 82
13  CFNetwork                       0x37510024 HTTPProtocol::_httpReadStreamCB(__CFReadStream*, unsigned long, void*) + 4
14  CoreFoundation                  0x35946a1a _signalEventSync + 70
15  CoreFoundation                  0x35947626 _cfstream_shared_signalEventSync + 198
16  CoreFoundation                  0x3599ea72 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 6
17  CoreFoundation                  0x359a0758 __CFRunLoopDoSources0 + 376
18  CoreFoundation                  0x359a14e4 __CFRunLoopRun + 224
19  CoreFoundation                  0x35931ebc CFRunLoopRunSpecific + 224
20  CoreFoundation                  0x35931dc4 CFRunLoopRunInMode + 52
21  Foundation                      0x36f747f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206
22  Foundation                      0x36f67382 -[NSThread main] + 38
23  Foundation                      0x36fd95c6 __NSThread__main__ + 966
24  libsystem_c.dylib               0x33af730a _pthread_start + 242
25  libsystem_c.dylib               0x33af8bb4 thread_start + 0
4

1 回答 1

0

HTTP 会话的管理中有一个细微的错误。我喜欢这个博客中的提示 EXC_BREAKPOINT 奇怪的错误 本质上,问题出在 NSURLConnection 的 didReceiveAuthenticationChallenge 中。由于某些原因,并且仅出于某种服务 didReceiveAuthenticationChallenge 将 NULL 凭据传递给连接,因此博主建议我尝试保留这些凭据字符串并且 EXC_BREAKPOINT 消失了。

于 2011-10-17T13:04:42.143 回答