objective-c – NSURLConnection线程崩溃

前端之家收集整理的这篇文章主要介绍了objective-c – NSURLConnection线程崩溃前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在我的应用程序中遇到随机崩溃,堆栈跟踪不包含我的任何代码,我正在努力弄清楚导致它的原因.堆栈跟踪始终相同:
  1. #0 0x00007fff903610e9 in __cxa_throw ()
  2. #1 0x00007fff922199c2 in Security::UnixError::throwMe(int) ()
  3. #2 0x00007fff920b068d in Security::safeCopyFile(char const*,unsigned int,char const*,unsigned short) ()
  4. #3 0x00007fff920af765 in Security::MDSSession::updateDataBases() ()
  5. #4 0x00007fff9211318b in Security::MDSSession::DbOpen(char const*,cssm_net_address const*,Security::AccessCredentials const*,void const*,long&) ()
  6. #5 0x00007fff9211300b in mds_DbOpen(long,cssm_access_credentials const*,long*) ()
  7. #6 0x00007fff920aebee in Security::MDSClient::Directory::cdsa() const ()
  8. #7 0x00007fff922013ee in Security::MDSClient::Directory::dlGetFirst(cssm_query const&,cssm_db_record_attribute_data&,cssm_data*,cssm_db_unique_record*&) ()
  9. #8 0x00007fff920ae6db in Security::CssmClient::Table<Security::MDSClient::Common>::startQuery(Security::CssmQuery const&,bool) ()
  10. #9 0x00007fff920ae1e9 in Security::CssmClient::Table<Security::MDSClient::Common>::find(Security::CssmClient::Query const&) ()
  11. #10 0x00007fff920ae140 in Security::CssmClient::Table<Security::MDSClient::Common>::fetch(Security::CssmClient::Query const&,int) ()
  12. #11 0x00007fff920ad71f in MdsComponent::MdsComponent(Security::Guid const&) ()
  13. #12 0x00007fff920ad29b in CssmManager::loadModule(Security::Guid const&,Security::ModuleCallback const&) ()
  14. #13 0x00007fff920ad1a2 in CSSM_ModuleLoad ()
  15. #14 0x00007fff92138db2 in loadModule ()
  16. #15 0x00007fff921093c1 in attachToModules ()
  17. #16 0x00007fff9210931d in attachToAll ()
  18. #17 0x00007fff92109253 in SSLNewContext ()
  19. #18 0x00007fff95016162 in SocketStream::securitySetInfo_NoLock(__CFDictionary const*) ()
  20. #19 0x00007fff950159fd in SocketStream::setProperty(void const*,__CFString const*,void const*) ()
  21. #20 0x00007fff9501552c in virtual thunk to SocketStream::setProperty(void const*,void const*) ()
  22. #21 0x00007fff950160db in ReadStreamCallbacks::_setProperty(__CFReadStream*,void*) ()
  23. #22 0x00007fff8f4ef604 in CFReadStreamSetProperty ()
  24. #23 0x00007fff9501457e in HTTPNetConnection::createStreams(__CFWriteStream**,__CFReadStream**) ()
  25. #24 0x00007fff95014426 in NetConnection::initialize(NetConnection::Options&) ()
  26. #25 0x00007fff95014354 in HTTPNetConnection::initialize(__CFString const*,int,__CFDictionary const*,NetConnection::Options&) ()
  27. #26 0x00007fff950142ab in HTTPNetConnection_NoAuth::initialize(__CFString const*,NetConnection::Options&) ()
  28. #27 0x00007fff950141d4 in CFHTTPConnectionCreate ()
  29. #28 0x00007fff95014089 in HTTPConnectionCacheEntry::findOrCreateEmptyUnauthenticatedNetConnection(HTTPProtocol*,__CFHTTPMessage*,unsigned char*,__CFError**) ()
  30. #29 0x00007fff95012f84 in HTTPConnectionCacheEntry::enqueueRequestForProtocol(HTTPProtocol*,__CFHTTPMessage*) ()
  31. #30 0x00007fff95012901 in HTTPConnectionCache::EnqueueRequestForProtocol(HTTPProtocol*,__CFHTTPMessage*) ()
  32. #31 0x00007fff9500f283 in HTTPProtocol::createStream() ()
  33. #32 0x00007fff9500eb82 in HTTPProtocol::createAndOpenStream() ()
  34. #33 0x00007fff9500cef1 in URLConnectionLoader::loaderScheduleOriginLoadLocked(_CFURLRequest const*) ()
  35. #34 0x00007fff950dec12 in URLConnectionLoader::loaderScheduleOriginLoad(_CFURLRequest const*) ()
  36. #35 0x00007fff950de637 in URLConnectionLoader::LoaderConnectionEventQueue::processAllEventsAndConsumePayload(XConnectionEventInfo<XLoaderEvent,XLoaderEventParams>*,long) ()
  37. #36 0x00007fff9500c959 in URLConnectionLoader::processEvents() ()
  38. #37 0x00007fff950079ee in MultiplexerSource::perform() ()
  39. #38 0x00007fff8f45a6e1 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
  40. #39 0x00007fff8f459f4d in __CFRunLoopDoSources0 ()
  41. #40 0x00007fff8f480d39 in __CFRunLoopRun ()
  42. #41 0x00007fff8f480676 in CFRunLoopRunSpecific ()
  43. #42 0x00007fff8dad5ffb in +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] ()
  44. #43 0x00007fff8daca74e in -[NSThread main] ()
  45. #44 0x00007fff8daca6c6 in __NSThread__main__ ()
  46. #45 0x00007fff8f3b48bf in _pthread_start ()
  47. #46 0x00007fff8f3b7b75 in thread_start ()

我有几个其他线程,但我的所有线程都在等待输入,唯一感兴趣的其他线程似乎是这个:

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

正如我在另一个问题中看到的那样,我提到了这个线程,类似的崩溃与NSURLCache有关.我不直接调用NSURLCache上的任何方法,但我使用的是一个sqlite数据库,在上面的线程中也提到过.

有没有人见过这个或有任何想法在哪里寻求解决这个问题?

解决方法

您很可能启用了一般异常断点.导航到断点窗格并禁用它们(如图所示):

祝好运.

猜你在找的C&C++相关文章