| Summary: | konqueror crash on shutdown | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | Johannes Hirte <johannes.hirte> |
| Component: | webenginepart | Assignee: | Konqueror Bugs <konqueror-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | elvis.angelaccio, fernando.romero.wrk, jjm, jsardid, opensuse |
| Priority: | NOR | ||
| Version First Reported In: | Git | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://commits.kde.org/konqueror/ce61f5132a6de0e13cba54a687853a40e3006f05 | Version Fixed/Implemented In: | 19.04.3 |
| Sentry Crash Report: | |||
| Attachments: | full crash log | ||
|
Description
Johannes Hirte
2019-05-12 10:46:41 UTC
Created attachment 120004 [details]
full crash log
workaround: disabling Synchronize cookies between QWebEngine and KCookieServer
diff --git a/webenginepart/src/webenginepart.cpp b/webenginepart/src/webenginepart.cpp
index bfd16ff4a..eaadda781 100644
--- a/webenginepart/src/webenginepart.cpp
+++ b/webenginepart/src/webenginepart.cpp
@@ -95,7 +95,7 @@ WebEnginePart::WebEnginePart(QWidget *parentWidget, QObject *parent,
prof->installUrlSchemeHandler("error", new WebEnginePartErrorSchemeHandler(prof));
prof->installUrlSchemeHandler("help", new WebEnginePartKIOHandler(prof));
}
- static WebEnginePartCookieJar s_cookieJar(prof, prof);
+// static WebEnginePartCookieJar s_cookieJar(prof, prof);
KAboutData about = KAboutData(QStringLiteral("webenginepart"),
i18nc("Program Name", "WebEnginePart"),
/*version*/ QStringLiteral("1.3.0"),
maybe someone with more knowledge of this code can explain, why this segfauls when the destructor is called
This can't work. s_cookieJar is declared static, but QWebEngineProfile *prof is set as parent QObject, that will try to delete it on shutdown. Following patch fixed it for me:
diff --git a/webenginepart/src/webenginepart.cpp b/webenginepart/src/webenginepart.cpp
index bfd16ff4a..eaadda781 100644
--- a/webenginepart/src/webenginepart.cpp
+++ b/webenginepart/src/webenginepart.cpp
@@ -95,7 +95,7 @@ WebEnginePart::WebEnginePart(QWidget *parentWidget, QObject *parent,
prof->installUrlSchemeHandler("error", new WebEnginePartErrorSchemeHandler(prof));
prof->installUrlSchemeHandler("help", new WebEnginePartKIOHandler(prof));
}
- static WebEnginePartCookieJar s_cookieJar(prof, prof);
+ static WebEnginePartCookieJar s_cookieJar(prof, nullptr);
KAboutData about = KAboutData(QStringLiteral("webenginepart"),
i18nc("Program Name", "WebEnginePart"),
/*version*/ QStringLiteral("1.3.0"),
added review request https://phabricator.kde.org/D21562 *** Bug 408428 has been marked as a duplicate of this bug. *** How do you apply the patch? *** Bug 408622 has been marked as a duplicate of this bug. *** (In reply to Johannes Hirte from comment #3) > This can't work. s_cookieJar is declared static, but QWebEngineProfile *prof > is set as parent QObject, that will try to delete it on shutdown. Following > patch fixed it for me: > > diff --git a/webenginepart/src/webenginepart.cpp > b/webenginepart/src/webenginepart.cpp > index bfd16ff4a..eaadda781 100644 > --- a/webenginepart/src/webenginepart.cpp > +++ b/webenginepart/src/webenginepart.cpp > @@ -95,7 +95,7 @@ WebEnginePart::WebEnginePart(QWidget *parentWidget, > QObject *parent, > prof->installUrlSchemeHandler("error", new > WebEnginePartErrorSchemeHandler(prof)); > prof->installUrlSchemeHandler("help", new > WebEnginePartKIOHandler(prof)); > } > - static WebEnginePartCookieJar s_cookieJar(prof, prof); > + static WebEnginePartCookieJar s_cookieJar(prof, nullptr); > KAboutData about = KAboutData(QStringLiteral("webenginepart"), > i18nc("Program Name", "WebEnginePart"), > /*version*/ QStringLiteral("1.3.0"), This worked for me Git commit ce61f5132a6de0e13cba54a687853a40e3006f05 by Elvis Angelaccio, on behalf of Johannes Hirte.
Committed on 30/06/2019 at 20:09.
Pushed by elvisangelaccio into branch 'Applications/19.04'.
fix crash in webenginepart on konqueror shutdown
Summary:
konqueror crashes on shutdown in webenginepart.
We fix this by not setting
QWebEngineProfile *prof = QWebEngineProfile::defaultProfile();
as parent of s_cookieJar.
FIXED-IN: 19.04.3
see also https://bugs.kde.org/show_bug.cgi?id=407454
Test Plan: start and shutdown konqueror without crash
Reviewers: #konqueror, dfaure
Reviewed By: #konqueror, dfaure
Subscribers: cfeck, anthonyfieroni
Differential Revision: https://phabricator.kde.org/D21562
M +1 -1 webenginepart/src/webenginepart.cpp
https://commits.kde.org/konqueror/ce61f5132a6de0e13cba54a687853a40e3006f05
*** Bug 409833 has been marked as a duplicate of this bug. *** |