Bug 321787 - crash while starting external application to view an attachment
Summary: crash while starting external application to view an attachment
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 4.10.5
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 325346 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-06-30 11:04 UTC by Marc Schiffbauer
Modified: 2013-09-27 02:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Schiffbauer 2013-06-30 11:04:27 UTC
Application: kmail (4.10.5)
KDE Platform Version: 4.10.4 (Compiled from sources)
Qt Version: 4.8.4
Operating System: Linux 3.9.7-gentoo x86_64
Distribution: "NAME=Gentoo"

-- Information about the crash:
- What I was doing when the application crashed:

I got an email with a .pps-File attached. By clicking on the attachement I am asked what to do and I click the "Open with LibreOffice Impress" -> kaboom!

The crash can be reproduced every time.

-- Backtrace:
Application: KMail (kmail), signal: Aborted
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fd71302e780 (LWP 20742))]

Thread 3 (Thread 0x7fd6f28d1700 (LWP 20746)):
#0  0x00007fd70e115cec in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fd703a63ded in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x00007fd703a63ef9 in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#3  0x00007fd70e111f3b in start_thread () from /lib64/libpthread.so.0
#4  0x00007fd7102f226d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fd6f1fd0700 (LWP 20747)):
#0  0x00007fd7102e85dd in poll () from /lib64/libc.so.6
#1  0x00007fd7083066a6 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fd7083067d4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fd710c76836 in QEventDispatcherGlib::processEvents (this=0x7fd6ec0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007fd710c472df in QEventLoop::processEvents (this=this@entry=0x7fd6f1fcfe70, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fd710c47568 in QEventLoop::exec (this=this@entry=0x7fd6f1fcfe70, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007fd710b4ab40 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#7  0x00007fd710b4dabc in QThreadPrivate::start (arg=0x299a610) at thread/qthread_unix.cpp:338
#8  0x00007fd70e111f3b in start_thread () from /lib64/libpthread.so.0
#9  0x00007fd7102f226d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fd71302e780 (LWP 20742)):
[KCrash Handler]
#6  0x00007fd71023c545 in raise () from /lib64/libc.so.6
#7  0x00007fd71023d9c8 in abort () from /lib64/libc.so.6
#8  0x00007fd710b436c4 in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=<optimized out>) at global/qglobal.cpp:2323
#9  0x00007fd710b43838 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x7fd710caa948 "ASSERT: \"%s\" in file %s, line %d", ap=ap@entry=0x7fffcfb47138) at global/qglobal.cpp:2369
#10 0x00007fd710b439cc in qFatal (msg=msg@entry=0x7fd710caa948 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2552
#11 0x00007fd710b43a16 in qt_assert (assertion=assertion@entry=0x7fd70d0dc499 "supportedProtocols.isEmpty()", file=file@entry=0x7fd70d0dbcd0 "/var/tmp/portage/kde-base/kdelibs-4.10.49.9999/work/kdelibs-4.10.49.9999/kio/kio/krun.cpp", line=line@entry=377) at global/qglobal.cpp:2018
#12 0x00007fd70cfe68c3 in supportedProtocols (_service=...) at /var/tmp/portage/kde-base/kdelibs-4.10.49.9999/work/kdelibs-4.10.49.9999/kio/kio/krun.cpp:377
#13 0x00007fd70cfeb917 in resolveURLs (_service=..., _urls=...) at /var/tmp/portage/kde-base/kdelibs-4.10.49.9999/work/kdelibs-4.10.49.9999/kio/kio/krun.cpp:742
#14 KRun::run (_service=..., _urls=..., window=0x0, tempFiles=false, suggestedFileName=..., asn=...) at /var/tmp/portage/kde-base/kdelibs-4.10.49.9999/work/kdelibs-4.10.49.9999/kio/kio/krun.cpp:1007
#15 0x00007fd7091b51cb in MessageViewer::ViewerPrivate::attachmentOpenWith(KMime::Content*, KSharedPtr<KService>) () from /usr/lib64/libmessageviewer.so.4
#16 0x00007fd7091be7a1 in MessageViewer::ViewerPrivate::openAttachment(KMime::Content*, QString const&) () from /usr/lib64/libmessageviewer.so.4
#17 0x00007fd70919c5ec in (anonymous namespace)::AttachmentURLHandler::handleClick(KUrl const&, MessageViewer::ViewerPrivate*) const () from /usr/lib64/libmessageviewer.so.4
#18 0x00007fd70919eed8 in MessageViewer::URLHandlerManager::handleClick(KUrl const&, MessageViewer::ViewerPrivate*) const () from /usr/lib64/libmessageviewer.so.4
#19 0x00007fd7091ad1e2 in MessageViewer::ViewerPrivate::slotUrlOpen(QUrl const&) () from /usr/lib64/libmessageviewer.so.4
#20 0x00007fd7091c253a in MessageViewer::ViewerPrivate::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib64/libmessageviewer.so.4
#21 0x00007fd710c5cd4e in QObject::event (this=0x2985110, e=<optimized out>) at kernel/qobject.cpp:1194
#22 0x00007fd71117ffec in QApplicationPrivate::notify_helper (this=this@entry=0x24553a0, receiver=receiver@entry=0x2985110, e=e@entry=0x32e7340) at kernel/qapplication.cpp:4562
#23 0x00007fd711184411 in QApplication::notify (this=this@entry=0x7fffcfb48750, receiver=receiver@entry=0x2985110, e=e@entry=0x32e7340) at kernel/qapplication.cpp:4423
#24 0x00007fd712a269d6 in KApplication::notify (this=0x7fffcfb48750, receiver=0x2985110, event=0x32e7340) at /var/tmp/portage/kde-base/kdelibs-4.10.49.9999/work/kdelibs-4.10.49.9999/kdeui/kernel/kapplication.cpp:311
#25 0x00007fd710c4858e in QCoreApplication::notifyInternal (this=0x7fffcfb48750, receiver=receiver@entry=0x2985110, event=event@entry=0x32e7340) at kernel/qcoreapplication.cpp:946
#26 0x00007fd710c4bea9 in sendEvent (event=0x32e7340, receiver=0x2985110) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#27 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x22f51f0) at kernel/qcoreapplication.cpp:1570
#28 0x00007fd710c4c113 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1463
#29 0x00007fd710c76683 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#30 postEventSourceDispatch (s=0x234f130) at kernel/qeventdispatcher_glib.cpp:279
#31 0x00007fd7083063c3 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#32 0x00007fd708306710 in ?? () from /usr/lib64/libglib-2.0.so.0
#33 0x00007fd7083067d4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#34 0x00007fd710c76816 in QEventDispatcherGlib::processEvents (this=0x22f6ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#35 0x00007fd71121fbbe in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#36 0x00007fd710c472df in QEventLoop::processEvents (this=this@entry=0x7fffcfb483d0, flags=...) at kernel/qeventloop.cpp:149
#37 0x00007fd710c47568 in QEventLoop::exec (this=this@entry=0x7fffcfb483d0, flags=...) at kernel/qeventloop.cpp:204
#38 0x00007fd710c4c1a6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#39 0x00007fd71117e28c in QApplication::exec () at kernel/qapplication.cpp:3823
#40 0x000000000040325d in main (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/kmail-4.10.49.9999/work/kmail-4.10.49.9999/kmail/main.cpp:146

