zhangqd / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
0 stars 1 forks source link

Asynchronous requests using jQuery crash CEF1 (python CEF) #1227

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up a local test web server
2. Set up a test page (e.g. index.html) and include jQuery and a function which 
runs on DOM ready
2. Navigate your CEF app to index.html on this server
3. Make sure the on DOM ready function makes at least 100 asynchronous GET 
requests to another resource (e.g. all you have to do is GET /index.html over 
and over again)

What is the expected output? What do you see instead?
All 100 requests complete in the background without freezing the page. What I 
see instead is the entire CEF application crash, nothing in any of the logs or 
in the event logs (using Windows).

What version of the product are you using? On what operating system?
cefpython bindings using libcef.dll 1.1453.1273.

Please provide any additional information below.
If I set async to false in my $.ajax() call then the app remains open, however 
the UI is frozen until all requests complete.

Original issue reported on code.google.com by cstoy...@gmail.com on 11 Mar 2014 at 5:47

GoogleCodeExporter commented 9 years ago
Does this issue also occur in CEF 3?

Original comment by czarek.t...@gmail.com on 11 Mar 2014 at 2:53

GoogleCodeExporter commented 9 years ago
I'm not sure, it will require me swapping out the python bindings and 
re-building the app. I'll need to find some time to try that out.

I've done some more investigation and it appears that the requests are never 
returning (the success or error handlers are not being called on the jqXHR 
object inside jQuery). I assume the request queue is therefore filling up 
causing cef to crash.

The fact that the requests do return 200 OK if I call the web service 
synchronously is strange. It's only when jQuery is making a request 
asynchronously that I get no response. I think this rules out the web server as 
the problem.

Original comment by cstoy...@gmail.com on 13 Mar 2014 at 1:33

GoogleCodeExporter commented 9 years ago
CEF1 is no longer developed or supported. Use CEF3 instead.

Original comment by magreenb...@gmail.com on 13 Mar 2014 at 9:46