Crash when setting tintColor within tintColorDidChange

Originator:steipete
Number:rdar://19699978 Date Originated:03-Feb-2015 05:06 PM
Status:Open Resolved:
Product:iOS Product Version:iOS 8.1.3
Classification:Other Bug Reproducible:Always
 
Summary:
Setting the tintColor property of an UIView within tintColorDidChange can lead to a crash if UIAppearance rules are set.

Steps to Reproduce:
Open attached example. Observe crash.

Expected Results:
Should not crash.

Actual Results:
Throws an exception -[__NSArrayM insertObject:atIndex:]: object cannot be nil somewhere inside/near TaggingAppearanceObjectSetterIMP called from tintColorDidChange.

Regression:
This crashes on iOS 7 as well.

Notes:
I did some digging in https://gist.github.com/steipete/ec17149d8bfd615718fc

Seems to only happen if we both change tintColor and have appearance rules defined

Comments

Still happening with iOS 10.0.1 GM.

By steipete at Sept. 16, 2016, 2 p.m. (reply...)

Example: http://cl.ly/1X1l143I1U18


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!