apimall / chromiumembedded

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

DevTools shutdown Access Violation #1516

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run cefclient with --remote-debugging-port=YYYY
2. close cefclient

What is the expected output? What do you see instead?
with some probability crash at CefDevToolsDelegate::Stop()

What version of the product are you using? On what operating system?
trunk or 2272

Please provide any additional information below.

stack + fault position
[--------]
libcef.dll!CefDevToolsDelegate::~CefDevToolsDelegate() Line 138 C++
libcef.dll!base::DefaultDeleter<content::DevToolsHttpHandlerDelegate>::operator(
)(content::DevToolsHttpHandlerDelegate * ptr) Line 127  C++
libcef.dll!base::internal::scoped_ptr_impl<content::DevToolsHttpHandlerDelegate,
base::DefaultDeleter<content::DevToolsHttpHandlerDelegate> 
>::~scoped_ptr_impl<content::DevToolsHttpHandlerDelegate,base::DefaultDeleter<co
ntent::DevToolsHttpHandlerDelegate> >() Line 223    C++
libcef.dll!content::`anonymous 
namespace'::DevToolsHttpHandlerImpl::~DevToolsHttpHandlerImpl() Line 514    C++
libcef.dll!base::DefaultDeleter<content::DevToolsHttpHandler>::operator()(conten
t::DevToolsHttpHandler * ptr) Line 127  C++
libcef.dll!base::internal::scoped_ptr_impl<content::DevToolsHttpHandler,base::De
faultDeleter<content::DevToolsHttpHandler> 
>::reset(content::DevToolsHttpHandler * p) Line 248 C++
  void reset(T* p) {
.....
    data_.ptr = nullptr;
    if (old != nullptr)
      static_cast<D&>(data_)(old); <<< calling ~CefDevToolsDelegate()
    data_.ptr = p;   <<< Access Violation cause  devtools_http_handler_ memory was released at ~CefDevToolsDelegate()
  }
libcef.dll!scoped_ptr<content::DevToolsHttpHandler,base::DefaultDeleter<content:
:DevToolsHttpHandler> >::reset(content::DevToolsHttpHandler * p) Line 376   C++
libcef.dll!CefDevToolsDelegate::Stop() Line 144 C++
[--------]

Regression may be introduced at trunk revision 1956 ( 
devtools_http_handler_->Stop(); -> devtools_http_handler_.reset(); )

(To increase AV chance enable MS SDK Application Verifier Heap and Memory 
options)

Original issue reported on code.google.com by ajax16...@gmail.com on 30 Jan 2015 at 8:28

GoogleCodeExporter commented 9 years ago

Original comment by magreenb...@gmail.com on 3 Mar 2015 at 7:06