2012-02-15 29 views
6

Tôi đang gặp phải sự cố ngẫu nhiên trong ứng dụng của mình, theo dõi ngăn xếp không chứa bất kỳ mã nào của tôi và tôi đang cố gắng tìm ra nguyên nhân gây ra lỗi đó. Stack trace luôn giống nhau:Sụp đổ trên NSURLMết nối kết nối

#0 0x00007fff903610e9 in __cxa_throw() 
#1 0x00007fff922199c2 in Security::UnixError::throwMe(int)() 
#2 0x00007fff920b068d in Security::safeCopyFile(char const*, unsigned int, char const*, unsigned short)() 
#3 0x00007fff920af765 in Security::MDSSession::updateDataBases()() 
#4 0x00007fff9211318b in Security::MDSSession::DbOpen(char const*, cssm_net_address const*, unsigned int, Security::AccessCredentials const*, void const*, long&)() 
#5 0x00007fff9211300b in mds_DbOpen(long, char const*, cssm_net_address const*, unsigned int, cssm_access_credentials const*, void const*, long*)() 
#6 0x00007fff920aebee in Security::MDSClient::Directory::cdsa() const() 
#7 0x00007fff922013ee in Security::MDSClient::Directory::dlGetFirst(cssm_query const&, cssm_db_record_attribute_data&, cssm_data*, cssm_db_unique_record*&)() 
#8 0x00007fff920ae6db in Security::CssmClient::Table<Security::MDSClient::Common>::startQuery(Security::CssmQuery const&, bool)() 
#9 0x00007fff920ae1e9 in Security::CssmClient::Table<Security::MDSClient::Common>::find(Security::CssmClient::Query const&)() 
#10 0x00007fff920ae140 in Security::CssmClient::Table<Security::MDSClient::Common>::fetch(Security::CssmClient::Query const&, int)() 
#11 0x00007fff920ad71f in MdsComponent::MdsComponent(Security::Guid const&)() 
#12 0x00007fff920ad29b in CssmManager::loadModule(Security::Guid const&, unsigned int, Security::ModuleCallback const&)() 
#13 0x00007fff920ad1a2 in CSSM_ModuleLoad() 
#14 0x00007fff92138db2 in loadModule() 
#15 0x00007fff921093c1 in attachToModules() 
#16 0x00007fff9210931d in attachToAll() 
#17 0x00007fff92109253 in SSLNewContext() 
#18 0x00007fff95016162 in SocketStream::securitySetInfo_NoLock(__CFDictionary const*)() 
#19 0x00007fff950159fd in SocketStream::setProperty(void const*, __CFString const*, void const*)() 
#20 0x00007fff9501552c in virtual thunk to SocketStream::setProperty(void const*, __CFString const*, void const*)() 
#21 0x00007fff950160db in ReadStreamCallbacks::_setProperty(__CFReadStream*, __CFString const*, void const*, void*)() 
#22 0x00007fff8f4ef604 in CFReadStreamSetProperty() 
#23 0x00007fff9501457e in HTTPNetConnection::createStreams(__CFWriteStream**, __CFReadStream**)() 
#24 0x00007fff95014426 in NetConnection::initialize(NetConnection::Options&)() 
#25 0x00007fff95014354 in HTTPNetConnection::initialize(__CFString const*, int, unsigned int, __CFDictionary const*, NetConnection::Options&)() 
#26 0x00007fff950142ab in HTTPNetConnection_NoAuth::initialize(__CFString const*, int, unsigned int, __CFDictionary const*, NetConnection::Options&)() 
#27 0x00007fff950141d4 in CFHTTPConnectionCreate() 
#28 0x00007fff95014089 in HTTPConnectionCacheEntry::findOrCreateEmptyUnauthenticatedNetConnection(HTTPProtocol*, __CFHTTPMessage*, unsigned char*, __CFError**)() 
#29 0x00007fff95012f84 in HTTPConnectionCacheEntry::enqueueRequestForProtocol(HTTPProtocol*, __CFHTTPMessage*)() 
#30 0x00007fff95012901 in HTTPConnectionCache::EnqueueRequestForProtocol(HTTPProtocol*, __CFHTTPMessage*)() 
#31 0x00007fff9500f283 in HTTPProtocol::createStream()() 
#32 0x00007fff9500eb82 in HTTPProtocol::createAndOpenStream()() 
#33 0x00007fff9500cef1 in URLConnectionLoader::loaderScheduleOriginLoadLocked(_CFURLRequest const*)() 
#34 0x00007fff950dec12 in URLConnectionLoader::loaderScheduleOriginLoad(_CFURLRequest const*)() 
#35 0x00007fff950de637 in URLConnectionLoader::LoaderConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XLoaderEvent, XLoaderEventParams>*, long)() 
#36 0x00007fff9500c959 in URLConnectionLoader::processEvents()() 
#37 0x00007fff950079ee in MultiplexerSource::perform()() 
#38 0x00007fff8f45a6e1 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__() 
#39 0x00007fff8f459f4d in __CFRunLoopDoSources0() 
#40 0x00007fff8f480d39 in __CFRunLoopRun() 
#41 0x00007fff8f480676 in CFRunLoopRunSpecific() 
#42 0x00007fff8dad5ffb in +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]() 
#43 0x00007fff8daca74e in -[NSThread main]() 
#44 0x00007fff8daca6c6 in __NSThread__main__() 
#45 0x00007fff8f3b48bf in _pthread_start() 
#46 0x00007fff8f3b7b75 in thread_start() 

