I am testing my application on iOS 9.0.2 device. I have the service to upload the data from the device. When the upload is in foreground it works fine. But the same when the upload is running in the background and the device is auto locked (pin security) the it stop and crashed.
Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: unknown at 0x0000000105eaa000
Triggered by Thread:  7
Filtered syslog:
None found
Thread 7 name:  Dispatch queue: com.apple.NSURLSession-work
Thread 7 Crashed:
0   CoreFoundation                  0x0000000184f51730 0x184e64000 + 972592
1   CoreFoundation                  0x0000000184f50e44 0x184e64000 + 970308
2   CoreFoundation                  0x0000000184e68000 0x184e64000 + 16384
3   CFNetwork                       0x000000018481c09c 0x18465c000 + 1835164
4   CFNetwork                       0x00000001846d997c 0x18465c000 + 514428
5   CFNetwork                       0x00000001847e1814 0x18465c000 + 1595412
6   CFNetwork                       0x0000000184783144 0x18465c000 + 1208644
7   CFNetwork                       0x0000000184777548 0x18465c000 + 1160520
8   CFNetwork                       0x000000018477ec9c 0x18465c000 + 1191068
9   CFNetwork                       0x0000000184776528 0x18465c000 + 1156392
10  libdispatch.dylib               0x000000019a3797b0 0x19a378000 + 6064
11  libdispatch.dylib               0x000000019a379770 0x19a378000 + 6000
12  libdispatch.dylib               0x000000019a38575c 0x19a378000 + 55132
13  libdispatch.dylib               0x000000019a37d274 0x19a378000 + 21108
14  libdispatch.dylib               0x000000019a38762c 0x19a378000 + 63020
15  libdispatch.dylib               0x000000019a38734c 0x19a378000 + 62284
16  libsystem_pthread.dylib         0x000000019a58d478 0x19a58c000 + 5240
17  libsystem_pthread.dylib         0x000000019a58d028 0x19a58c000 + 4136
When I do a debugging it will point at a memory location in the debugger which is associated with the NSURLConnection call.
The issue is observed only when the device is passcode is turned on. If it is turned off and user locks the phone it will upload the file without any error.
Help appreciated.