Reported using DrKonqi
Comment 1 Laurent Montel 2013-06-30 12:14:51 UTC
Will look at soon
Comment 2 Laurent Montel 2013-06-30 16:57:57 UTC
    if (mx1.expandMacrosShellQuote(exec) && !mx1.hasUrls) {
        Q_ASSERT(supportedProtocols.isEmpty());   // huh? If you support protocols you need %u or %U...
    }

Ok it'es
Comment 3 Laurent Montel 2013-06-30 16:58:49 UTC
    if (mx1.expandMacrosShellQuote(exec) && !mx1.hasUrls) {
        Q_ASSERT(supportedProtocols.isEmpty());   // huh? If you support protocols you need %u or %U...
    }

Ok it's a problem with desktop file.
You need to look at with gentoo distro
Comment 4 Marc Schiffbauer 2013-07-10 10:20:05 UTC
I still need to check our desktop file. 

But please rethink this: The desktop is a small textfile which can be ok or not. Or it may be outdated for example.

Do you really think its acceptable that kmail will *crash* if such a desktop file is broken?

I still cinsider this a bug, because expected behavior may be an informational Message about that (best case) or opening the external program juts not working (worst case), but not a crash of kmail.

What do you think?
Comment 5 Laurent Montel 2013-07-10 11:19:35 UTC
Don't compile as debug and you will not have crash.
But we added it for known when desktop file is not ok.
So fix desktop file or don't use debug package.
That's all
Comment 6 Marc Schiffbauer 2013-07-10 13:13:22 UTC
Montel, I appreciate your clarification, thanks! I overlooked that its an Q_ASSERT actually.
Comment 7 Christophe Marin 2013-09-05 09:28:11 UTC
Marc, the reason why it fails for gentoo users is there: https://bugs.kde.org/show_bug.cgi?id=323722#c5 looks like gentoo doesn't use gnome-vfs when building libreoffice
Comment 8 Jekyll Wu 2013-09-27 02:56:03 UTC
*** Bug 325346 has been marked as a duplicate of this bug. ***