使用iOS 6.1我的应用程序在启动后直接崩溃,当它尝试发出多个HTTP请求时,它在任何操作系统上工作正常< 6.1. 我正在经历
每次启动我的应用程序时,EXC_BAD_ACCESS在从队列调用的strlen函数中崩溃:com.apple.CFURLCACHE_work_queue,第一次除外.
我可以通过在应用启动后直接清除NSURLCache来解决此问题:
[[NSURLCache sharedURLCache] removeAllCachedResponses];
有没有其他人遇到这些崩溃?应用程序代码中是否存在导致这些崩溃的问题?或者这应该是提交给苹果的错误?
最佳答案 使用新安装的应用程序从iOS 6.1开始遇到类似的崩溃.不同之处在于在表视图中点击文本单元格时发生崩溃.目前没有网络请求.
这是bt:
thread #4: tid = 0x2903, 0x3ae7ad74 libsystem_c.dylib`strlen + 28, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x3ae7ad74 libsystem_c.dylib`strlen + 28
frame #1: 0x3ac6be24 libsqlite3.dylib`___lldb_unnamed_function282$$libsqlite3.dylib + 1232
frame #2: 0x3ac74a5e libsqlite3.dylib`sqlite3_file_control + 174
frame #3: 0x328493fe CFNetwork`__CFURLCache::RecreateEmptyPersistentStoreOnDiskAndOpen_NoLock() + 30
frame #4: 0x32849000 CFNetwork`__CFURLCache::RecreateEmptyPersistentStoreOnDiskAndOpen() + 44
frame #5: 0x327f9488 CFNetwork`__CFURLCache::OpenDatabase() + 192
frame #6: 0x32846a72 CFNetwork`__CFURLCache::ProcessCacheTasks0(bool) + 358
frame #7: 0x32846900 CFNetwork`__CFURLCache::ProcessCacheTasks(bool) + 36
frame #8: 0x3284681e CFNetwork`__CFURLCache::_CFURLCacheTimerCallback0() + 358
frame #9: 0x328466ac CFNetwork`__CFURLCache::_CFURLCacheTimerCallback(void*) + 32
frame #10: 0x328490fc CFNetwork`__SignalWorkerTaskToPerformWork_block_invoke_0 + 12
frame #11: 0x3ae4611e libdispatch.dylib`_dispatch_call_block_and_release + 10
frame #12: 0x3ae49ece libdispatch.dylib`_dispatch_queue_drain$VARIANT$mp + 142
frame #13: 0x3ae49dc0 libdispatch.dylib`_dispatch_queue_invoke$VARIANT$mp + 40
frame #14: 0x3ae4a91c libdispatch.dylib`_dispatch_root_queue_drain + 184
frame #15: 0x3ae4aac0 libdispatch.dylib`_dispatch_worker_thread2 + 84
frame #16: 0x3ae7aa10 libsystem_c.dylib`_pthread_wqthread + 360
frame #17: 0x3ae7a8a4 libsystem_c.dylib`start_wqthread + 8
报告称这是一个苹果的TSI,它被审查,他们要求我将此记录为一个错误,仍然需要这样做.
有趣的是,您发现的解决方案也帮助了我,在启动时清除缓存解决了这个问题.