运行应用程序时出现xCode崩溃

时间:2015-11-16 23:15:25

标签: ios xcode

每次我尝试在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)

1 个答案:

答案 0 :(得分:7)

我看到了同样的行为。我在Apple Developer网站上找到了this thread,它解释了要做什么:关闭Xcode项目中有空标题的所有标签。修复了我的问题,这可以解释为什么还原解决了问题。不知何故,项目文件已损坏。