Reputation: 33080
void _WebThreadLockFromAnyThread(bool), 0x205acdf0: Obtaining the web lock from a thread other than the main thread or the web thread. UIKit should not be called from a secondary thread.
This look serious. I want the program to break at that point. I do not feel I access UIKit anywhere from outside the main thread.
However, the warning is just there and I don't know where in my code that happens
Upvotes: 0
Views: 163
Reputation: 85985
This means your code is called from non-main thread at some point. The problem is you don't remember or don't know where. You just feel you didn't but actually your code does.
My recommendation is heavy dynamic assertion. Install thread-check assertion on every suspicious methods and functions. For example,
- (void)test
{
NSAssert([[NSThread currentThread] isMainThread], @"This code is expected to be called from main thread!");
}
And then the assertion will eventually make your app to crash on invalid thread context. If you're not that lucky, you may install the assertion on every method literally.
Anyway once you got the assertion failure, you can start at there. And if you found the bad point, following steps are just trivial.
Upvotes: 2