Crash when using NSURLSession with HTTPShouldUsePipelining

Originator:dfedoseyev
Number:rdar://19714335 Date Originated:02/04/2015
Status:Open Resolved:
Product:iOS Product Version:iOS 8.1.3 (12B466)
Classification:Crash Reproducible:Frequent
 
Summary:
Using a NSURLSession with HTTPShouldUsePipelining causes a crash while changing networks from wifi to cellular while the app is suspended during a NSURLSessionDownloadTask load.

Steps to Reproduce:
1. Open the attached sample project and run on a device that has both cellular data and wifi connections enabled
2. Bring the app to background and disable wifi
3. Wait till it switches to cellular and then reenable wifi 
4. Bring the app to foreground.

The steps are not exact and sometimes you need to repeat steps 2 - 4 a couple of times


Expected Results:
Should not crash.

Actual Results:
EXC_BAD_ACCESS crash on HTTPConnectionCacheEntry::pipeliningTimerFired()

Notes:
Sample project http://cl.ly/1w1B3f1Z163E

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!