Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66012

Using custom profile asserts on exit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Duplicate
    • Affects Version/s: 5.10.0, 5.11
    • Fix Version/s: None
    • Component/s: WebEngine
    • Labels:
      None
    • Environment:
      Linux x64

      Description

      Here is an example code to reproduce:

      QWebEngineView *webView = new QWebEngineView(this);
      QWebEngineProfile *profile = new QWebEngineProfile(QStringLiteral("Custom"), this);
      QWebEnginePage *page = new QWebEnginePage(profile, webView);
      webView->setPage(page);
      webView->setHtml(QString("<html><body><h1>webView1</h1></body></html>"));
      //webView->load(QUrl("http://www.google.com"));
      

      The assert differs for regular and data URLs.

      Data URL:

      [5541:5541:0126/093851.645600:FATAL:browser_context.cc(564)] Check failed: !GetUserData(kStoragePartitionMapKeyName). StoragePartitionMap is not shut down properly
      #0 0x7f807874bf9e base::debug::StackTrace::StackTrace()
      #1 0x7f8078749f79 base::debug::StackTrace::StackTrace()
      #2 0x7f80787916fc logging::LogMessage::~LogMessage()
      #3 0x7f8076525106 content::BrowserContext::~BrowserContext()
      #4 0x7f807502d925 QtWebEngineCore::BrowserContextQt::~BrowserContextQt()
      #5 0x7f807502d95f QtWebEngineCore::BrowserContextQt::~BrowserContextQt()
      #6 0x7f807502a203 QtWebEngineCore::BrowserContextAdapter::~BrowserContextAdapter()
      #7 0x7f80843380ad QtSharedPointer::ExternalRefCountWithContiguousData<>::deleter()
      #8 0x7f80750b6f40 QtWebEngineCore::WebContentsAdapterPrivate::~WebContentsAdapterPrivate()
      #9 0x7f80750b6fc9 QtWebEngineCore::WebContentsAdapter::~WebContentsAdapter()
      #10 0x7f808432fa06 QtSharedPointer::ExternalRefCountWithContiguousData<>::deleter()
      #11 0x7f808432c23f QWebEnginePagePrivate::~QWebEnginePagePrivate()
      #12 0x7f808432c2bf QWebEnginePagePrivate::~QWebEnginePagePrivate()
      #13 0x7f808432518a QWebEnginePage::~QWebEnginePage()
      #14 0x7f80843251b3 QWebEnginePage::~QWebEnginePage()
      #15 0x7f807256dffc QObjectPrivate::deleteChildren()
      #16 0x7f80735cc047 QWidget::~QWidget()
      #17 0x7f808433af26 QWebEngineView::~QWebEngineView()
      #18 0x7f808433af37 QWebEngineView::~QWebEngineView()
      #19 0x7f807256dffc QObjectPrivate::deleteChildren()
      #20 0x7f80735cc047 QWidget::~QWidget()
      #21 0x7f80735cc063 QWidget::~QWidget()
      #22 0x7f807256dffc QObjectPrivate::deleteChildren()
      #23 0x7f80735cc047 QWidget::~QWidget()
      #24 0x7f80737066ca QMainWindow::~QMainWindow()
      #25 0x0000004034ae MainWindow::~MainWindow()
      #26 0x0000004030d7 main
      #27 0x7f807171ffe1 __libc_start_main
      #28 0x000000402c6a _start
      

      Regular URL:

      [7269:7269:0126/094250.995959:FATAL:supports_user_data.cc(25)] Check failed: sequence_checker_.CalledOnValidSequence(). 
      #0 0x7f6bbb322f9e base::debug::StackTrace::StackTrace()
      #1 0x7f6bbb320f79 base::debug::StackTrace::StackTrace()
      #2 0x7f6bbb3686fc logging::LogMessage::~LogMessage()
      #3 0x7f6bbb44d7c4 base::SupportsUserData::SetUserData()
      #4 0x7f6bb9cfc114 content::InitializeResourceContext()
      #5 0x7f6bb9f86d9b content::StoragePartitionImplMap::PostCreateInitialization()
      #6 0x7f6bb9f862ff content::StoragePartitionImplMap::Get()
      #7 0x7f6bb90f9da3 content::(anonymous namespace)::GetStoragePartitionFromConfig()
      #8 0x7f6bb90fa8c3 content::BrowserContext::GetStoragePartition()
      #9 0x7f6bb90faa7a content::BrowserContext::GetDefaultStoragePartition()
      #10 0x7f6bb9c12475 content::(anonymous namespace)::ShouldUseSiteProcessTracking()
      #11 0x7f6bb9c124d4 content::(anonymous namespace)::ShouldTrackProcessForSite()
      #12 0x7f6bb9c1a41e content::RenderProcessHostImpl::RemoveFrameWithSite()
      #13 0x7f6bb959e9a7 content::RenderFrameHostImpl::SetLastCommittedSiteUrl()
      #14 0x7f6bb9587488 content::RenderFrameHostImpl::~RenderFrameHostImpl()
      #15 0x7f6bb9587d9e content::RenderFrameHostImpl::~RenderFrameHostImpl()
      #16 0x7f6bb960d8a8 std::default_delete<>::operator()()
      #17 0x7f6bb960b00b std::unique_ptr<>::~unique_ptr()
      #18 0x7f6bb95fda4f content::RenderFrameHostManager::~RenderFrameHostManager()
      #19 0x7f6bb9510d10 content::FrameTreeNode::~FrameTreeNode()
      #20 0x7f6bb9507eed content::FrameTree::~FrameTree()
      #21 0x7f6bb9fdfe58 content::WebContentsImpl::~WebContentsImpl()
      #22 0x7f6bb9fe000c content::WebContentsImpl::~WebContentsImpl()
      #23 0x7f6bb7c8df1e QtWebEngineCore::WebContentsAdapterPrivate::~WebContentsAdapterPrivate()
      #24 0x7f6bb7c8dfc9 QtWebEngineCore::WebContentsAdapter::~WebContentsAdapter()
      #25 0x7f6bc6f06a06 QtSharedPointer::ExternalRefCountWithContiguousData<>::deleter()
      #26 0x7f6bc6f0323f QWebEnginePagePrivate::~QWebEnginePagePrivate()
      #27 0x7f6bc6f032bf QWebEnginePagePrivate::~QWebEnginePagePrivate()
      #28 0x7f6bc6efc18a QWebEnginePage::~QWebEnginePage()
      #29 0x7f6bc6efc1b3 QWebEnginePage::~QWebEnginePage()
      #30 0x7f6bb5144ffc QObjectPrivate::deleteChildren()
      #31 0x7f6bb61a3047 QWidget::~QWidget()
      #32 0x7f6bc6f11f26 QWebEngineView::~QWebEngineView()
      #33 0x7f6bc6f11f37 QWebEngineView::~QWebEngineView()
      #34 0x7f6bb5144ffc QObjectPrivate::deleteChildren()
      #35 0x7f6bb61a3047 QWidget::~QWidget()
      #36 0x7f6bb61a3063 QWidget::~QWidget()
      #37 0x7f6bb5144ffc QObjectPrivate::deleteChildren()
      #38 0x7f6bb61a3047 QWidget::~QWidget()
      #39 0x7f6bb62dd6ca QMainWindow::~QMainWindow()
      #40 0x0000004034c6 MainWindow::~MainWindow()
      #41 0x0000004030ef main
      #42 0x7f6bb42f6fe1 __libc_start_main
      #43 0x000000402c7a _start
      

      I assume the causes of the 2 asserts are the same: WebContentsImpl is destructed after calling BrowserContext::ShutdownStoragePartitions(). Destruction of WebContentsImpl results calling BrowserContext::GetDefaultStoragePartition() which creates a new default storage partition if it doesn't not exist. After shutting down the browser context this is avoidable.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                michal Michal Klocek
                Reporter:
                pvarga Peter Varga
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes