+[UIImage imageNamed:] crash on iOS 7 with Xcode 8

Originator:adhumi
Number:rdar://26809791 Date Originated:15/06/2016
Status:Open Resolved:
Product:iOS SDK Product Version:7.0
Classification: Reproducible:Always
 
Summary:
When reaching the line `[UIImage imageNamed:@"Image"];`, the application is crashing with the following log message :

Assertion failed: (maxCountIncludingZeroTerminator > 0 && tokenCount < maxCountIncludingZeroTerminator), function CUIRenditionKeyCopy, file /SourceCache/CoreUI/CoreUI-232.4/CoreTheme/ThemeStorage/CUIThemeRendition.m, line 185.

The device log seems normal, except the following line:

Jun 15 11:54:31 deviceName backboardd[28] <Error>: HID: The 'Passive' connection 'ImageNamed' access to protected services is denied.

Steps to Reproduce:
Build an run the attached project

Expected Results:
Should load the image and not crash.

Actual Results:
Crash

Version:
7.1.2 (11D257)

Notes:


Configuration:
iPhone 4S

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!