UIDevice setBatteryMonitoringEnabled is not thread-safe

Originator:jszumski
Number:rdar://13941890 Date Originated:20-May-2013 05:21 PM
Status:Closed Resolved:
Product:iOS SDK Product Version:6.x
Classification: Reproducible:Always
 
Summary: Calls to setBatteryMonitoringEnabled: are not thread-safe and crash on an iOS 6.x device.

Steps to Reproduce: Run the attached project and observe the crash.

Expected Results: The attached project should run to completion and print 200 log lines.

Actual Results: The project crashes with a EXC_BAD_ACCESS in IOServiceAddInterestNotification.

Regression: The project works on iOS 5.x and crashes only on iOS 6.x.

Notes: If this API is not intended to be thread-safe, can that be added to the documentation?

20-May-2013 05:21 PM John Szumski:
'Battery Level.zip' and 'Battery Level  5-20-13 5-20 PM.crash' were successfully uploaded

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!