5

I have a NSOperationQueue, maxConcurrentOperationCount = 1,

and Custom NSOperation has a property is block,

when the NSOperationQueue addOperation, the app crash, in iOS 9.x,

the NSOperation is not nil.

following is Apple crash report, but i can't reappear:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x1000000013ed199e

0   Foundation 0x0000000182f3b4e8 ____addOperations_block_invoke607 + 524 (NSOperation.m:193)
1   Foundation 0x0000000182f3b488 ____addOperations_block_invoke607 + 428 (NSOperation.m:204)
2   Foundation 0x0000000182f26170 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:usingBlock:] + 672 (NSKeyValueObserving.m:2406)
3   Foundation 0x0000000182e7afc0 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] + 64 (NSKeyValueObserving.m:2432)
4   Foundation 0x0000000182f392e4 __addOperations + 1400 (NSOperation.m:2100)

Thanks!

fyxrhyry
  • 135
  • 1
  • 8
  • 2
    Did you ever find out what was causing this crash? We're seeing the same crash in our app. – kubi Sep 06 '16 at 23:28
  • Is there any solution ? – Syed Sadrul Ullah Sahad Feb 23 '22 at 03:09
  • I’d be inclined to temporarily turn on zombies and see if you find anything illuminating there. See [Investigating memory access crashes](https://developer.apple.com/documentation/xcode/investigating-memory-access-crashes/) for more diagnostic tools. – Rob Nov 01 '22 at 04:03

0 Answers0