Tried to obtain the web lock from a thread other than the main thread or the web thread. Crashing now
By : Soumya Brata
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , bool _WebTryThreadLock(bool), 0x8053ce0: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now... code :
This may be a result of calling to UIKit from a secondary thread. Crashing now...
[[alertProgress dd_invokeOnMainThread] dismissWithClickedButtonIndex:0
animated:YES];
|
GCD ERROR :Tried to obtain the web lock from a thread other than the main thread or the web thread
By : Antonio
Date : March 29 2020, 07:55 AM
it helps some times Your error tells you exactly what your problem is This may be a result of calling to UIKit from a secondary thread. In your createWebView method you make calls to UIKit. This isn't allowed when you aren't running on the main thread and in this code example you call that method from another thread. Why not move the call to that method into the dispatch that is on the main thread? code :
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSString *prePath = [[spineArray objectAtIndex:spineIndex - 1] spinePath];
NSURL *preURL = [NSURL fileURLWithPath:prePath];
dispatch_async(dispatch_get_main_queue(), ^{
UIWebView *tmpWebView = [self createWebView:preURL];
self.preWebView = tmpWebView;
});
});
|
How to obtain the JVM thread name/id through the known PID/TID
By : systemadmin
Date : March 29 2020, 07:55 AM
I hope this helps . Yesterday we had a weird problem with our tomcat 6 server which is running on Debian: We had second long freezes/outages that increased in length over time. In the frozen periods all our independent web apps were unresponsive. The outages had a very high regularity and over the course of one hour the outage phases became longer than the active phases, until we restarted the server which solved the problem. Now we want to find out what it was or find a solution to find out what it is if it happens again! , Use jstack code :
"Thread-0" prio=10 tid=0x00002aaab01c3800 nid=0x246d runnable [0x00000000423c7000]
^ name ^ Java thread id ^ native (OS) thread id
|
How to obtain thread name in android ndk
By : Joe Zhou
Date : March 29 2020, 07:55 AM
I hope this helps . You can see how Dalvik sets them in dalvik/vm/Thread.cpp. It uses pthread_setname_np() if available, prctl(PR_SET_NAME) if not. So if pthread_getname_np() isn't available -- and bear in mind that "np" means "non-portable" -- you can use prctl(PR_GET_NAME) to get a 16-byte null-terminated string under Linux. You can find other bits by fishing around in /proc entries.
|
Obtain thread handle from thread id of ANOTHER process
By : WaaDaaFaak
Date : March 29 2020, 07:55 AM
This might help you Whoops, I'm an idiot. OpenThread works for all processes apparently, I thought it didn't because it doesn't accept a process ID/handle. So I was looking and thinking in all the wrong places.
|