xCode运行应用程序时崩溃

5
每次我试图在Xcode中运行iOS应用程序,它都会崩溃。我已经尝试过重新启动我的机器,在实际硬件和模拟器上运行应用程序,并清除了xcodeproj包中的xcuserdata文件夹。但是,在每次尝试后,当我按下运行按钮或键入“cmd + R”时,Xcode立即崩溃。
我在下面附上了崩溃报告以获得更多信息。我正在运行OSX 10.11和Xcode版本7.0.1(7A1001)。有其他人解决过这个问题吗?
Application Specific Information:
ProductBuildVersion: 7A1001
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-8228/IDEKit/Application/IDEWindowMenuController.m:101
Details:  itemName should be a non-empty string, but it's an empty string
Object:   <IDEWindowMenuController>
Method:   +titleForItemWithURL:name:parentLocations:presentedParentLocationCount:includeIconInTitles:
Thread:   <NSThread: 0x7fbaca619830>{number = 1, name = main}
Hints:   None
Backtrace:
  0  0x000000010ccc6904 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
  1  0x000000010b88f22e _DVTAssertionHandler (in DVTFoundation)
  2  0x000000010b88f445 _DVTAssertionFailureHandler (in DVTFoundation)
  3  0x000000010cb36d56 +[IDEWindowMenuController titleForItemWithURL:name:parentLocations:presentedParentLocationCount:includeIconInTitles:] (in IDEKit)
  4  0x000000010d0455f6 __90+[IDEWindowMenuController _createAttributedTitlesForItemDictionaries:includeIconInTitles:]_block_invoke (in IDEKit)
  5  0x00007fff9c0aaa96 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke (in CoreFoundation)
  6  0x00007fff9c0aa929 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] (in CoreFoundation)
  7  0x000000010caa52cb +[IDEWindowMenuController _createAttributedTitlesForItemDictionaries:includeIconInTitles:] (in IDEKit)
  8  0x000000010caa44a1 -[IDEWindowMenuController _windowMenuItemsWithIconInTitles:] (in IDEKit)
  9  0x000000010caa612b -[IDEApplication menuNeedsUpdate:] (in IDEKit)
 10  0x00007fff96d843f4 -[NSMenu _populateFromDelegateWithEventRef:] (in AppKit)
 11  0x00007fff96d80999 -[NSMenu _populateWithEventRef:] (in AppKit)
 12  0x00007fff96d83551 -[NSCarbonMenuImpl _carbonPopulateEvent:handlerCallRef:] (in AppKit)
 13  0x00007fff96d8323d NSSLMMenuEventHandler (in AppKit)
 14  0x00007fff8f8e298e DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) (in HIToolbox)
 15  0x00007fff8f8e1e18 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) (in HIToolbox)
 16  0x00007fff8f8e1c7b SendEventToEventTargetWithOptions (in HIToolbox)
 17  0x00007fff8f9293cb SendMenuPopulate(MenuData*, OpaqueEventTargetRef*, unsigned int, double, unsigned int, OpaqueEventRef*, unsigned char, unsigned char*) (in HIToolbox)
 18  0x00007fff8f929174 PopulateMenu(MenuData*, OpaqueEventTargetRef*, CheckMenuData*, unsigned int, double) (in HIToolbox)
 19  0x00007fff8f92881b Check1MenuForKeyEvent(MenuData*, CheckMenuData*) (in HIToolbox)
 20  0x00007fff8f927dd3 CheckMenusForKeyEvent(MenuData*, CheckMenuData*) (in HIToolbox)
 21  0x00007fff8f9278c0 _IsMenuKeyEvent(MenuData*, OpaqueEventRef*, unsigned int, MenuData**, unsigned short*) (in HIToolbox)
 22  0x00007fff8f9275d4 IsMenuKeyEvent (in HIToolbox)
 23  0x00007fff96d82e76 +[NSCarbonMenuImpl _menuItemWithKeyEquivalentMatchingEventRef:inMenu:] (in AppKit)
 24  0x00007fff96d82c00 _NSFindMenuItemMatchingCommandKeyEvent (in AppKit)
 25  0x00007fff96d6e2cf _NSHandleCarbonMenuEvent (in AppKit)
 26  0x00007fff96be3281 _DPSNextEvent (in AppKit)
 27  0x00007fff96be2369 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
 28  0x000000010be6049b -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
 29  0x00007fff96bd6ecc -[NSApplication run] (in AppKit)
 30  0x00007fff96ba0162 NSApplicationMain (in AppKit)
 31  0x00007fff9a78e5ad start (in libdyld.dylib)

现在,苹果已经推出了Xcode 7.1.1的正式/生产版本。当您在该模拟器下尝试运行您的应用程序时会发生什么? - Michael Dautermann
启动后,我在Xcode 7.1.1中也遇到了同样的崩溃。 - Matt Le Fleur
即使更新后我也遇到了同样的问题。回滚到项目的先前提交版本可以解决此问题,但不够理想。 - Adam Jakiela
1个回答

7
我看到了同样的行为。我在苹果开发者论坛上找到了这个帖子,它解释了解决方法:关闭任何具有空标题的Xcode项目选项卡。这为我解决了问题,并且这也可以解释为什么回退能够解决问题。某种方式,项目文件已经损坏了。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接