Summary: | kontact crash when going to open a doc attached to an email | ||
---|---|---|---|
Product: | [Applications] kontact | Reporter: | Darin McBride <Tanktalus> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | crash | CC: | marpirk, moltonel, montel, stupor_scurvy343, Tanktalus |
Priority: | NOR | Keywords: | drkonqi |
Version: | 4.11 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
URL: | https://bugs.gentoo.org/show_bug.cgi?id=482036 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | New crash information added by DrKonqi |
Description
Darin McBride
2013-08-19 14:07:08 UTC
> #11 0x00007f5cdbda240d in supportedProtocols(KService const&) () from /usr/lib64/libkio.so.5 > #12 0x00007f5cdbda5688 in KRun::run(KService const&, KUrl::List const&, QWidget*, bool, QString const&, QByteArray const&) () from /usr/lib64/libkio.so.5 Since you can reproduce the crash every time, please rebuild related packages[1] with debug symbols and provide a better backtrace. [1] http://www.gentoo.org/proj/en/qa/backtraces.xml Created attachment 81789 [details]
New crash information added by DrKonqi
kontact (4.11) on KDE Platform 4.11.00 using Qt 4.8.4
Same as earlier - but this time I've recompiled a bunch of stuff with the -ggdb flag as requested.
Thanks!
-- Backtrace (Reduced):
#11 0x00007f0279cb640d in supportedProtocols (_service=...) at /var/tmp/portage/kde-base/kdelibs-4.11.0/work/kdelibs-4.11.0/kio/kio/krun.cpp:377
#12 0x00007f0279cb9688 in resolveURLs (_service=..., _urls=...) at /var/tmp/portage/kde-base/kdelibs-4.11.0/work/kdelibs-4.11.0/kio/kio/krun.cpp:742
#13 KRun::run (_service=..., _urls=..., window=<optimized out>, tempFiles=<optimized out>, suggestedFileName=..., asn=...) at /var/tmp/portage/kde-base/kdelibs-4.11.0/work/kdelibs-4.11.0/kio/kio/krun.cpp:1007
#14 0x00007f0217e33000 in MessageViewer::ViewerPrivate::attachmentOpenWith (this=0x1d0bba0, node=<optimized out>, offer=...) at /var/tmp/portage/kde-base/kdepim-common-libs-4.11.0/work/kdepim-common-libs-4.11.0/messageviewer/viewer/viewer_p.cpp:761
#15 0x00007f0217e397ed in MessageViewer::ViewerPrivate::openAttachment (this=0x1d0bba0, node=0x26bc680, name=...) at /var/tmp/portage/kde-base/kdepim-common-libs-4.11.0/work/kdepim-common-libs-4.11.0/messageviewer/viewer/viewer_p.cpp:392
It's an assert in code if (mx1.expandMacrosShellQuote(exec) && !mx1.hasUrls) { Q_ASSERT(supportedProtocols.isEmpty()); // huh? If you support protocols you need %u or %U... } it's a pb with gentoo + desktop file. So it's not a kontact problem Well, I'm not sure that crashing due to a distro doing something wrong is necessarily the best way to handle it... But can you help me discern which desktop file it is that needs changing, and what kind of change it needs so I can go to the gentoo devs to fix? Thanks (In reply to comment #4) > > But can you help me discern which desktop file it is that needs changing, > and what kind of change it needs so I can go to the gentoo devs to fix? > you already gave the answer: in your bug report: "[...] clicking on the attachment then on "Open with 'LibreOffice Writer'"." So, look in the libreoffice writer desktop file (called writer.desktop) The issue comes from your libreoffice build as stated before: The desktop files in libreoffice/sysui/desktop/share/brand.pl substitute %%FILE%% to %U if --urls is true (else, it uses %F) "--urls" is defined in libreoffice/sysui/CustomTarget_share.mk if ENABLE_GIO or ENABLE_GNOMEVFS is true. and finally ENABLE_GNOMEVFS is true if gnome-vfs is found while configuring libreoffice looks like this was reported to gentoo already https://bugs.gentoo.org/show_bug.cgi?id=482036 So, because this is now marked "resolved downstream", I take it to mean that crashing on bad input is considered acceptable behaviour, as opposed to, perhaps, a message box or something alerting the user to the bad input? It crashes because you use a debug build (Q_ASSERT are ignored on release builds). Read https://bugs.kde.org/show_bug.cgi?id=321787#c5 From Code Complete 2: "Use error-handling for conditions you expect to occur; use assertions for conditions that should never occur." Since we're talking about a desktop file, which is not under KDE's control, this is an error condition, not something that should be asserted. But that's just my opinion. If you disagree, no response required. For posterity, problem seems to have disappeared after upgrading Qt from 4.8.4 to 4.8.5. Now %F does not cause a crash, and libreoffice opens fine. *** Bug 327562 has been marked as a duplicate of this bug. *** *** Bug 328852 has been marked as a duplicate of this bug. *** I was already on 4.8.5 when I noticed the bug; it doesn't change anything for me. While the libreoffice desktop file certainly should get fixed, I agree with Darin that even complete garbage in a desktop file should not crash a KDE component. Since desktop files can be created and edited by end users, KDE should expect to find weird stuff in them and work around or help diagnose any problem found. Incidentally, when reading thru krun.cpp it seems that we do just that (print a warning and return a default value) for some problems, while other problems trigger an assert. Could we do that in all cases ? |