【问题标题】:XCode 4.2 crash on multiple targets setupXCode 4.2 在多个目标设置上崩溃
【发布时间】:2014-03-18 11:22:13
【问题描述】:

我复制了一个目标并修改了相应的属性列表文件。添加了一个预处理器宏,有助于从相同的源文件构建重复的目标。

但是当我尝试进行干净的构建时,XCode 4.2 不断崩溃。有趣的是,它在初始构建时运行良好。但是当我清理原始目标并尝试重建重复的目标时,XCode 崩溃了。

堆栈跟踪 -

ASSERTION FAILURE in /SourceCache/IDEKit/IDEKit-955/Framework/Classes/Editor/IDEEditorDocument.m:635
Details:  (lastKnownModificationDate) should not be nil.
Object:   <IDEQuickLookDocument: 0x4020b7fc0>
Method:   -_respondToFileChangeOnDiskWithFilePath:
Thread:   <NSThread: 0x40010a260>{name = (null), num = 1}
Hints:   None
Backtrace:

  0  0x0000000107035466 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
  1  0x00000001066a8794 _DVTAssertionFailureHandler (in DVTFoundation)
  2  0x0000000106fb66c7 -[IDEEditorDocument _respondToFileChangeOnDiskWithFilePath:] (in IDEKit)
  3  0x00007fff8ca4ca82 _dispatch_call_block_and_release (in libdispatch.dylib)
  4  0x00007fff8ca4e8f2 _dispatch_main_queue_callback_4CF (in libdispatch.dylib)
  5  0x00007fff8c2fee7c __CFRunLoopRun (in CoreFoundation)
  6  0x00007fff8c2fe486 CFRunLoopRunSpecific (in CoreFoundation)
  7  0x00007fff8f07e2bf RunCurrentEventLoopInMode (in HIToolbox)
  8  0x00007fff8f08556d ReceiveNextEventCommon (in HIToolbox)
  9  0x00007fff8f0853fa BlockUntilNextEventMatchingListInMode (in HIToolbox)
 10  0x00007fff869e2779 _DPSNextEvent (in AppKit)
 11  0x00007fff869e207d -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
 12  0x00007fff869de9b9 -[NSApplication run] (in AppKit)
 13  0x00007fff86c5aeac NSApplicationMain (in AppKit)
 14  0x0000000106637eec (in Xcode)

以前有人遇到过这个问题吗?谢谢。

【问题讨论】:

    标签: ios objective-c crash xcode4.2


    【解决方案1】:

    我找到了答案。项目文件来自 Xcode 4.1,但我使用的是 4.2 版来构建它。当我使用 4.1 版本构建项目时,一切正常。有趣的是,当我使用升级版本打开项目文件时,没有任何警告。

    复制目标时需要注意的几点 -

    1. 也在目标构建设置中更改产品名称。直接修改目标文件名也不会在构建设置中改变。

    2. 如果打算为新目标使用不同的 GUI,请在对应的 .plist 文件中使用相同的名称。

    3. 新的 GUI 文件需要包含在包中。

    4. 编译器标志的预处理器宏必须仅用于新目标。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多