Problem description
Time found: 2016-07-06
phenomenon:
1 |
2016-07-06 18:18:42.237 Pudding[5035:1874119] _BSMachError: (os/kern) invalid capability (20) |
description:
UIViewController viewWillAppear and between the console section viewDidAppear following error is thrown, the underlying information, resulting in time-consuming, time-consuming time is about one second and a half.
On the settlement
The reason:
It may be due to the viewWillAppear, viewDidLayoutSubviews, viewDidAppear method code written earlier irregular layer. So I used piecewise log, paragraph by paragraph, write-off method, and found a piece of code in viewWillAppear cause of this error is thrown. Usually still throw an error message when excessive amount of data, subview.
Approach:
View stack overflow on to get the message, see the solution.
The following two methods are available:
(1) async a main, Code
1 |
dispatch_async(dispatch_get_main_queue(), ^{ |
(2) dispatch_after 0.2 seconds to execute code
1 |
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ |
Original: Large column bug record (a)