I noticed a function named block_destroy_helper in this crash log from my iOS app. I want to know more what is this function, but I can't find any useful information. I just want to know the followings:
- What is this function doing?
- What event can trigger a call to this function?
- When I reproduce this crash on Debug build, this crash was an index out of bound error in my own source code. How could this error turned into
block_destroy_helperin Release build?
For crash log below, MyModule is a module in my app written in Swift. MyModule uses another library AsyncDisplayKit written in Objective-C.
Crashed: com.apple.main-thread
EXC_BREAKPOINT 0x0000000106d5e7ec
Crashed: com.apple.main-thread
0 MyModule 0x967ec block_destroy_helper.26 + 5740
1 MyModule 0x97048 block_destroy_helper.26 + 7880
2 AsyncDisplayKit 0x2ee28 -[ASCollectionView collectionView:didSelectItemAtIndexPath:] + 208
3 UIKitCore 0x3006e0 -[UICollectionView _selectItemAtIndexPath:animated:scrollPosition:notifyDelegate:deselectPrevious:performCustomSelectionAction:] + 816
4 UIKitCore 0x54c4d4 -[UICollectionView touchesEnded:withEvent:] + 480
UPDATE
Finally, I can reproduce the crash. But when I reproduce this crash on Debug build, the crash was from my code, and was an Array index out of bound error (as shown below).
Crashed: com.apple.main-thread
0 libswiftCore.dylib 0x32cb4 closure #1 in closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) + 356
1 libswiftCore.dylib 0x32a1c closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) + 192
2 libswiftCore.dylib 0x323bc _assertionFailure(_:_:file:line:flags:) + 228
3 libswiftCore.dylib 0x12274 _ContiguousArrayBuffer.capacity.getter + 274
4 libswiftCore.dylib 0x15d14 Array.subscript.getter + 84
5 MyModule 0x135d08 $s9MyModule16HomeMenuListNodeC010collectionF0_15didSelectItemAtySo012ASCollectionF0C_10Foundation9IndexPathVtF + 872
6 MyModule 0x137d64 $s9MyModule16HomeMenuListNodeC010collectionF0_15didSelectItemAtySo012ASCollectionF0C_10Foundation9IndexPathVtFTo + 136
7 AsyncDisplayKit 0x763a4 -[ASCollectionView collectionView:didSelectItemAtIndexPath:] + 272
8 UIKitCore 0x2f2c64 -[UICollectionView _selectItemAtIndexPath:animated:scrollPosition:notifyDelegate:deselectPrevious:performCustomSelectionAction:] + 1020
9 UIKitCore 0x666864 -[UICollectionView touchesEnded:withEvent:] + 612