Tôi có một vài chủ đề khác, nhưng tất cả các chủ đề của tôi đang ngủ chờ đợi đầu vào, những sợi chỉ đáng quan tâm khác có vẻ là cái này:

#0 0x00007fff90342a8e in pread() 
#1 0x00007fff8ba90ce5 in unixRead() 
#2 0x00007fff8ba8cc33 in sqlite3BtreeOpen() 
#3 0x00007fff8ba88fc6 in openDatabase() 
#4 0x00007fff95002c7d in __CFURLCache::OpenDatabase()() 
#5 0x00007fff95002800 in ProcessCacheTasks(__CFURLCache*, bool)() 
#6 0x00007fff95002232 in _CFURLCacheTimerCallback(void*)() 
#7 0x00007fff94e238ba in _dispatch_call_block_and_release() 
#8 0x00007fff94e2510a in _dispatch_queue_drain() 
#9 0x00007fff94e24f66 in _dispatch_queue_invoke() 
#10 0x00007fff94e24760 in _dispatch_worker_thread2() 
#11 0x00007fff8f3b63da in _pthread_wqthread() 
#12 0x00007fff8f3b7b85 in start_wqthread() 

Tôi đề cập đến thread đó như tôi đã thấy trong một câu hỏi khác ở đây rằng một vụ tai nạn tương tự có liên quan đến NSURLCache. Tôi không trực tiếp gọi bất kỳ phương pháp trên NSURLCache nhưng tôi đang sử dụng một cơ sở dữ liệu sqlite cũng được đề cập trong các chủ đề trên.

Có ai nhìn thấy điều này trước hoặc có bất kỳ ý tưởng nào để tìm cách giải quyết vấn đề này không?

+0

Thử gỡ lỗi xung quanh vùng NSURLCache. – iDifferent

+0

Tôi có lỗi tương tự - Bạn có tìm thấy giải pháp nào về vấn đề này không? – vivianaranha

+4

Đây thực sự là một sự cố hay nó chỉ kích hoạt một điểm ngắt ngoại lệ? Trong trường hợp của tôi ngoại lệ được ném cho một lỗi xác thực nhưng cuối cùng bị bắt. – nschum

Trả lời

0

Có một cơ hội tốt để bạn có các điểm ngắt ngoại lệ chung được bật. Điều hướng đến cửa sổ breakpoint của bạn và vô hiệu hóa chúng (hình ở đây): enter image description here

Chúc may mắn.

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