Comments (6)
Yeah, good find. We should probably block JS execution once Dispose begins.
On , Jack O'Connor
[email protected]
wrote:
> CefSharp.dll!CefSharp::ScriptCore::UIT_Execute(CefRefPtr* browser, CefStringBase* script) Line 10 C++ [External Code] CefSharp.dll!DispatchToMethod,CefStringBase),CefRefPtr,CefStringBase >(CefSharp::ScriptCore* obj, void* method, Tuple2,CefStringBase >& arg) Line 592 C++ CefSharp.dll!CefRunnableMethod,CefStringBase),Tuple2,CefStringBase > >::Execute(cef_thread_id_t threadId) Line 151 C++ [External Code]
This occurs when an ExecuteScript call is made right before the app
exits, so presumably the WinForms browser is getting disposed out from
under us. Is there a good way to protect ourselves from this error?
Alternatively, should we do something like check for null here in
UIT_Execute?
Reply to this email directly or view it on GitHub:
from cefsharp.
On second though, we probably need something more similar to the TryGetCefBrowser() pattern used within the WebView classes:
https://github.com/ataranto/CefSharp/blob/master/CefSharp.Wpf/WebView.cpp#L42
from cefsharp.
Working from your suggestion, this looks like it solves the problem. How does it look to you?
https://github.com/oconnor663/CefSharp/commit/e595b4ff1dccc73d90ad24cdf96b291fb7e13d9c
from cefsharp.
Yeah, looks great. I may try to make a general TryGet* internal api. Also, I might make Evaluate throw an exception, which right now is how consumers are notified that "your script didn't run successfully" .
from cefsharp.
Do you want to merge the diff as it is now, or make changes first?
from cefsharp.
I will probably merge it as is for now. I want to make some time this weekend to merge in a bunch of contributions and make a release, there are lots of great changes/fixes that are only on other people's branches right now, so i want to get them merged before there's more fragmentation.
from cefsharp.
Related Issues (20)
- Failure in designer HOT 4
- Windows Forms webview sometimes does not show HOT 1
- CefSharp with cef_binary_3.1180.823 HOT 1
- When WPF WebView is removed from one window and added to another, keyboard input is lost.
- Wpf Example crashes on Resize (on Windows 8) HOT 1
- CefSharp WPF control crashes when interacting with HTML drop down lists (HTML select tag) HOT 1
- add CefZoomHandler bindings
- Feature: Allow user to specify library folder
- Bind CefProxyHandler HOT 3
- Cef can‘t complied for X64 HOT 4
- Provide a strong-named assembly for tagged releases HOT 1
- Body of request in custom scheme handler HOT 3
- Requires .Net 3.5 HOT 2
- WPF Tool Tip displays when mouse is out of the web view
- Async scheme handlers
- [closed]
- Certain cursors don't work HOT 2
- Support multiple AppDomains HOT 1
- In Cefsharp - Jquerymobile design in cefsharp select control issue
- I want to kown why I Run this demo in VS 2010,it does not work!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cefsharp.