Hello,
I have a C# UI Control that allows Google maps to be displayed in a
Windows Form. I am using the WebBrowser control in a secondary thread
to accomplish this. I make several calls to InvokeScript to move,
size, etc. the maps and 99% of the time it works great. However,
occasionally the InvokeScript calls will lock the secondary thread.
This appears to be because of a deadlock in the Google Maps
Javascript. I have added code to my application to abort and restart
the secondary thread, but the thread never actually gets aborted. I
can still see the threads while debugging in the Threads window. I
have a try...catch for the ThreadAbortException in the secondary
thread, but the exception is never thrown. If I call Join() on the
Thread after calling Abort(), the Join() never returns.
I need a way to either call InvokeScript with a timeout or
asynchronously, or kill the thread completely. Any help would be
greatly appreciated.
Thanks,
Josh