Bug 108063 - kmail composer crashes when inserting file
Summary: kmail composer crashes when inserting file
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Unmaintained
Component: general (show other bugs)
Version: 1.8.1
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-24 17:37 UTC by Bjorn Helgaas
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bjorn Helgaas 2005-06-24 17:37:33 UTC
Version:           1.8.1 (using KDE 3.4.1, Debian Package 4:3.4.1-1 (3.1))
Compiler:          gcc version 3.3.6 (Debian 1:3.3.6-5)
OS:                Linux (i686) release 2.6.11-1-686-smp

The kmail composer crashes reliably when inserting
a file.  This happened with 3.4.0 and also happens with kmail 1.8.1 on 3.4.1 (installed on i386 from http://pkg-kde.alioth.debian.org/kde-3.4.1/).

To reproduce:
  - click "New Message" icon
  - use Message->Insert File

Inserting an empty file causes the crash, so it
doesn't seem to depend on the file contents.

Reported on the debian-kde list 6/23/2005.  Wolfgang
Mader <Wolfgang_Mader@gmx.de> reproduced it on amd64.  Timo Springmann <timo@orangeorb.de> could
not reproduce it.

Note that these are *experimental* debian packages;
the problem could be debian or packaging related.


ii  kmail          3.4.1-1        KDE Email client

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1246799904 (LWP 7850)]
0xb794be84 in mallopt () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb794be84 in mallopt () from /lib/tls/libc.so.6
#1  0xb794adcb in free () from /lib/tls/libc.so.6
#2  0xb7acbd23 in operator delete () from /usr/lib/libstdc++.so.5
#3  0xb7c5d798 in QValueListPrivate<QString>::remove ()
   from /usr/lib/libkmailprivate.so
#4  0xb7d033d6 in KMComposeWin::slotInsertFile ()
   from /usr/lib/libkmailprivate.so
#5  0xb7ceddfe in KMComposeWin::qt_invoke () from /usr/lib/libkmailprivate.so
#6  0xb71f671c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#7  0xb71f6544 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#8  0xb608889b in KAction::activated () from /usr/lib/libkdeui.so.4
#9  0xb608800a in KAction::slotActivated () from /usr/lib/libkdeui.so.4
#10 0xb6088139 in KAction::slotPopupActivated () from /usr/lib/libkdeui.so.4
#11 0xb6088b91 in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#12 0xb71f671c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#13 0xb753562a in QSignal::signal () from /usr/lib/libqt-mt.so.3
#14 0xb721091d in QSignal::activate () from /usr/lib/libqt-mt.so.3
#15 0xb72fe0d9 in QPopupMenu::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#16 0xb60760d1 in KPopupMenu::mouseReleaseEvent () from /usr/lib/libkdeui.so.4
#17 0xb722cb37 in QWidget::event () from /usr/lib/libqt-mt.so.3
#18 0xb7199e1f in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#19 0xb7199514 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#20 0xb774cac5 in KApplication::notify () from /usr/lib/libkdecore.so.4
#21 0xb712e1a1 in QETWidget::translateMouseEvent () from /usr/lib/libqt-mt.so.3
#22 0xb712c23e in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#23 0xb7143254 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#24 0xb71ac1d8 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#25 0xb71ac088 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#26 0xb719a071 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#27 0x0804a0b4 in ?? ()
#28 0xbffff840 in ?? ()
#29 0xbffff750 in ?? ()
#30 0x00000000 in ?? ()
#31 0x00000000 in ?? ()
#32 0xb763dc40 in vtable for QGArray () from /usr/lib/libqt-mt.so.3
#33 0x081e9a30 in ?? ()
#34 0x00000000 in ?? ()
#35 0xb7a0bc40 in __after_morecore_hook () from /lib/tls/libc.so.6
#36 0xb7fb77d0 in vtable for KMKernel () from /usr/lib/libkmailprivate.so
#37 0xb78ee974 in __libc_start_main () from /lib/tls/libc.so.6
#38 0xb78ee974 in __libc_start_main () from /lib/tls/libc.so.6
#39 0x08049e11 in ?? ()
Comment 1 Bjorn Helgaas 2005-06-27 23:49:11 UTC
My .kde/share/config/kmailrc had the following line in it:

recent-encodings=iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1,iso-8859-1

Removing that line makes file insertion work again.  Kmail must have
generated that somewhere along the line (I certainly didn't add it by
hand), and it apparently causes the crash.

So there are two problems here:
        1) Kmail generated a recent-encodings line that is
           somehow bogus.
        2) Kmail doesn't validate recent-encodings when
           reading it from kmailrc.
Comment 2 Andy Neitzke 2005-11-23 06:42:14 UTC
I just want to add that I had this problem for a while too, so it's not a completely isolated occurrence.  I cannot quite remember whether this was before or after I switched from Mandrake to Gentoo, but in any case, it is not just a Debian issue.
Comment 3 Allen Winter 2006-01-11 19:32:52 UTC
SVN commit 497015 by winterz:

Fix crash during a "insert file" in the composer.
Patch provided by Goffredo Baroncelli and approved by Don.
Thank you Goffredo!

BUGS: 111383, 108063, 111713

CCMAIL: kreijack@alice.it


 M  +1 -1      kmcomposewin.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmcomposewin.cpp #497014:497015
@@ -2662,7 +2662,7 @@
     while (urls.count() > mMaxRecentFiles)
       urls.erase( urls.fromLast() );
     while (encodings.count() > mMaxRecentFiles)
-      urls.erase( encodings.fromLast() );
+      encodings.erase( encodings.fromLast() );
     // sanity check
     if (urls.count() != encodings.count()) {
       urls.clear();