XCode 9 标签本地化评论版崩溃

XCode 9 crash on label localizer comment edition

上下文:Xcode 9.0 (9A235)

当我尝试编辑情节提要标签的本地化注释(插入 Barty Crouch 标签 #bc-ignore!)时,XCode 9 次崩溃。

此外,尝试编辑字体也无济于事。

对我来说似乎是一个损坏的故事板,当然是在合并之后。

有人遇到同样的问题吗?

编辑,明确的问题:

是否有避免崩溃的修复程序,或者我是否必须手动编辑故事板?

Process:               Xcode [66619]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               9.0 (13247)
Build Info:            IDEFrameworks-13247000000000000~26
App Item ID:           497799835
App External ID:       823595305
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [66619]
User ID:               501

Date/Time:             2017-10-03 15:59:00.562 +0200
OS Version:            Mac OS X 10.12.6 (16G29)
Report Version:        12
Anonymous UUID:        3A288ABF-30D0-A9E7-A02E-4BBD3B1BABB5

Sleep/Wake UUID:       22E57F41-2180-4AB1-AA1D-B1DCF99E683E

Time Awake Since Boot: 320000 seconds
Time Since Wake:       26000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
ProductBuildVersion: 9A235
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilder/IDEInterfaceBuilder-13196/InterfaceBuilderKit/Utilities/IBAppKitSupport.m:388
Details:  Unknown systemFontType: 132
Object:   <NSFont: 0x7fc74354c640>
Method:   -metaFont
Thread:   <NSThread: 0x7fc73a40f910>{number = 1, name = main}
Hints:   

Backtrace:
  0   -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   -[NSFont(MethodsBasedOnPrivateState) metaFont] (in IDEInterfaceBuilderKit)
  4   -[NSFont(IBDocumentArchiving) archiveWithDocumentArchiver:] (in IDEInterfaceBuilderKit)
  5   __51-[IBDocumentArchiver archiveObject:forOptionalKey:]_block_invoke (in IDEInterfaceBuilderKit)
  6   -[IBDocumentArchiver recurseWithArchiveToken:usingBlock:] (in IDEInterfaceBuilderKit)
  7   -[IBDocumentArchiver recurseWithElementNamed:forObject:kind:invokingBlock:] (in IDEInterfaceBuilderKit)
  1. 清理 Xcode 文件夹。

  2. 重新运行Xcode.

即使是全新的空项目,在编辑 Comment For Localizer 时也会崩溃。这是一个 Xcode 9 期。

作为解决方法,您可以通过添加这种块(例如直接在 <label> 块内)手动编辑 .storyboard 文件:

<attributedString key="userComments">
    <fragment content="Here goes your comment...">
        <attributes>
            <font key="NSFont" metaFont="smallSystem"/>
            <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
        </attributes>
    </fragment>
</attributedString>