不允许在 Web 线程上使用多个锁!请提交错误.现在崩溃 [英] Multiple locks on web thread not allowed! Please file a bug. Crashing now
问题描述
我发出一个 url-Request 并用
i make a url-Request and waiting for the answer with
我开始请求,然后一直等到 synchronousOperationComplete=TRUE
I start the request, then waiting until synchronousOperationComplete=TRUE
NSRunLoop *theRL = [NSRunLoop currentRunLoop];
while (!synchronousOperationComplete && [theRL runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]);
然后我返回响应
似乎一切正常,我得到了响应并且一切正常,但是当我关闭应用程序时我明白了:
all seems to be ok,i get the response and everything is working normal, but when I close the app 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
似乎是 NSRunLoop 导致错误,当我推荐它时,错误不会出现.
it seems to be the NSRunLoop what causes the error, when I commend it out the error doesn't appear.
我使用 IOS 5.0有人知道我可以做些什么来避免这个错误吗?
I use IOS 5.0 does someone have a clue what I can do to avoid this error?
我在 IOS 4.3 和 IOS5 Beta 中使用了它,它运行良好.
i used this in IOS 4.3 and IOS5 Beta and it works fine.
但是我把我的 tomcat6 移到了另一台服务器上,可能是服务器的错误
but i moved my tomcat6 to an other server, maybe it is an error of the server
THXmBax
推荐答案
对我来说,这是一个被添加的视图
For me it was a view that was added on
- (void)applicationDidEnterBackground:(UIApplication *)application{}
我赞扬了它,现在它起作用了!
i commended it out and now it woks!
https://devforums.apple.com/message/575760#575760
如果有人有同样的错误可能会有所帮助
may help if someone has the same error
这篇关于不允许在 Web 线程上使用多个锁!请提交错误.现在崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!