Summary: | Crash when clicking [Settings -> Configure Chat Application...] version 17.12.2 | ||
---|---|---|---|
Product: | [Unmaintained] telepathy | Reporter: | CapSel <kdebugs> |
Component: | text-ui | Assignee: | Telepathy Bugs <kde-telepathy-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | danjaredg, eugene.shalygin+bugzilla.kde, kdebugs, lalochcz, maxim.stargazer, mdavidbennett |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | Future | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | 0001-app-Fix-crash-while-displaying-Settings-dialog.patch |
Description
CapSel
2018-02-23 18:52:12 UTC
Confirm this bug on Arch Linux, on fresh built from git master. Crashes every time. Created attachment 111119 [details]
0001-app-Fix-crash-while-displaying-Settings-dialog.patch
The crash is due to the fact that the KPageWidgetItem does no longer hold a reference to KCModuleProxy instance. The KCModuleProxy instance is rather wrapped in a QScrollArea instance.
Tentative patch attached.
@CapSel: Could you please check whether the attached patch fixes the bug for you? If it does, I'll post it to Phabricator for review, commit it and close the bug eventually. Thanks. Your patch works. Thank You! (In reply to David Strobach from comment #3) Thanks for the patch! Could you, please, look into ktp-log-viewer too? It crashes in the very same way. Thanks for the fix, David. Was the patch already added to Phabricator? > Thanks for the fix, David. Was the patch already added to Phabricator?
Hi Christoph, no, unfortunately not yet. I somehow can't digest the idea, that the change my patch does is the right(TM) way to integrate KCMs after the recent KCM refactoring. I would like to first check other KDE projects to see how they made their way through the KCM refactoring before submitting the fix. I expect to be able to move ahead during this week.
Fixed by commits d55f70722af76015dd79b278618fdbf9972c29ff 0862d220c9042baa25200b0e178cc9ce44525a13 I use KdeNEON and it is frustrating that this package is not updated, to avoid this error, along with the text-ui viewer, I run the following script. apt install pidgin-sipe kde-telepathy # (you need activate "dep-src" en /etc/apt/source.list) mkdir ktp-text-ui-fix cd ktp-text-ui-fix apt install build-essential devscripts apt source kde-telepathy-text-ui apt build-dep kde-telepathy-text-ui cd ktp-text-ui-* patch -p1 << "EOF" --- a/lib/adium-theme-view.cpp +++ b/lib/adium-theme-view.cpp @@ -68,6 +68,8 @@ bool AdiumThemePage::acceptNavigationRequest(const QUrl &url, QWebEnginePage::Na Q_EMIT nextConversation(); } else if (url.fragment() == QLatin1String("x-prevConversation")) { Q_EMIT prevConversation(); + } else if (url.scheme() == QLatin1String("data")) { + return true; } else { QDesktopServices::openUrl(url); } EOF patch -p1 << "EOF" --- a/app/chat-window.cpp +++ b/app/chat-window.cpp @@ -53,6 +53,7 @@ #include <QLabel> #include <QLineEdit> #include <QMouseEvent> +#include <QScrollArea> #include <TelepathyQt/Account> #include <TelepathyQt/ContactCapabilities> @@ -760,7 +761,9 @@ void ChatWindow::showSettingsDialog() KSettings::Dialog *dialog = new KSettings::Dialog(this); KPageWidgetItem *configPage = dialog->addModule(QLatin1String("kcm_ktp_chat_appearance")); - KCModuleProxy *proxy = qobject_cast<KCModuleProxy*>(configPage->widget()); + QScrollArea *moduleScroll = qobject_cast<QScrollArea*>(configPage->widget()); + Q_ASSERT(moduleScroll); + KCModuleProxy *proxy = qobject_cast<KCModuleProxy*>(moduleScroll->widget()); Q_ASSERT(proxy); connect(proxy->realModule(), SIGNAL(reloadTheme()), @@ -770,7 +773,9 @@ void ChatWindow::showSettingsDialog() dialog->addModule(QLatin1String("kcm_ktp_chat_messages")); KPageWidgetItem *otrConfigPage = dialog->addModule(QLatin1String("kcm_ktp_chat_otr")); - proxy = qobject_cast<KCModuleProxy*>(otrConfigPage->widget()); + moduleScroll = qobject_cast<QScrollArea*>(otrConfigPage->widget()); + Q_ASSERT(moduleScroll); + proxy = qobject_cast<KCModuleProxy*>(moduleScroll->widget()); Q_ASSERT(proxy); QVariant value; value.setValue(m_proxyService); EOF debchange -i # (you need change the first line with: ktp-text-ui (4:17.12.3-0ubuntu2) bionic; urgency=medium) dpkg-source --commit debuild -us -uc -i -I cd .. dpkg -i kde-telepathy-text-ui_*.deb |