I am using a TabBarController
with two tabs. In the second I am calling an NSOperation
, adding the operation to an NSOperationQueue
. When I select the second tab, I have called this operation on the main thread. But when I switch to the first tab the app crashes. I am properly releasing and cancelling the operation
I get the following message for bt
#0 0x0243d09b in objc_msgSend ()
#1 0x1299c4a0 in ?? ()
#2 0x008b6d23 in -[__NSOperationInternal start] ()
#3 0x008b6a34 in -[NSOperation start] ()
#4 0x00943301 in __block_global_6 ()
#5 0x0222753f in _dispatch_call_block_and_release ()
#6 0x02239014 in _dispatch_client_callout ()
#7 0x0222a2e8 in _dispatch_root_queue_drain ()
#8 0x02229fcb in _dispatch_worker_thread3 ()
#9 0x99a16b24 in _pthread_wqthread ()
#10 0x99a186fe in start_wqthread ()
Please suggest any solution