eo_support wrote:Hi,
EO.WebBrowser is based on Google's Chromium browser engine and it's a huge project. The browser engine does crash sometimes (even Google's Chrome browser crashes sometimes and displays a "Hey Jim he is dead" message). So it is not practical to expect all crashes to be completely elimiated. However we will still do our best to:
...
Thanks
I understand, I didnt mean to be rude or anything.
Anyway I think I found out what my problem was. In my application events get triggered. these Events do the JSInvokeFunction(...)
These events sometimes trigger in quick succesion, all with their own JSInvokeFunction(). The webbrowser apparently interupts the previous JSInvokeFunction() while recieving a new one. (I needed them synchronous without interuption). Sometimes resulting in applying different functionality to the same objects at once. This triggered conflict in the Javascript objects, eventually crashing the webView.
I ended up using a queing system on the JSInvokeFunctions. This way they get called in order without any problems.
So this is what I added to my Class containing the webView:
Code: C#
using System.Collections.Generic;
....
private Queue<Action> queue = new Queue<Action>();
private bool creatinglayer=false;
Then... where events are triggered I use
Code: C#
queue.Enqueue(() =>{
webView.GetDOMWindow().InvokeFunction("InitializeLayer", new object[] {....});
});
ClearQueue();
And finally the function that performs the Actions stored in the queue synchronously.
Code: C#
private void ClearQueue() {
if (clearingQueque == false)
{
clearingQueque = true;
while (queue.Count != 0)
{
Action action = queue.Dequeue();
action();
}
clearingQueque = false;
}
}
Thanks.