每当我尝试从 Xcode 运行特定项目/应用程序时,它都会崩溃,并显示回溯中的详细信息(请参见下文)。
在 Xcode 中运行它会发生各种有趣的事情。
首先,从 iPad 模拟器中删除应用程序然后第一次运行它似乎 90% 的时间都在工作。但随后在 iPad 模拟器上运行的第二次或第三次尝试再次崩溃。
尝试在 iPad 设备上运行它总是会崩溃,根本不是运气。
我注意到的另一件有趣的事情是,每当我设法让它在 iPad 模拟器上第二次运行时,我在应用程序委托中定义的所有外观代码(颜色等)都消失了......
我可以从回溯中收集到的唯一线索是:已向目标“MyApp”询问其构建上下文,但它不属于项目
所以,我不确定这是否与 Xcode 相关,或者可能与工作区/项目文件有关,因为它只会在这个非常特定的项目上崩溃。如果我的工作区或项目文件有问题,有人知道如何解决吗?
我感谢您的帮助。
回溯详细信息:
Application Specific Information:
ProductBuildVersion: 4E2002
ASSERTION FAILURE in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport- 1197/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/Target.subproj/PBXTarget.m:4006
Details: target 'MyApp' has been asked for its build context but it does not belong to a project
Object: <PBXNativeTarget: 0x409f3d8c0>
Method: -targetBuildContext
Thread: <NSThread: 0x40a7d8a80>{name = (null), num = 51}
Hints: None
Backtrace:
0 0x000000010bbbbb9f -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x000000010b070635 _DVTAssertionFailureHandler (in DVTFoundation)
2 0x000000010e18c505 -[PBXTarget targetBuildContext] (in DevToolsCore)
3 0x000000010e18fec4 -[PBXTarget(XCBuildables) buildDidFinishWithBuildLogRecorder:] (in DevToolsCore)
4 0x000000010e2fefe2 -[Xcode3TargetBuildableSnapshot buildForBuilderDidFinish:] (in DevToolsCore)
5 0x000000010b6bb668 -[IDEBuildableSnapshot performBuildForBuilder:buildCommand:buildOnlyTheseFiles:] (in IDEFoundation)
6 0x000000010b6bada6 -[IDEBuilder main] (in IDEFoundation)
7 0x00007fff95e8b6b4 -[__NSOperationInternal start] (in Foundation)
8 0x00007fff95e9e912 ____NSOQSchedule_block_invoke_2 (in Foundation)
9 0x00007fff96d6da86 _dispatch_call_block_and_release (in libdispatch.dylib)
10 0x00007fff96d6e965 _dispatch_worker_thread2 (in libdispatch.dylib)
11 0x00007fff8f67c3da _pthread_wqthread (in libsystem_c.dylib)
12 0x00007fff8f67db85 start_wqthread (in libsystem_c.dylib)
objc[31243]: garbage collection is ON
abort() called