Multiple blocking in the web stream is not allowed! Please indicate a mistake. Crash now

I am creating url-Request and am waiting for a response with

I run a query and then wait while synchronOperationComplete = TRUE

NSRunLoop *theRL = [NSRunLoop currentRunLoop]; while (!synchronousOperationComplete && [theRL runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]); 

then I return the answer

Everything seems to be in order, I get the answer, and everything works fine, but when I close the application I get:

 bool _WebTryThreadLock(bool), 0x227f40: Multiple locks on web thread not allowed! Please file a bug. Crashing now... 1 _ZL17_WebTryThreadLockb 2 _ZL14WebRunLoopLockP19__CFRunLoopObservermPv 3 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 4 __CFRunLoopDoObservers 5 __CFRunLoopRun 6 CFRunLoopRunSpecific 7 CFRunLoopRunInMode 8 _ZL12RunWebThreadPv 9 _pthread_start 10 thread_start 

It seems that NSRunLoop is causing the error, when I express my appreciation, the error does not appear.

I am using iOS 5.0, does anyone know what I can do to avoid this error?

I used this on iOS 4.3 and iOS5 Beta and it works great.

but I moved my tomcat6 to another server, maybe this is a server error

thanks mBax

+6
source share
3 answers

For me, it was a view that was added to

 - (void)applicationDidEnterBackground:(UIApplication *)application{} 

i praised him and now he woks!

https://devforums.apple.com/message/575760#575760

may help if someone has the same error

0
source

I just had the same error message, but I tried to call stringByEvaluatingJavaScript on a web screen that was not on the screen.

In general, this message suggests that something is trying to access an element (UIWebView), while a specific thread of this element is blocked.

+3
source

If you used the following code:

[[NSRunLoop currentRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 2.0]];

Delete it if not necessary, or reduce the time interval. It worked for me.

+2
source

Source: https://habr.com/ru/post/900940/


All Articles