调试时{x 44}崩溃

时间:2015-11-02 10:45:41

标签: ios xcode

当我尝试使用iPhone模拟器(5s,iOS 8.4)在Xcode 7中调试我的应用程序时,我经常会崩溃:

Process:               Xcode [6913]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               7.1 (9079)
Build Info:            IDEFrameworks-9079000000000000~8
App Item ID:           497799835
App External ID:       813804225
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [6913]
User ID:               501

Date/Time:             2015-11-02 13:37:44.248 +0300
OS Version:            Mac OS X 10.10.5 (14F1021)
Report Version:        11
Anonymous UUID:        CB3D1F12-E033-1160-2F9F-69DC0A89468E

Sleep/Wake UUID:       DA9F3D65-3E86-4A1C-9E41-2E921CDFD798

Time Awake Since Boot: 290000 seconds
Time Since Wake:       1500 seconds

Crashed Thread:        26  <DBGLLDBSessionThread (pid=42149)>  Dispatch queue: DVTInvalidationPreventionQueue

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
--> 
    __TEXT                 000000010798f000-0000000107993000 [   16K] r-x/rwx SM=COW  /Applications/Xcode.app/Contents/MacOS/Xcode

Application Specific Information:
ProductBuildVersion: 7B91b


Thread 26 Crashed:: <DBGLLDBSessionThread (pid=42149)>  Dispatch queue: DVTInvalidationPreventionQueue
0   com.apple.LLDB.framework        0x0000000113efd3cb swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>) + 443
1   com.apple.LLDB.framework        0x0000000113f1116b swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc) + 1739
2   com.apple.LLDB.framework        0x0000000113f175bd swift::SerializedModuleLoader::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool) + 589
3   com.apple.LLDB.framework        0x0000000113f199cf swift::SerializedModuleLoader::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 5423
4   com.apple.LLDB.framework        0x0000000113b58004 swift::ASTContext::getModule(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 276
5   com.apple.LLDB.framework        0x0000000113efd385 swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>) + 373
6   com.apple.LLDB.framework        0x0000000113f1116b swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc) + 1739
7   com.apple.LLDB.framework        0x0000000113f175bd swift::SerializedModuleLoader::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool) + 589
8   com.apple.LLDB.framework        0x0000000113f199cf swift::SerializedModuleLoader::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 5423
9   com.apple.LLDB.framework        0x0000000113b58004 swift::ASTContext::getModule(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 276
10  com.apple.LLDB.framework        0x0000000113efd385 swift::ModuleFile::getModule(llvm::ArrayRef<swift::Identifier>) + 373
11  com.apple.LLDB.framework        0x0000000113f1116b swift::ModuleFile::associateWithFileContext(swift::FileUnit*, swift::SourceLoc) + 1739
12  com.apple.LLDB.framework        0x0000000113f175bd swift::SerializedModuleLoader::loadAST(swift::ModuleDecl&, llvm::Optional<swift::SourceLoc>, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, std::__1::unique_ptr<llvm::MemoryBuffer, std::__1::default_delete<llvm::MemoryBuffer> >, bool) + 589
13  com.apple.LLDB.framework        0x0000000113f199cf swift::SerializedModuleLoader::loadModule(swift::SourceLoc, llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 5423
14  com.apple.LLDB.framework        0x0000000113b58004 swift::ASTContext::getModule(llvm::ArrayRef<std::__1::pair<swift::Identifier, swift::SourceLoc> >) + 276
15  com.apple.LLDB.framework        0x00000001143a09bd lldb_private::SwiftASTContext::GetModule(lldb_private::ConstString const&, lldb_private::Error&) + 365
16  com.apple.LLDB.framework        0x00000001143a21d6 lldb_private::SwiftASTContext::ValidateSectionModules(lldb_private::Module&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&) + 114
17  com.apple.LLDB.framework        0x000000011412d5ef lldb_private::Module::GetSwiftASTContext(lldb_private::Error*) + 2579
18  com.apple.LLDB.framework        0x000000011425922f SymbolFileDWARF::GetSwiftASTContext(lldb_private::Error*) + 83
19  com.apple.LLDB.framework        0x00000001143218dc std::__1::__function::__func<lldb_private::Target::GetSwiftASTContext(lldb_private::Error&, bool, char const*)::$_0, std::__1::allocator<lldb_private::Target::GetSwiftASTContext(lldb_private::Error&, bool, char const*)::$_0>, void (std::__1::shared_ptr<lldb_private::Module>&&)>::operator()(std::__1::shared_ptr<lldb_private::Module>&&) + 646
20  com.apple.LLDB.framework        0x000000011431c66d lldb_private::Target::GetSwiftASTContext(lldb_private::Error&, bool, char const*) + 1945
21  com.apple.LLDB.framework        0x000000011418a7ba lldb_private::formatters::swift::SwiftMetatype_SummaryProvider(lldb_private::ValueObject&, lldb_private::Stream&, lldb_private::TypeSummaryOptions const&) + 318
22  com.apple.LLDB.framework        0x000000011446b9c9 lldb_private::CXXFunctionSummaryFormat::FormatObject(lldb_private::ValueObject*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::TypeSummaryOptions const&) + 85
23  com.apple.LLDB.framework        0x0000000114165512 lldb_private::ValueObject::GetSummaryAsCString(lldb_private::TypeSummaryImpl*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::TypeSummaryOptions const&) + 202
24  com.apple.LLDB.framework        0x00000001141655ab lldb_private::ValueObject::GetSummaryAsCString(lldb::LanguageType) + 105
25  com.apple.LLDB.framework        0x0000000112427788 lldb::SBValue::GetSummary() + 78
26  com.apple.dt.dbg.DebuggerLLDB   0x000000011237985f -[DBGLLDBDataValue _calculateSummary] + 117
27  com.apple.dt.dbg.DebuggerLLDB   0x0000000112379500 __67-[DBGLLDBDataValue _fetchSummaryFromLLDBOnSessionThreadIfNecessary]_block_invoke + 104
28  com.apple.dt.DVTFoundation      0x0000000107a915ec ___DVTPreventInvalidationForObjectAllowingRecursiveCallsDuringBlock_block_invoke_2 + 49
29  libdispatch.dylib               0x00007fff8ddffe73 _dispatch_client_callout + 8
30  libdispatch.dylib               0x00007fff8de0eee9 _dispatch_sync_f_invoke + 39
31  com.apple.dt.DVTFoundation      0x0000000107a91596 ___DVTPreventInvalidationForObjectAllowingRecursiveCallsDuringBlock_block_invoke + 133
32  libdispatch.dylib               0x00007fff8ddffe73 _dispatch_client_callout + 8
33  libdispatch.dylib               0x00007fff8de0eee9 _dispatch_sync_f_invoke + 39
34  com.apple.dt.DVTFoundation      0x0000000107a913f2 _DVTPreventInvalidationForObjectAllowingRecursiveCallsDuringBlock + 372
35  com.apple.dt.DVTFoundation      0x0000000107a91745 _DVTPreventInvalidationAllowingRecursiveCallsDuringBlock + 35
36  com.apple.dt.dbg.DebuggerLLDB   0x0000000112378ba8 __44-[DBGLLDBDataValue _addSessionThreadAction:]_block_invoke + 122
37  com.apple.dt.dbg.DebuggerLLDB   0x000000011238c168 -[DBGLLDBSession handleNextActionWithState:withRunPending:] + 435
38  com.apple.dt.dbg.DebuggerLLDB   0x00000001123872f8 DBGLLDBSessionThread(void*) + 997
39  libsystem_pthread.dylib         0x00007fff873ec05a _pthread_body + 131
40  libsystem_pthread.dylib         0x00007fff873ebfd7 _pthread_start + 176
41  libsystem_pthread.dylib         0x00007fff873e93ed thread_start + 13

我在我的应用程序中使用Swift语言和几个框架,这里是Cartfile:

github "robb/Cartography"
github "ReactiveCocoa/ReactiveCocoa" "v4.0.0-alpha.3"
github "realm/realm-cocoa"

也许某人已经看到过这样的崩溃,或者对此有所了解。

6 个答案:

答案 0 :(得分:5)

为我解决了这个确切的崩溃,Xcode 7.1.1(以前在我的断点上可以100%重现)可以重新运行carthage bootstrap,并且崩溃消失了。

答案 1 :(得分:2)

尝试删除DerivedData。这对我有用。我认为Xcode 6的中间构建产品会导致Xcode 7崩溃。

答案 2 :(得分:1)

我有同样的Swift问题并重新安装Xcode修复了这个问题。 通过重新安装,我的意思是删除xcode.app包,并从中删除文件 - / Library / Developer - / Library / Developer / Application Support / Xcode - 〜/ Library / Developer - 〜/ Library / Developer / Application Support / Xcode +我为模拟器应用程序做了同样的事情

另外我删除了所有xcode和模拟器首选项,可能也没有必要 - 删除DerivedData文件夹就足够了

可能删除并重新下载XCode并不是必需的

不要忘记以前做好备份。

答案 3 :(得分:1)

解决方案可能是禁用模块调试。

在您的项目中搜索CLANG_ENABLE_MODULE_DEBUGGING并将其设置为no。

答案 4 :(得分:1)

当我尝试在真实设备上运行应用程序时,我在Xcode 9.1中遇到了同样的问题。

我只是从设备中删除应用程序,当我重新运行项目时,Xcode不再崩溃。

答案 5 :(得分:0)

尽管降低了protocol旗帜,但在我的项目中遇到了这个问题。这可能是边缘情况,但无论如何都值得分享。

这是由我最近的提交引起的,我不小心将某个属性声明为id而不是@property (nonatomic, strong) MyObjectProtocol *selectedItem;

@property (nonatomic, strong) id<MyObjectProtocol> selectedItem;

并在我将其更改为:

时修复
htmlboiler

我的一大呐喊,但不是谢谢Xcode !!

相关问题