ibtool 6.xc crashes on storyboard with iOS 9 Text Styles
| Originator: | rsattar | ||
| Number: | rdar://24771791 | Date Originated: | 22-Feb-2016 10:31 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | ibtool 6.3.2 |
| Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary:
ibtool version 6.x will crash attempting to compile a storyboard using text styles it doesn’t recognize. For example, just adding UILabel with UIFontTextStyleTitle1, or UIFontTextStyleCallout as the font will cause the crash.
Steps to Reproduce:
1. Create a empty storyboard.
2. Add a UILabel to the view, and set its font to either UIFontTextStyleTitle1 (or 2 or 3), or UIFontTextStyleCallout.
3. Compile the storyboard using ibtool version 6.X (i.e Xcode 6) using the following command:
ibtool --errors --warnings --notices --output-format human-readable-text --compile outdir [NameOfStoryboard].storyboard
Expected Results:
ibtool should warn that the storyboard contains text styles it does not recognize, and either fail, or perhaps succeed with those text styles ignored.
Actual Results:
ibtool crashes with:
Exception name: NSInternalInconsistencyException
Exception reason: Expecting a text style, got nil!
Notes:
I’ve attached an empty Xcode project with Main.storyboard which includes labels using the iOS 9 font styles. Compiling Main.storyboard from the command line using ibtool should show the crash, if ibtool is version 6.x.
Here’s a log of the crash in my terminal:
——————————————————————————————————————————————————————
rizretina:Base.lproj rizwan$ ibtool --version
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.ibtool.version</key>
<dict>
<key>bundle-version</key>
<string>7706</string>
<key>short-bundle-version</key>
<string>6.3.2</string>
</dict>
</dict>
</plist>
rizretina:Base.lproj rizwan$ ibtool --errors --warnings --notices --output-format human-readable-text --compile outdir Main.storyboard
2016-02-22 10:22:55.015 Interface Builder Cocoa Touch Tool[87372:19078013] *** Assertion failure in -[UICTFont encodeWithCoder:], /SourceCache/UIFoundation_Sim/UIFoundation-376.14/UIFoundation/iOS/UIFont.m:665
2016-02-22 10:22:55.824 ibtoold[87288:19059794] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-7706/InterfaceBuilderKit/Utilities/IBAbstractMessageChannelInterfaceBuilderToolProxy.m:38
Details: Failed to compile nib consisting of IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBLayoutConstraint, IBProxyObject, IBProxyObject, IBUILabel, IBUILabel, IBUILabel, IBUIView, IBUIView, IBUIViewControllerAutolayoutGuide, and IBUIViewControllerAutolayoutGuide.
Encountered an error communicating with Interface Builder Cocoa Touch Tool. If you choose to file a crash report or Radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.
Exception name: NSInternalInconsistencyException
Exception reason: Expecting a text style, got nil!
Exception backtrace:
0. CoreFoundation 0x0000000112566c4d __exceptionPreprocess
1. libobjc.A.dylib 0x00000001112f6bb7 objc_exception_throw
2. CoreFoundation 0x0000000112566aca +[NSException raise:format:arguments:]
3. Foundation 0x0000000110f0a98f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4. UIFoundation 0x00000001115b7ed4 -[UIFont encodeWithCoder:]
5. UIKit 0x000000010f2f7e0d -[UINibEncoder encodeObject:forKey:]
6. UIKit 0x000000010f09d1ec -[UILabel encodeWithCoder:]
7. UIKit 0x000000010f2f7e0d -[UINibEncoder encodeObject:forKey:]
8. UIKit 0x000000010f2f7294 -[UINibEncoder serializeArray:]
9. UIKit 0x000000010f2f7e0d -[UINibEncoder encodeObject:forKey:]
10. UIKit 0x000000010ef2e91d -[UIView encodeWithCoder:]
11. UIKit 0x000000010f2f7e0d -[UINibEncoder encodeObject:forKey:]
12. UIKit 0x000000010f2f7294 -[UINibEncoder serializeArray:]
13. UIKit 0x000000010f2f7e0d -[UINibEncoder encodeObject:forKey:]
14. UIKit 0x000000010ef2e91d -[UIView encodeWithCoder:]
15. UIKit 0x000000010f2f7e0d -[UINibEncoder encodeObject:forKey:]
16. UIKit 0x000000010f2f7294 -[UINibEncoder serializeArray:]
17. UIKit 0x000000010f2f7e0d -[UINibEncoder encodeObject:forKey:]
18. IBCocoaTouchToolFoundation 0x000000010ee3cfcd -[IBCocoaTouchToolNibFactory encodeNibContentWithCoder:]
19. IBCocoaTouchToolFoundation 0x000000010ee3d170 -[IBCocoaTouchToolNibFactory nibDataWithMinimumCompatibility:]
20. IBCocoaTouchToolFoundation 0x000000010ee3d698 +[IBCocoaTouchToolNibFactory nibDataFromObjects:customClasses:topLevelObjects:traitStorageLists:accessibilityConfigurations:connections:keyValuePairs:visibleWindows:minimumCompatibility:]
21. IBCocoaTouchToolFoundation 0x000000010ee10860 -[IBCocoaTouchTool compileNibForRequest:minimumCompatibility:layoutInfo:imagesToImageNames:]
22. IBFoundation 0x0000000110b23549 __80-[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]_block_invoke
23. IBFoundation 0x0000000110b232a6 -[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]
24. IBFoundation 0x0000000110b22f90 __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke
25. libdispatch.dylib 0x0000000115b3e964 _dispatch_client_callout
26. libdispatch.dylib 0x0000000115b2b818 _dispatch_barrier_sync_f_slow_invoke
27. libdispatch.dylib 0x0000000115b3e964 _dispatch_client_callout
28. libdispatch.dylib 0x0000000115b29a59 _dispatch_main_queue_callback_4CF
29. CoreFoundation 0x00000001124ce1f9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
30. CoreFoundation 0x000000011248fdcb __CFRunLoopRun
31. CoreFoundation 0x000000011248f366 CFRunLoopRunSpecific
32. Foundation 0x0000000110eabf92 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
33. IBFoundation 0x0000000110b01c20 -[IBAbstractPlatformTool startServingReceiveChannel:]
34. IBFoundation 0x0000000110b01daf -[IBAbstractPlatformTool startServingSocket:]
35. IBFoundation 0x0000000110b02072 +[IBAbstractPlatformTool main]
36. ??? 0x000000010ed96be7 ???
37. libdyld.dylib 0x0000000115b6f145 start
Exception info:{
}
Function: __IBAssertMarshallingFailureWithUniqueBacktrace_block_invoke
Thread: <NSThread: 0x7fef4b422b40>{number = 1, name = main}
Hints: None
Backtrace:
0 0x0000000106feaed1 -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 0x0000000106fea66b _DVTAssertionHandler (in DVTFoundation)
2 0x0000000106fea8ce _DVTAssertionFailureHandler (in DVTFoundation)
3 0x0000000107f10338 __IBAssertMarshallingFailureWithUniqueBacktrace_block_invoke (in IDEInterfaceBuilderKit)
4 0x0000000107f10157 IBAssertMarshallingFailureWithUniqueBacktrace (in IDEInterfaceBuilderKit)
5 0x0000000107f0ffae IBAssertMarshallingFailure (in IDEInterfaceBuilderKit)
6 0x000000010f39d88a (in IDEInterfaceBuilderCocoaTouchIntegration)
7 0x000000010f39e3b9 (in IDEInterfaceBuilderCocoaTouchIntegration)
8 0x0000000107eaf2cc -[IBDocumentCompiler invokeWhileUsingSourceAsIntermediateDocument:] (in IDEInterfaceBuilderKit)
9 0x0000000107eaf5dd -[IBDocumentCompiler invokeWithIntermediateDocumentOfTargetRuntime:alwaysCopy:block:] (in IDEInterfaceBuilderKit)
10 0x000000010f39dc87 (in IDEInterfaceBuilderCocoaTouchIntegration)
11 0x000000010f38c0d2 (in IDEInterfaceBuilderCocoaTouchIntegration)
12 0x00000001080c1b84 -[IBStoryboardSceneCompilationGroup compilationResultsForCompilationUnits:options:returningErrors:] (in IDEInterfaceBuilderKit)
13 0x00000001080b294a -[IBStoryboardDocumentCompiler compileUnitsFromCompilationGroups:filter:options:errors:] (in IDEInterfaceBuilderKit)
14 0x00000001080b3c23 __78-[IBStoryboardDocumentCompiler compileContentsOfStoryboardWithOptions:errors:]_block_invoke (in IDEInterfaceBuilderKit)
15 0x0000000107f8dde6 IBWithAutoInvalidationPool (in IDEInterfaceBuilderKit)
16 0x00000001080b39c5 -[IBStoryboardDocumentCompiler compileContentsOfStoryboardWithOptions:errors:] (in IDEInterfaceBuilderKit)
17 0x00000001080b3fc6 -[IBStoryboardDocumentCompiler internalCompileWithOptions:error:] (in IDEInterfaceBuilderKit)
18 0x000000010f38c2e4 (in IDEInterfaceBuilderCocoaTouchIntegration)
19 0x00000001080b4906 __57-[IBStoryboardDocumentCompiler compileWithOptions:error:]_block_invoke (in IDEInterfaceBuilderKit)
20 0x0000000107eaf3e9 -[IBDocumentCompiler invokeWithIntermediateDocument:] (in IDEInterfaceBuilderKit)
21 0x0000000107eaf58d -[IBDocumentCompiler invokeWithIntermediateDocumentOfTargetRuntime:alwaysCopy:block:] (in IDEInterfaceBuilderKit)
22 0x00000001080b45ac -[IBStoryboardDocumentCompiler compileWithOptions:error:] (in IDEInterfaceBuilderKit)
23 0x0000000107eaf777 +[IBDocumentCompiler compileContentsOfDocument:options:error:] (in IDEInterfaceBuilderKit)
24 0x0000000107e6a390 __47-[IBDocument compiledPackageWithOptions:error:]_block_invoke (in IDEInterfaceBuilderKit)
25 0x0000000107ea2d25 -[IBDocumentAutolayoutManager assertIfArbitrationIsScheduledDuring:] (in IDEInterfaceBuilderKit)
26 0x0000000107e6a2e7 -[IBDocument compiledPackageWithOptions:error:] (in IDEInterfaceBuilderKit)
27 0x0000000106df3f0a (in ibtoold)
28 0x0000000106df0b64 (in ibtoold)
29 0x0000000106df3370 (in ibtoold)
30 0x0000000106df9233 (in ibtoold)
31 0x0000000106df97b0 (in ibtoold)
32 0x0000000106df9683 (in ibtoold)
33 0x0000000106de866a (in ibtoold)
34 0x0000000106df8e2c (in ibtoold)
35 0x0000000106df8074 (in ibtoold)
36 0x00007fff9f2115ad start (in libdyld.dylib)
rizretina:Base.lproj rizwan$
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!