zhangqd / chromiumembedded

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

Trying to re-initialize after a CefShutdown crashes on windows and mac #1237

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Take the cefclient example and copy paste the code in the main section so 
that the window will respawn once you close it. (I have attached the file for 
OSX to repro the bug, but the same can be done in window)

2. Compile, execute.  The window will appear when you press the close (X) on 
the window a new window will re-appear but it will crash in CefInitialize() or 
CefRunMessageLoop().

What is the expected output? What do you see instead?
I expect it not to crash.  The reason is that in our application we want to the 
browser at startup and then close it, and if the use needs a web window we 
re-create a new browser.

What version of the product are you using? On what operating system?
I have tried on latest and stable 1750, mac 64 bits and windows 64 bits.

Please provide any additional information below.

Original issue reported on code.google.com by l.vo...@gmail.com on 25 Mar 2014 at 10:59

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Addenum: It will assert in CefInitialize in debug (in mac) and crash there, in 
release it will go further up to CefRunMessageLoop() and it will crash in there.

Original comment by l.vo...@gmail.com on 25 Mar 2014 at 11:11

GoogleCodeExporter commented 9 years ago
CefInitialize/CefShutdown cannot be called multiple times in the same process. 
You can create/destroy multiple browser windows without re-initializing CEF.

Original comment by magreenb...@gmail.com on 31 Mar 2014 at 11:55