New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using invoke on several threads crashes Awesomium #59

Closed
omida86 opened this Issue Jul 6, 2014 · 0 comments

Comments

Projects
None yet
2 participants
@omida86

omida86 commented Jul 6, 2014

public class AwesomiumInvoker
{
    Webview _webView;
    public AwesomiumInvoker() {
       WebCore.QueueWork(() => _webView = WebCore.CreateWebView(640, 480));
       WaitForWebViewCreation(); //Here we validate that the webview is really created.
    }
    public void Navigate(string address)
    {
        _webView.Invoke(new Action<WebView, string>(Navigate), new object[] { _webView, address });
    }

    private void Navigate(WebView webView, string address)
    {
        webView.Source = new Uri(address);
    }
 }

and then two of these:

Task.Factory.StartNew(() =>
{
new AwesomiumInvoker().Navigate("http://www.hotmail.com");
})

Causes:

An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in Unknown Module.

Additional information: Type 'Awesomium.Core.AweInvalidOperationException' in Assembly 'Awesomium.Core, Version=1.7.4.2, Culture=neutral, PublicKeyToken=e1a0d7c8071a5214' is not marked as serializable.

@Perikles Perikles added this to the 1.7.5 milestone Aug 5, 2014

@Perikles Perikles self-assigned this Aug 5, 2014

@Perikles Perikles closed this Mar 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment