如何修复"Xcode在使用libclang.dylib插件时意外退出."?

Ger*_*eri 8 xcode clang ios libclang xcode5

我在启动xCode(5.1.1)之后的每一次都有这个.

删除用户数据,关闭源代码控制(如某些帖子建议),没有效果,仍然崩溃(同时显示索引......永远不会完成).即使重新安装 xCode,没有任何影响,仍然说同样的.

有人修过这样的xCode吗?

在此输入图像描述

这是崩溃的线程:

 Thread 7 Crashed:: Dispatch queue: IDEIndex PCH Creation Lock
    0   libclang.dylib                  0x00000001080c60d9 void llvm::BitstreamWriter::EmitRecordWithAbbrevImpl<unsigned long long>(unsigned int, llvm::SmallVectorImpl<unsigned long long>&, llvm::StringRef) + 809
    1   libclang.dylib                  0x00000001080c5867 void llvm::BitstreamWriter::EmitRecord<unsigned long long>(unsigned int, llvm::SmallVectorImpl<unsigned long long>&, unsigned int) + 71
    2   libclang.dylib                  0x00000001081e9f25 clang::ASTWriter::WriteASTCore(clang::Sema&, llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, clang::Module*) + 35045
    3   libclang.dylib                  0x00000001081e160e clang::ASTWriter::WriteAST(clang::Sema&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, clang::Module*, llvm::StringRef, bool) + 6830
    4   libclang.dylib                  0x00000001080719a3 clang::ASTUnit::Save(llvm::StringRef) + 691
    5   libclang.dylib                  0x0000000107fe974f clang_saveTranslationUnit + 543
    6   com.apple.dt.IDEFoundation      0x0000000106ac63af -[IDEIndexClangTranslationUnit cxTranslationUnit] + 331
    7   com.apple.dt.IDEFoundation      0x0000000106c2c11a +[IDEIndexClangDataSource translationUnitForPCHFile:arguments:session:create:] + 259
    8   com.apple.dt.IDEFoundation      0x0000000106cf5552 __90-[IDEIndex createPCHFile:arguments:hashCriteria:target:session:willIndex:translationUnit:]_block_invoke + 1739
    9   libdispatch.dylib               0x00007fff957012ad _dispatch_client_callout + 8
    10  libdispatch.dylib               0x00007fff95702166 _dispatch_barrier_sync_f_invoke + 39
    11  com.apple.dt.DVTFoundation      0x0000000105fce5cf -[DVTDispatchLock performLockedBlock:] + 95
    12  com.apple.dt.IDEFoundation      0x0000000106cf4932 -[IDEIndex createPCHFile:arguments:hashCriteria:target:session:willIndex:translationUnit:] + 919
    13  com.apple.dt.IDEFoundation      0x0000000106ac4985 -[IDEIndexClangDataSource generateDataForJob:] + 1274
    14  com.apple.dt.IDEFoundation      0x0000000106ac42fb -[IDEIndexDataSource processJob:] + 147
    15  com.apple.dt.IDEFoundation      0x0000000106ac3e33 +[IDEIndexingEngine runFileJob:] + 732
    16  com.apple.dt.IDEFoundation      0x0000000106ac3550 -[IDEIndexingJob run] + 161
    17  com.apple.dt.IDEFoundation      0x0000000106c3233c __40-[IDEIndexingJobScheduler _scheduleJobs]_block_invoke + 33
    18  libdispatch.dylib               0x00007fff957041d7 _dispatch_call_block_and_release + 12
    19  libdispatch.dylib               0x00007fff957012ad _dispatch_client_callout + 8
    20  libdispatch.dylib               0x00007fff9570309e _dispatch_root_queue_drain + 326
    21  libdispatch.dylib               0x00007fff95704193 _dispatch_worker_thread2 + 40
    22  libsystem_pthread.dylib         0x00007fff8ead7ef8 _pthread_wqthread + 314
    23  libsystem_pthread.dylib         0x00007fff8eadafb9 start_wqthread + 13
Run Code Online (Sandbox Code Playgroud)

或者您可以在https://gist.github.com/eppz/10669132找到完整的崩溃报告

Ger*_*eri 9

声明中有一个.m文件#import!

它是由一行代码引起的!不能相信它.偷了4个小时搞清楚.哦,它是由一份@class声明合并而成的.

它显示为错误,但xCode/Clang崩溃的速度甚至超过了你甚至可以构建的速度.:d

致命的模式:

One.h

#import "Two.m" // Not easy to spot actually.

@interface One : NSObject
@end
Run Code Online (Sandbox Code Playgroud)

Two.h

@class One;
@interface Two : NSObject
@property (nonatomic, weak) One *one;
@end
Run Code Online (Sandbox Code Playgroud)

除非我提到超过200个课程的项目,否则我无法重现它.那一定是某种竞争条件.

  • 你,亲爱的朋友,给我几个小时的痛苦和挫折......如果你发现自己在东京,请告诉我,我会给你买一杯饮料. (2认同)
  • 我相信对印度的邀请也是有序的.:) (2认同)