UITextView keeps crashing after selection long text

Originator:adam.grzegorowski
Number:rdar://30012619 Date Originated:13/01/2017
Status:Closed Resolved:08/07/2017
Product:iOS + SDK Product Version:10.2
Classification:Crash/Hang/Data Loss Reproducible:Sometimes
 
Summary:
I'm using custom class of `UITextView`, during tests I got this crash. Looks like it's general problem of `UITextView`. In most times crash occurs after 2-nd try of text selection. I think this scenario can kill most of the apps using `UITextView`.

Steps to Reproduce:
1. Open Contacts app
>> Apps open
2. Tap on `+` icon in top right corner
>> New Contact modal appears
3. Scroll down to `Notes` section
4. Type long word without spaces, eg: `qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq` (90 x `q` sign)
5. Tap on text:
>> Menu appears
6. Choose `Select All` option
>> All text selected
7. Delete text
>> Text deleted
8. Repeat steps: 4, 5, 6
>> App crashes after selecting all text

Expected Results:
All text should be selected

Actual Results:
App crashes

Version:
iOS 10.2 (14C92)

Configuration:
iPhone 6s, 64GB, using WiFi

Comments

Bug fixed in iOS 11 beta.

By adam.grzegorowski at July 24, 2017, 11:35 a.m. (reply...)

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!