Details
Description
Tested with demobrowser. The browser crashes when switching to private browsing mode. Most probably this is caused by a double free of the old QWebEnginePage.
Fixing the double free leads to an assert on exit:
[8201:8201:0725/173652.089789:FATAL:background_sync_context.cc(24)] Check failed: !background_sync_manager_. #0 0x7fbecf63ed0d base::debug::StackTrace::StackTrace() #1 0x7fbecf676f25 logging::LogMessage::~LogMessage() #2 0x7fbecdb3c1f4 content::BackgroundSyncContext::~BackgroundSyncContext() #3 0x7fbecdb3c314 content::BackgroundSyncContext::~BackgroundSyncContext() #4 0x7fbecdb41d47 base::RefCountedThreadSafe<>::DeleteInternal() #5 0x7fbecdb41c84 base::DefaultRefCountedThreadSafeTraits<>::Destruct() #6 0x7fbecdb41ace base::RefCountedThreadSafe<>::Release() #7 0x7fbecdb41640 scoped_refptr<>::Release() #8 0x7fbecdb40f53 scoped_refptr<>::~scoped_refptr() #9 0x7fbece8be492 content::StoragePartitionImpl::~StoragePartitionImpl() #10 0x7fbece8be5b6 content::StoragePartitionImpl::~StoragePartitionImpl() #11 0x7fbece8d6aae std::default_delete<>::operator()() #12 0x7fbece8d4cc9 std::unique_ptr<>::~unique_ptr() #13 0x7fbece8df478 std::pair<>::~pair() #14 0x7fbece8df4a4 __gnu_cxx::new_allocator<>::destroy<>() #15 0x7fbece8ddacd std::allocator_traits<>::destroy<>() #16 0x7fbece8da78b std::_Rb_tree<>::_M_destroy_node() #17 0x7fbece8d83f7 std::_Rb_tree<>::_M_drop_node() #18 0x7fbece8d6610 std::_Rb_tree<>::_M_erase() #19 0x7fbece8d48f6 std::_Rb_tree<>::~_Rb_tree() #20 0x7fbece8d3a5e std::__cxx1998::map<>::~map() #21 0x7fbece8d3aaa std::__debug::map<>::~map() #22 0x7fbece8d19b2 content::StoragePartitionImplMap::~StoragePartitionImplMap() #23 0x7fbece8d19ea content::StoragePartitionImplMap::~StoragePartitionImplMap() #24 0x7fbecf755814 std::default_delete<>::operator()() #25 0x7fbecf755047 std::unique_ptr<>::~unique_ptr() #26 0x7fbecf757546 std::pair<>::~pair() #27 0x7fbecf757566 __gnu_cxx::new_allocator<>::destroy<>() #28 0x7fbecf75735a std::allocator_traits<>::destroy<>() #29 0x7fbecf756b19 std::_Rb_tree<>::_M_destroy_node() #30 0x7fbecf755cbb std::_Rb_tree<>::_M_drop_node() #31 0x7fbecf75719e std::_Rb_tree<>::_M_erase_aux() #32 0x7fbecf756690 _ZNSt8_Rb_treeIPKvSt4pairIKS1_St10unique_ptrIN4base16SupportsUserData4DataESt14default_deleteIS7_EEESt10_Select1stISB_ESt4lessIS1_ESaISB_EE5eraseB5cxx11ESt17_Rb_tree_iteratorISB_E #33 0x7fbecf755aad _ZNSt9__cxx19983mapIPKvSt10unique_ptrIN4base16SupportsUserData4DataESt14default_deleteIS6_EESt4lessIS2_ESaISt4pairIKS2_S9_EEE5eraseB5cxx11ESt17_Rb_tree_iteratorISE_E #34 0x7fbecf755169 std::__debug::map<>::erase() #35 0x7fbecf7547ff base::SupportsUserData::RemoveUserData() #36 0x7fbecdbff2f2 content::BrowserContext::ShutdownStoragePartitions() #37 0x7fbecd549dc7 QtWebEngineCore::BrowserContextAdapter::~BrowserContextAdapter() #38 0x7fbedf4740eb QtSharedPointer::ExternalRefCountWithContiguousData<>::deleter() #39 0x7fbedf46d5d6 QWebEngineProfilePrivate::~QWebEngineProfilePrivate() #40 0x7fbedf46d631 QWebEngineProfilePrivate::~QWebEngineProfilePrivate() #41 0x7fbedf46b979 QWebEngineProfile::~QWebEngineProfile() #42 0x7fbedf46b98d QWebEngineProfile::~QWebEngineProfile() #43 0x7fbecab4ea13 QObjectPrivate::deleteChildren() #44 0x7fbecab4fd95 QObject::~QObject() #45 0x7fbecab1e8f0 QCoreApplication::~QCoreApplication() #46 0x7fbecb5adfe7 QGuiApplication::~QGuiApplication() #47 0x7fbecbb7df0a QApplication::~QApplication() #48 0x000000439264 BrowserApplication::~BrowserApplication() #49 0x0000004770ae main #50 0x7fbec99e71e0 __libc_start_main #51 0x0000004306da _start