5

My project uses qt webengine. The release version works fine, but debug version crashes very quickly when I navigate tumblr.com. Error message shown as below. I want to know what's this message about, and how to fix it.

Versions:

Qt 5.9.4 - msvc2015-32bit
windows 10

Error output:

[16056:14736:0128/180851.894:WARNING:sqlite_channel_id_store.cc(262)] Server bound cert database is too new.
[16056:14736:0128/180851.894:WARNING:sqlite_channel_id_store.cc(262)] Server bound cert database is too new.
[16056:14736:0128/180851.894:FATAL:sqlite_channel_id_store.cc(203)] Check failed: false. Unable to open cert DB.
Backtrace:
    GetHandleVerifier [0x112471F7+262887]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x1118256B+3003]
    IsSandboxedProcess [0x12D7FBD5+9233173]
    IsSandboxedProcess [0x1496E3C7+38521607]
    QtWebEngineCore::JavaScriptDialogController::qt_static_metacall [0x1091BA15+7234709]
    IsSandboxedProcess [0x143ABE13+32482643]
    IsSandboxedProcess [0x143AEE24+32494948]
    QtWebEngineCore::ColorChooserController::reject [0x101A8DBE+48654]
    GetHandleVerifier [0x112538F4+313828]
    IsSandboxedProcess [0x131BF2E2+13687330]
    QtWebEngineCore::JavaScriptDialogController::qt_static_metacall [0x10242484+52996]
    QtWebEngineCore::JavaScriptDialogController::qt_static_metacall [0x1024259B+53275]
    QtWebEngineCore::JavaScriptDialogController::qt_static_metacall [0x10243EF4+59764]
    QtWebEngineCore::ColorChooserController::reject [0x101A8DBE+48654]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x111CD7C7+310807]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x111CCC83+307923]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x11200659+519337]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x111909EC+61500]
    BaseThreadInitThunk [0x76678654+36]
    RtlGetAppContainerNamedObjectPath [0x77834A77+311]
    RtlGetAppContainerNamedObjectPath [0x77834A47+263]

[16056:14736:0128/180851.894:FATAL:sqlite_channel_id_store.cc(203)] Check failed: false. Unable to open cert DB.
Backtrace:
    GetHandleVerifier [0x112471F7+262887]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x1118256B+3003]
    IsSandboxedProcess [0x12D7FBD5+9233173]
    IsSandboxedProcess [0x1496E3C7+38521607]
    QtWebEngineCore::JavaScriptDialogController::qt_static_metacall [0x1091BA15+7234709]
    IsSandboxedProcess [0x143ABE13+32482643]
    IsSandboxedProcess [0x143AEE24+32494948]
    QtWebEngineCore::ColorChooserController::reject [0x101A8DBE+48654]
    GetHandleVerifier [0x112538F4+313828]
    IsSandboxedProcess [0x131BF2E2+13687330]
    QtWebEngineCore::JavaScriptDialogController::qt_static_metacall [0x10242484+52996]
    QtWebEngineCore::JavaScriptDialogController::qt_static_metacall [0x1024259B+53275]
    QtWebEngineCore::JavaScriptDialogController::qt_static_metacall [0x10243EF4+59764]
    QtWebEngineCore::ColorChooserController::reject [0x101A8DBE+48654]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x111CD7C7+310807]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x111CCC83+307923]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x11200659+519337]
    QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x111909EC+61500]
    BaseThreadInitThunk [0x76678654+36]
    RtlGetAppContainerNamedObjectPath [0x77834A77+311]
    RtlGetAppContainerNamedObjectPath [0x77834A47+263]

The program has unexpectedly finished.
The process was ended forcefully.

WebView initialize:

view_ = new WebView(widget_);
QWebEnginePage *page = new QWebEnginePage(view_);
view_->setPage(page);

page->settings()->setAttribute(QWebEngineSettings::AutoLoadImages, true);
page->settings()->setAttribute(QWebEngineSettings::JavascriptEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, true);
page->settings()->setAttribute(QWebEngineSettings::JavascriptCanAccessClipboard, true);
page->settings()->setAttribute(QWebEngineSettings::LinksIncludedInFocusChain, true);
page->settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true);
page->settings()->setAttribute(QWebEngineSettings::XSSAuditingEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::SpatialNavigationEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, true);
page->settings()->setAttribute(QWebEngineSettings::HyperlinkAuditingEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::ScrollAnimatorEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::ScreenCaptureEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::WebGLEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::Accelerated2dCanvasEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::HyperlinkAuditingEnabled, true);
page->settings()->setAttribute(QWebEngineSettings::AutoLoadIconsForPage, true);
page->settings()->setAttribute(QWebEngineSettings::TouchIconsEnabled, true);

cookie_ = new CookieJar(this); // for cookie sync

page->profile()->setPersistentStoragePath(gVar.getCachePath());
page->profile()->setCachePath(gVar.getCachePath());
page->profile()->setHttpCacheMaximumSize(100 * 1024 * 1024);
page->profile()->setHttpCacheType(QWebEngineProfile::DiskHttpCache);
page->profile()->setHttpUserAgent("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36");
page->profile()->setPersistentCookiesPolicy(QWebEngineProfile::ForcePersistentCookies);

connect(view_->page(), SIGNAL(loadFinished(bool)),
        SLOT(pageLoadFinished()), Qt::QueuedConnection);

QUrl url = QUrl::fromUserInput(kMainPageUrl);
view_->setUrl(url);

WebView is a delegate class, and do nothing:

class WebView : public QWebEngineView
{
    Q_OBJECT
public:
    explicit WebView(QWidget *parent = 0);
};
James Feng
  • 184
  • 1
  • 14
  • Crashes how? What signal (if any)? What does the stacktrace look like? What error message? What does your debugger tell you? What's the expected behaviour (apart from "no crash")? More details please. Also; can you create a [mcve] that we can test for ourselves? – Jesper Juhl Jan 28 '18 at 14:39
  • I use cdb.exe to debug the program. The program crash quickly after load the URL, and just exit, leave some stack trace error message which I pasted in the post. Debugger did not break on any statement. I expect the debug version work normal like release version. The release version won't crash. You're right. I should create a MCVE project. It will be helpful. – James Feng Jan 28 '18 at 15:41

1 Answers1

9
  1. run cmd.exe
  2. cd %AppData%/../Local/qwebengine
  3. rmdir /s QtWebEngine
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
wgm
  • 91
  • 1
  • 2
  • 2
    Welcome to Stack Overflow! Generally, answers are much more helpful if they include an explanation of what the code is intended to do, and why that solves the problem without introducing others. Thanks for improving the answer's reference value and making it more understandable! – Tim Diekmann Jun 23 '18 at 09:43
  • Great! Thanks for the solution. Works for me when I upgrade my project to use a newer Qt 5.12 version and reverted back. The error message `database is too new.` actually gives the hint but I wasn't aware of that. – ZHANG Zikai Apr 11 '19 at 04:29
  • The purpose of this is to clear Application Specific temp files written by the newer version that can't be read by the older version. After going from Qt 5.12 back to 5.9.7, I had to remove the Application Specific WebEngine temp files found at `%AppData%\local\OurCompanyName\OurAppName\QtWebEngine` (Answer was based on this comment: [QtBug-69473-CommentID=412267](https://bugreports.qt.io/browse/QTBUG-69473?focusedCommentId=412267&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-412267) – SteveS Jul 03 '19 at 18:33