Run kmail, wait for it to start, then try to run start another kmail process. Actual result: The new process crashes right at start Expected results: Window of the already running instance is activated and the newly started kmail process quits. #0 0x00007fffe27e8d4c in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::data() const (this=0x8) at ../../include/QtCore/../../../../qtbase/src/corelib/tools/qscopedpointer.h:135 #1 0x00007fffe2a7db11 in qGetPtrHelper<QScopedPointer<QObjectData> >(QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > const&) (p=...) at ../../include/QtCore/../../../../qtbase/src/corelib/global/qglobal.h:962 #2 0x00007fffe2a7dcd0 in QObject::d_func() const (this=0x0) at /home/dvratil/devel/Qt/qt5/qtbase/src/corelib/kernel/qobject.h:110 #3 0x00007fffe2a7481c in QObject::thread() const (this=0x0) at /home/dvratil/devel/Qt/qt5/qtbase/src/corelib/kernel/qobject.cpp:1412 #4 0x00007fffe57329ec in KWindowSystemStaticContainer::KWindowSystemStaticContainer() (this=0x7fffe597b290 <(anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction()::holder>) at /home/dvratil/devel/KDE/frameworks/kwindowsystem/src/kwindowsystem.cpp:52 #5 0x00007fffe5731490 in (anonymous namespace)::Q_QGS_g_kwmInstanceContainer::Holder::Holder() (this=0x7fffe597b290 <(anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction()::holder>) at /home/dvratil/devel/KDE/frameworks/kwindowsystem/src/kwindowsystem.cpp:58 #6 0x00007fffe57314fd in (anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction() () at /home/dvratil/devel/KDE/frameworks/kwindowsystem/src/kwindowsystem.cpp:58 #7 0x00007fffe5732b80 in QGlobalStatic<KWindowSystemStaticContainer, (anonymous namespace)::Q_QGS_g_kwmInstanceContainer::innerFunction(), (anonymous namespace)::Q_QGS_g_kwmInstanceContainer::guard>::operator()() (this=0x7fffe597b280 <g_kwmInstanceContainer>) at /opt/qt5/include/QtCore/qglobalstatic.h:129 #8 0x00007fffe5731974 in KWindowSystem::d_func() () at /home/dvratil/devel/KDE/frameworks/kwindowsystem/src/kwindowsystem.cpp:343 #9 0x00007fffe57324a4 in KWindowSystem::allowExternalProcessWindowActivation(int) (pid=-1) at /home/dvratil/devel/KDE/frameworks/kwindowsystem/src/kwindowsystem.cpp:639 #10 0x00007ffff7bd0f0e in KontactInterface::PimUniqueApplication::start(QFlags<KUniqueApplication::StartFlag>) (flags=...) at /home/dvratil/devel/KDE/PIM/frameworks/kontactinterface/src/pimuniqueapplication.cpp:105 #11 0x00007ffff7bd0cd3 in KontactInterface::PimUniqueApplication::start() () at /home/dvratil/devel/KDE/PIM/frameworks/kontactinterface/src/pimuniqueapplication.cpp:76 #12 0x0000000000404f42 in main(int, char**) (argc=1, argv=0x7fffffffd978) at /home/dvratil/devel/KDE/PIM/frameworks/kdepim/kmail/main.cpp:119
I confirm it. It's a bug with kontact unique application. It's not totally ported yet.
Fixed in master by https://git.reviewboard.kde.org/r/123773/ and https://git.reviewboard.kde.org/r/123774/ (porting KontactInterface away from KUniqueApplication).