XCode 9 在标签本地化程序注释版上崩溃 [英] XCode 9 crash on label localizer comment edition

查看:19
本文介绍了XCode 9 在标签本地化程序注释版上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上下文:Xcode 9.0 (9A235)

Context : Xcode 9.0 (9A235)

当我尝试为本地化人员编辑故事板标签的注释时(插入 Barty Crouch 标签 #bc-ignore!),XCode 9 崩溃.

When I try to edit my storyboard label's note for localizers (inserting Barty Crouch tag #bc-ignore!), XCode 9 crashes.

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

Also, trying to edit the font does nothing.

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

Seems like a corrupted storyboard to me, certainly after a merge.

有人遇到同样的问题吗?

Does anyone face the same issue ?

编辑,明确的问题:

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

Is there a fix to avoid the crash or do I have to edit the storyboard by hand?

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)

推荐答案

即使是全新的空项目,在编辑 Comment For Localizer 时也会崩溃.这是 Xcode 9 的问题.

Even with a brand new empty project, it craches when editing Comment For Localizer. It is an Xcode 9 issue.

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

As a workaround you can edit the .storyboard file manually by adding this kind of block (directly inside your <label> block for example):

<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>

这篇关于XCode 9 在标签本地化程序注释版上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