Bug 425665

Summary: kmail crashes when it uses kvantum theme engine while I try to download the attachment
Product: [Applications] kmail2 Reporter: Dmitriy <distselemov>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: chrisbrhm
Priority: NOR Keywords: drkonqi
Version: 5.15.0   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dmitriy 2020-08-22 08:19:18 UTC
Application: kmail (5.15.0 (20.08.0))

Qt Version: 5.14.2
Frameworks Version: 5.73.0
Operating System: Linux 5.7.16-xanmod2-drm-legacy-enabled-native-1000hz x86_64
Windowing system: X11
Distribution: Debian GNU/Linux bullseye/sid

-- Information about the crash:
Kmail crashes when it uses kvantum theme engine while I try to download the attachment.
Starting kmail with QT_STYLE_OVERRIDE=breeze solve the issue and can be used as a workaround.
I'm using Nvidia 340.108 drivers on this machine.

The crash can be reproduced every time.

-- Backtrace:
Application: KMail (kmail), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f71eaade5c6 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x00007f71eaa9e03f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007f71ea003b62 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f71eaade5e4 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007f71e98d6a8b in KMainWindow::event(QEvent*) () from /lib/x86_64-linux-gnu/libKF5XmlGui.so.5
#9  0x00007f71e9920a17 in KXmlGuiWindow::event(QEvent*) () from /lib/x86_64-linux-gnu/libKF5XmlGui.so.5
#10 0x00007f71eaa9e03f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007f71ea003b62 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007f71eaaa8807 in QApplication::setActiveWindow(QWidget*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007f71eaaa89cb in QApplicationPrivate::notifyActiveWindowChange(QWindow*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f71ea3c7a05 in QGuiApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#15 0x00007f71ea3a1bfb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#16 0x00007f71d6c82b6a in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#17 0x00007f71e32ad5fd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007f71e32ad880 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007f71e32ad90f in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007f71ea0592ff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007f71ea0024db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007f71eac95017 in QDialog::exec() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f71e901f785 in ?? () from /lib/x86_64-linux-gnu/libKF5MessageViewer.so.5abi1
#24 0x00007f71e8fed38f in MessageViewer::ViewerPrivate::openAttachment(KMime::Content*, QUrl const&) () from /lib/x86_64-linux-gnu/libKF5MessageViewer.so.5abi1
#25 0x00007f71e8ff59a2 in MessageViewer::AttachmentURLHandler::handleClick(QUrl const&, MessageViewer::ViewerPrivate*) const () from /lib/x86_64-linux-gnu/libKF5MessageViewer.so.5abi1
#26 0x00007f71e8ff4ee8 in MessageViewer::URLHandlerManager::handleClick(QUrl const&, MessageViewer::ViewerPrivate*) const () from /lib/x86_64-linux-gnu/libKF5MessageViewer.so.5abi1
#27 0x00007f71e8fdcac1 in MessageViewer::ViewerPrivate::slotUrlOpen(QUrl const&) () from /lib/x86_64-linux-gnu/libKF5MessageViewer.so.5abi1
#28 0x00007f71ea02ef21 in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007f71eaa9e03f in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f71ea003b62 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007f71ea0064c1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007f71ea059c73 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007f71e32ad5fd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007f71e32ad880 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007f71e32ad90f in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007f71ea0592ff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00007f71ea0024db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007f71ea00a782 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x00005571c5edb4be in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qcoreapplication.h:116
[Inferior 1 (process 18178) detached]

The reporter indicates this bug may be a duplicate of or related to bug 425604.

Possible duplicates by query: bug 425658, bug 425619, bug 425604, bug 425532, bug 425508.

Reported using DrKonqi
Comment 1 Dmitriy 2020-08-22 10:21:04 UTC
I found this thread at Kvantum git repo https://github.com/tsujan/Kvantum/issues/559. The author said it wasn't the Kvantum problem.
Comment 2 Chris 2020-08-28 20:48:23 UTC

*** This bug has been marked as a duplicate of bug 425604 ***
Comment 3 Chris 2020-08-28 20:53:01 UTC
I'm closing this bug as it's a duplicate of https://bugs.kde.org/show_bug.cgi?id=425604

I think it's better to keep one bug, so that all the information is in one place. Also, don't forget to add your votes to the bug so that it can have higher priority.

Thanks for reporting. Hopefuly someone will be able to solve this strange bug.
Comment 4 Chris 2020-08-28 21:38:46 UTC
My apologies! I realise that Bug 425604 isn't exactly the same as this. Re-opening this bug.

Also, just wanted to find out what Kvantum theme you're using? I find that this bug rears it's head only when using themes which change the style of widgets when toggling focus. The bug doesn't appear when using themes like Arc or KvCyan.
Comment 5 Dmitriy 2020-08-29 05:04:19 UTC
(In reply to Chris from comment #4)
> My apologies! I realise that Bug 425604 isn't exactly the same as this.
> Re-opening this bug.
> 
> Also, just wanted to find out what Kvantum theme you're using? I find that
> this bug rears it's head only when using themes which change the style of
> widgets when toggling focus. The bug doesn't appear when using themes like
> Arc or KvCyan.

Hello,
I'm using WhiteSur theme https://store.kde.org/p/1398841/
Comment 6 Chris 2020-10-24 06:23:57 UTC
I was looking into this again recently, and realised that their is a simple workaround.

Go to `/usr/share/Kvantum/<theme>/`, where `<theme>` is the theme that you are currently using. Symlink its `svg` file and copy its `kvconfig` file to the following folder: `~/.config/Kvantum/<theme>-no-inactiveness/`. 

Open the new `kvconfig` file in a text editor and find "`no_inactiveness=false`". Change `false` to `true`. 

Open *KvantumManager* and go to *Application Themes*. Select your new theme (i.e. `<theme>-no-inactiveness`) and add the following applications: 

"Kontact,KMail,KOrganizer,KAddressBook,Akregator,KNotes"

Click *Save*. Quit and re-open Kontact/Kmail, and you will see that you will no longer get the previous issue.