5

Context : Xcode 9.0 (9A235)

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 ?

EDIT, non-ambiguous question :

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)
Pierre Mardon
  • 727
  • 8
  • 25

2 Answers2

4

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

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>
VPusher
  • 376
  • 1
  • 4
  • 11
  • Seems to be the only right answer, I'll edit my question to be more precise (version of Xcode). The only other solution will (hopefully) be to upgrade Xcode when an update will be available. – Pierre Mardon Oct 12 '17 at 19:35
  • What is the purpose of the font info? Leaving them out seems harmless — app still runs, XLIFF export has the comment. – Andrew Duncan Nov 10 '17 at 19:23
0
  1. Clean Xcode DerivedData folder.

  2. Re-run Xcode.