capi cef_shutdown cause a breakpoint exception on windows
Posted: Mon May 24, 2021 7:59 am
Capi cef_shutdown cause a breakpoint exception on windows.
I have reproduced the problem with https://github.com/turutcrane/cefcapi-simple-win.
This repository is a Visual Studio 2019 solution build with capi code of https://github.com/cztomczak/cefcapi.
With libraries in the Release directory of the spotify build cef_binary_88.2.9+g5c8711a+chromium-88.0.4324.182_windows64,
this solution work fine.
But with libraries in the Release directory of the cef_binary_89.0.18+gb36241d+chromium-89.0.4389.114_windows64.tar.bz2,
this solution cause a breakpoint excepition in cef_shutdown on clicking the close window button.
Stack trace of Chrome_IOThread is here
And with libraries in the Debug directory of recent builds, when the close window button, a breakpoint exception has triggerd in cef_shutdown with the following message.
I have reproduced the problem with https://github.com/turutcrane/cefcapi-simple-win.
This repository is a Visual Studio 2019 solution build with capi code of https://github.com/cztomczak/cefcapi.
With libraries in the Release directory of the spotify build cef_binary_88.2.9+g5c8711a+chromium-88.0.4324.182_windows64,
this solution work fine.
But with libraries in the Release directory of the cef_binary_89.0.18+gb36241d+chromium-89.0.4389.114_windows64.tar.bz2,
this solution cause a breakpoint excepition in cef_shutdown on clicking the close window button.
Stack trace of Chrome_IOThread is here
- Code: Select all
Not Flagged > 348 0 Worker Thread Chrome_IOThread libcef.dll!base::SequencedTaskRunnerHandle::Get
libcef.dll!base::SequencedTaskRunnerHandle::Get() Line 26
[Inline Frame] libcef.dll!storage::`anonymous namespace'::MakeDeferredDeleter(std::__1::unique_ptr<storage::LocalStorageImpl,std::default_delete<storage::LocalStorageImpl>> object) Line 29
[Inline Frame] libcef.dll!storage::`anonymous namespace'::ShutDown(std::__1::unique_ptr<storage::LocalStorageImpl,std::default_delete<storage::LocalStorageImpl>> object) Line 44
libcef.dll!storage::PartitionImpl::~PartitionImpl() Line 57
libcef.dll!storage::PartitionImpl::~PartitionImpl() Line 56
[Inline Frame] libcef.dll!std::__1::default_delete<content::OneShotBackgroundSyncServiceImpl>::operator()(content::OneShotBackgroundSyncServiceImpl * __ptr) Line 2378
[Inline Frame] libcef.dll!std::__1::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>>::reset(content::OneShotBackgroundSyncServiceImpl * __p) Line 2633
[Inline Frame] libcef.dll!std::__1::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>>::~unique_ptr() Line 2587
[Inline Frame] libcef.dll!std::__1::allocator_traits<std::allocator<std::__tree_node<std::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>>,void *>>>::__destroy(std::__1::integral_constant<bool,0>, std::__1::allocator<std::__tree_node<std::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>>,void *>> &, std::__1::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>> * __p) Line 1787
[Inline Frame] libcef.dll!std::__1::allocator_traits<std::allocator<std::__tree_node<std::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>>,void *>>>::destroy(std::__1::allocator<std::__tree_node<std::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>>,void *>> & __a, std::__1::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>> * __p) Line 1619
libcef.dll!std::__1::__tree<std::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>>,base::UniquePtrComparator,std::allocator<std::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>>>>::destroy(std::__1::__tree_node<std::unique_ptr<content::OneShotBackgroundSyncServiceImpl,std::default_delete<content::OneShotBackgroundSyncServiceImpl>>,void *> * __nd) Line 1834
[Inline Frame] libcef.dll!std::__1::__tree<std::unique_ptr<storage::PartitionImpl,std::default_delete<storage::PartitionImpl>>,base::UniquePtrComparator,std::allocator<std::unique_ptr<storage::PartitionImpl,std::default_delete<storage::PartitionImpl>>>>::~__tree() Line 1821
[Inline Frame] libcef.dll!std::__1::set<std::unique_ptr<storage::PartitionImpl,std::default_delete<storage::PartitionImpl>>,base::UniquePtrComparator,std::allocator<std::unique_ptr<storage::PartitionImpl,std::default_delete<storage::PartitionImpl>>>>::~set() Line 603
libcef.dll!storage::StorageServiceImpl::~StorageServiceImpl() Line 58
libcef.dll!storage::StorageServiceImpl::~StorageServiceImpl() Line 58
[Inline Frame] libcef.dll!std::__1::default_delete<device::DeviceService>::operator()(device::DeviceService * __ptr) Line 2378
[Inline Frame] libcef.dll!std::__1::unique_ptr<device::DeviceService,std::default_delete<device::DeviceService>>::reset(device::DeviceService * __p) Line 2633
[Inline Frame] libcef.dll!std::__1::unique_ptr<device::DeviceService,std::default_delete<device::DeviceService>>::~unique_ptr() Line 2587
libcef.dll!std::__1::default_delete<std::unique_ptr<device::DeviceService,std::default_delete<device::DeviceService>>>::operator()(std::__1::unique_ptr<device::DeviceService,std::default_delete<device::DeviceService>> * __ptr) Line 2378
[Inline Frame] libcef.dll!base::SequenceLocalStorageSlot<std::unique_ptr<device::DeviceService,std::default_delete<device::DeviceService>>,std::default_delete<std::unique_ptr<device::DeviceService,std::default_delete<device::DeviceService>>>>::Adopt::<unnamed-tag>::operator()(void * ptr) Line 110
libcef.dll!base::SequenceLocalStorageSlot<std::unique_ptr<device::DeviceService,std::default_delete<device::DeviceService>>,std::default_delete<std::unique_ptr<device::DeviceService,std::default_delete<device::DeviceService>>>>::Adopt::<unnamed-tag>::__invoke(void * ptr) Line 110
[Inline Frame] libcef.dll!base::internal::SequenceLocalStorageMap::ValueDestructorPair::~ValueDestructorPair() Line 79
[Inline Frame] libcef.dll!std::__1::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>::~pair() Line 297
[Inline Frame] libcef.dll!std::__1::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>>::destroy(std::__1::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair> * __p) Line 1920
[Inline Frame] libcef.dll!std::__1::allocator_traits<std::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>>>::__destroy(std::__1::integral_constant<bool,1>, std::__1::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>> & __a, std::__1::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair> * __p) Line 1782
[Inline Frame] libcef.dll!std::__1::allocator_traits<std::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>>>::destroy(std::__1::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>> & __a, std::__1::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair> * __p) Line 1619
[Inline Frame] libcef.dll!std::__1::__vector_base<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>,std::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>>>::__destruct_at_end(std::__1::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair> * __new_last) Line 426
[Inline Frame] libcef.dll!std::__1::__vector_base<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>,std::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>>>::clear() Line 369
[Inline Frame] libcef.dll!std::__1::__vector_base<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>,std::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>>>::~__vector_base() Line 463
[Inline Frame] libcef.dll!std::__1::vector<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>,std::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>>>::~vector() Line 555
[Inline Frame] libcef.dll!base::internal::flat_tree<int,base::internal::GetFirst,std::less<void>,std::vector<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>,std::allocator<std::pair<int,base::internal::SequenceLocalStorageMap::ValueDestructorPair>>>>::~flat_tree() Line 222
libcef.dll!base::internal::SequenceLocalStorageMap::~SequenceLocalStorageMap() Line 23
libcef.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::~ThreadControllerWithMessagePumpImpl() Line 61
libcef.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::~ThreadControllerWithMessagePumpImpl() Line 56
[Inline Frame] libcef.dll!std::__1::default_delete<base::sequence_manager::internal::ThreadController>::operator()(base::sequence_manager::internal::ThreadController * __ptr) Line 2378
[Inline Frame] libcef.dll!std::__1::unique_ptr<base::sequence_manager::internal::ThreadController,std::default_delete<base::sequence_manager::internal::ThreadController>>::reset(base::sequence_manager::internal::ThreadController * __p) Line 2633
[Inline Frame] libcef.dll!std::__1::unique_ptr<base::sequence_manager::internal::ThreadController,std::default_delete<base::sequence_manager::internal::ThreadController>>::~unique_ptr() Line 2587
libcef.dll!base::sequence_manager::internal::SequenceManagerImpl::~SequenceManagerImpl() Line 258
libcef.dll!base::sequence_manager::internal::SequenceManagerImpl::~SequenceManagerImpl() Line 212
libcef.dll!content::BrowserIOThreadDelegate::~BrowserIOThreadDelegate() Line 92
[Inline Frame] libcef.dll!std::__1::default_delete<base::Thread::Delegate>::operator()(base::Thread::Delegate * __ptr) Line 2378
[Inline Frame] libcef.dll!std::__1::unique_ptr<base::Thread::Delegate,std::default_delete<base::Thread::Delegate>>::reset(base::Thread::Delegate * __p) Line 2633
libcef.dll!base::Thread::ThreadMain() Line 401
libcef.dll!base::`anonymous namespace'::ThreadFunc(void * params) Line 103
[External Code]
And with libraries in the Debug directory of recent builds, when the close window button, a breakpoint exception has triggerd in cef_shutdown with the following message.
- Code: Select all
[0519/214655.818:FATAL:alloy_browser_main.cc(221)] Check failed: global_request_context_->HasOneRef().
cefcapi-simple.exe has triggered a breakpoint.