App crashes while reading CTTelephonyNetworkInfo.serviceCurrentRadioAccessTechnology

Originator:skuo
Number:rdar://46873673 Date Originated:2018-12-20
Status:Open Resolved:
Product:iOS Product Version:12
Classification: Reproducible:
 
We're subscribing to CTServiceRadioAccessTechnologyDidChange, and then on the same notification callback (the same thread), read CTTelephonyNetworkInfo.serviceCurrentRadioAccessTechnology (as documented in CTTelephonyNetworkInfo.h). Occasionally this will result in a "EXC_BAD_ACCESS ยท Attempted to dereference garbage pointer" crash.
So it would appear that it's not safe to read serviceCurrentRadioAccessTechnology on CTServiceRadioAccessTechnologyDidChange's callback thread.

We also see the same crashes when using the old deprecated API (CTRadioAccessTechnologyDidChange and currentRadioAccessTechnology) but only with iOS12.

Steps to Reproduce:
Subscribe to CTServiceRadioAccessTechnologyDidChange using Notification Center, on the callback read CTTelephonyNetworkInfo.serviceCurrentRadioAccessTechnology. This will occasionally crash.

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!