Bug 56770 - kmail crashed using DCOP
Summary: kmail crashed using DCOP
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.5.1
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-03 00:43 UTC by Giovanni Venturi
Modified: 2007-09-14 12:17 UTC (History)
0 users

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 Giovanni Venturi 2003-04-03 00:43:25 UTC
Version:           1.5.1 (using KDE 3.1.1)
Installed from:    compiled sources
Compiler:          gcc version 3.2
OS:          Linux (i686) release 2.4.19-4GB

I used the command "kmail --attach files.tar.bz2" from Konsole and KMail crashed.

[New Thread 1024 (LWP 2468)]
0x415af8c9 in wait4 () from /lib/libc.so.6
#0  0x415af8c9 in wait4 () from /lib/libc.so.6
#1  0x4162ac90 in __DTOR_END__ () from /lib/libc.so.6
#2  0x41407a93 in waitpid () from /lib/libpthread.so.0
#3  0x40b86f0d in KCrash::defaultCrashHandler(int) ()
   from /opt/kde3/lib/libkdecore.so.4
#4  0x4140512b in pthread_sighandler () from /lib/libpthread.so.0
#5  <signal handler called>
#6  0x4153bdf1 in kill () from /lib/libc.so.6
#7  0x4140506d in pthread_kill () from /lib/libpthread.so.0
#8  0x414055eb in raise () from /lib/libpthread.so.0
#9  0x4153d4d9 in abort () from /lib/libc.so.6
#10 0x40b0a4c9 in kDebugBackend(unsigned short, unsigned, char const*) ()
   from /opt/kde3/lib/libkdecore.so.4
#11 0x40b0a9df in kdbgstream::flush() () from /opt/kde3/lib/libkdecore.so.4
#12 0x08091749 in endl(kdbgstream&) ()
#13 0x40643b75 in KIO::Scheduler::_scheduleJob(KIO::SimpleJob*) ()
   from /opt/kde3/lib/libkio.so.4
#14 0x081362ed in KMComposeWin::addAttach(KURL) ()
#15 0x081ef17e in KMKernel::openComposer(QString const&, QString const&, QString const&, QString const&, QString const&, int, KURL const&, KURL::List const&)
    ()
#16 0x081f2caa in KMKernel::action(bool, bool, QString const&, QString const&, QString const&, QString const&, QString const&, KURL const&, KURL::List const&)
    ()
#17 0x081f58c8 in KMailApplication::newInstance() ()
#18 0x40ba7011 in KUniqueApplication::processDelayed() ()
   from /opt/kde3/lib/libkdecore.so.4
#19 0x40ba73b9 in KUniqueApplication::qt_invoke(int, QUObject*) ()
   from /opt/kde3/lib/libkdecore.so.4
#20 0x40ef4f23 in QObject::activate_signal(QConnectionList*, QUObject*) ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#21 0x411af807 in QSignal::signal(QVariant const&) ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#22 0x40f0d6a5 in QSignal::activate() ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#23 0x40f140bc in QSingleShotTimer::event(QEvent*) ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#24 0x40e99192 in QApplication::internalNotify(QObject*, QEvent*) ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#25 0x40e98979 in QApplication::notify(QObject*, QEvent*) ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#26 0x40af9239 in KApplication::notify(QObject*, QEvent*) ()
   from /opt/kde3/lib/libkdecore.so.4
#27 0x40e74c2c in QEventLoop::activateTimers() ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#28 0x40e5421c in QEventLoop::processEvents(unsigned) ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#29 0x40eac10b in QEventLoop::enterLoop() ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#30 0x40eabfb4 in QEventLoop::exec() ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#31 0x40e993e0 in QApplication::exec() ()
   from /KDE/HEAD/qt-copy/lib/libqt-mt.so.3
#32 0x081f690f in main ()
#33 0x4152a4a2 in __libc_start_main () from /lib/libc.so.6
Comment 1 Zack Rusin 2003-04-28 19:30:42 UTC
Subject: kdepim/kmail

CVS commit by zrusin: 

Crash fix. Do not try to schedule a non-existing job (job created with a 
malformed url).
CCMAIL: 56770-done@bugs.kde.org


  M +0 -2      imapjob.cpp   1.9
  M +6 -0      kmcomposewin.cpp   1.688


--- kdepim/kmail/imapjob.cpp  #1.8:1.9
@@ -229,6 +229,4 @@ void ImapJob::slotGetMessageResult( KIO:
       msg->setComplete( TRUE );
       emit messageRetrieved(msg);
-    } else {
-      emit finished();
     }
     msg = 0;

--- kdepim/kmail/kmcomposewin.cpp  #1.687:1.688
@@ -3682,4 +3682,10 @@ QCString KMComposeWin::pgpProcessedMsg(v
 void KMComposeWin::addAttach(const KURL aUrl)
 {
+  if ( aUrl.isMalformed() ) {
+    KMessageBox::sorry( 0, i18n( "<qt><p>KMail couldn't recognize the location of the attatchment (%1).</p>"
+                                 "<p>You have to specify the full path if you wish to attach a file.</p></qt>" )
+                        .arg( aUrl.prettyURL() ) );
+    return;
+  }
   KIO::TransferJob *job = KIO::get(aUrl);
   KIO::Scheduler::scheduleJob( job );