Bug 343745 - Crash with an invalid external editor involving unterminated quotes
Summary: Crash with an invalid external editor involving unterminated quotes
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.14.3
Platform: Archlinux Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-03 20:25 UTC by Kenneth Graunke
Modified: 2015-02-04 08:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 14.12.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Graunke 2015-02-03 20:25:55 UTC
In Settings > Composer > External Editor, set your editor some command with a closing single quote:

     foo'

Then, every time the composer opens, KMail will crash.  In my case, KMail decided it wanted to re-open the composer on startup, so it would crash immediately on startup - I had to edit the configuration file to get it back.

(If you're wondering how I came across this, I was trying to change my editor from: 'konsole --nofork -e vim "+set ft=mail" -f %f' to gvim --nofork "+set ft=mail" -f %f  ....and forgot to remove the closing ' mark).

Reproducible: Always
Comment 1 Laurent Montel 2015-02-04 06:56:48 UTC
Backtrace ?
Comment 2 Kenneth Graunke 2015-02-04 07:38:27 UTC
(gdb) bt
#0  0x00007f52594faf3d in KProcess::setProgram(QStringList const&) ()
   from /usr/lib/libkdecore.so.5
#1  0x00007f52594fb2e5 in KProcess::operator<<(QStringList const&) ()
   from /usr/lib/libkdecore.so.5
#2  0x00007f5253227544 in ?? () from /usr/lib/libmessagecomposer.so.4
#3  0x00007f52589efd9c in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#4  0x00007f525322a5e8 in MessageComposer::SignatureController::insertSignatureHelper(KPIMIdentities::Signature::Placement) ()
   from /usr/lib/libmessagecomposer.so.4
#5  0x00007f52589f4491 in QObject::event(QEvent*) ()
   from /usr/lib/libQtCore.so.4
#6  0x00007f5257d2d9ac in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/libQtGui.so.4
#7  0x00007f5257d34408 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQtGui.so.4
#8  0x00007f5259b101ea in KApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libkdeui.so.5
#9  0x00007f52589db28d in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/libQtCore.so.4
#10 0x00007f52589de651 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#11 0x00007f5258a0a233 in ?? () from /usr/lib/libQtCore.so.4
#12 0x00007f524edafa0d in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#13 0x00007f524edafcf8 in ?? () from /usr/lib/libglib-2.0.so.0
#14 0x00007f524edafdac in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#15 0x00007f5258a0a37d in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#16 0x00007f5257dd13a6 in ?? () from /usr/lib/libQtGui.so.4
#17 0x00007f52589d9de1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#18 0x00007f52589da145 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#19 0x00007f52589df6e9 in QCoreApplication::exec() ()
   from /usr/lib/libQtCore.so.4
#20 0x0000000000402e02 in ?? ()
#21 0x00007f52572be040 in __libc_start_main () from /usr/lib/libc.so.6
#22 0x00000000004032db in _start ()
Comment 3 Laurent Montel 2015-02-04 07:58:42 UTC
I confirm it :)
Comment 4 Laurent Montel 2015-02-04 08:08:46 UTC
Git commit 583b23f8b2b676c64ac0ef4dc6becfb7dea987fa by Montel Laurent.
Committed on 04/02/2015 at 08:08.
Pushed by mlaurent into branch 'KDE/4.14'.

Fix Bug 343745 - Crash with an invalid external editor involving unterminated quotes

FIXED-IN: 14.12.3

M  +14   -3    messagecomposer/composer/kmeditor.cpp

http://commits.kde.org/kdepim/583b23f8b2b676c64ac0ef4dc6becfb7dea987fa
Comment 5 Kenneth Graunke 2015-02-04 08:13:03 UTC
Thank you!