简体   繁体   中英

Awesomium.net c# accessviolation exception

I'm reading that the application should be build "thread"-safe with Awesomium.net (C#) I'm calling the webView.executeJavascript("") method.. which sometimes crashes with the accessviolation exception.. Probably because it's not thread safe. But I don't know how to make this work. An example would be great.

I've created a thread-safe wrapper for Awesomium. Check out the source code of the class called Browser of that project .

It will give you an idea on how to use Awesomium cross-threaded.

Cheers!

What do you mean "thread safe"?

All calls to Awesomium must be performed from the same thread — UI thread or separate thread (using SynchronizationContext) http://wiki.awesomium.net/general-use/synchronization-model.html in non UI environment. Here is an example https://stackoverflow.com/a/23253942/964478

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM