Bug 143776 - kontact crashed when beginning downloading the fresh mails
Summary: kontact crashed when beginning downloading the fresh mails
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: composer (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-03 10:41 UTC by BORGULYA Gábor
Modified: 2007-08-13 15:06 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 BORGULYA Gábor 2007-04-03 10:41:08 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
OS:                Linux

Kontact crashed when beginning downloading the fresh mails.
Comment 1 BORGULYA Gábor 2007-04-03 10:41:46 UTC
TRACEBACK:
~~~~~~~~~~

Using host libthread_db library "/lib/libthread_db.so.1".
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread -1208530064 (LWP 5436)]
[New Thread -1241371744 (LWP 5529)]
[New Thread -1232979040 (LWP 5528)]
[New Thread -1224586336 (LWP 5527)]
[New Thread -1216193632 (LWP 5526)]
[KCrash handler]
#6  0x457acfa7 in QTimer::start (this=) at qtimer.cpp:166
#7  0x47255c37 in KMComposeWin::autoSaveMessage (this=) at kmcomposewin.cpp:733
#8  0x4727ae6a in KMComposeWin::qt_invoke (this=) at kmcomposewin.moc:461
#9  0x4577e4db in QObject::activate_signal (this=) at qobject.cpp:2356
#10 0x4577f274 in QObject::activate_signal (this=) at qobject.cpp:2325
#11 0x45b7d6e2 in QTimer::timeout (this=) at moc_qtimer.cpp:82
#12 0x457acddd in QTimer::event (this=) at qtimer.cpp:219
#13 0x45709c0b in QApplication::internalNotify (this=) at qapplication.cpp:2635
#14 0x4570bb83 in QApplication::notify (this=) at qapplication.cpp:2358
#15 0x45f910d4 in KApplication::notify (this=) at kapplication.cpp:550
#16 0x46add0fe in QApplication::sendEvent (receiver=) at qapplication.h:496
#17 0x456faa20 in QEventLoop::activateTimers (this=) at qeventloop_unix.cpp:556
#18 0x456aa3a3 in QEventLoop::processEvents (this=) at qeventloop_x11.cpp:389
#19 0x45727c25 in QEventLoop::enterLoop (this=) at qeventloop.cpp:198
#20 0x45727a46 in QEventLoop::exec (this=) at qeventloop.cpp:145
#21 0x4570b8cf in QApplication::exec (this=) at qapplication.cpp:2758
#22 0x08065781 in main (argc=159752040, argv=0x0) at main.cpp:177
Comment 2 Thomas McGuire 2007-04-03 13:24:10 UTC
These crashes are are all related to autoSaveMessage, but do not seem exactly the same: bug 143776, bug 136365, bug 108312.
Comment 3 Bruno Virlet 2007-08-13 15:06:10 UTC
SVN commit 699554 by bvirlet:

Fixes event loop bug. Credit goes to Dirk.


BUG: 108312
BUG: 148700
BUG: 143003
BUG: 136365
BUG: 90467

Most probably closed:
BUG: 143776
BUG: 147016
BUG: 137279
BUG: 136413

https://bugzilla.novell.com/show_bug.cgi?id=226462


 M  +10 -17    kmcomposewin.cpp  
 M  +1 -1      kmcomposewin.h  


--- branches/KDE/3.5/kdepim/kmail/kmcomposewin.cpp #699553:699554
@@ -709,16 +709,22 @@
 
   if ( mAutoSaveTimer )
     mAutoSaveTimer->stop();
+
   connect( this, SIGNAL( applyChangesDone( bool ) ),
-           this, SLOT( slotContinueAutoSave( bool ) ) );
+           this, SLOT( slotContinueAutoSave() ) );
   // This method is called when KMail crashed, so don't try signing/encryption
   // and don't disable controls because it is also called from a timer and
   // then the disabling is distracting.
   applyChanges( true, true );
 
   // Don't continue before the applyChanges is done!
-  qApp->enter_loop();
+}
 
+void KMComposeWin::slotContinueAutoSave()
+{
+  disconnect( this, SIGNAL( applyChangesDone( bool ) ),
+              this, SLOT( slotContinueAutoSave( bool ) ) );
+
   // Ok, it's done now - continue dead letter saving
   if ( mComposedMessages.isEmpty() ) {
     kdDebug(5006) << "Composing the message failed." << endl;
@@ -761,16 +767,9 @@
   }
 
   if ( autoSaveInterval() > 0 )
-    mAutoSaveTimer->start( autoSaveInterval() );
+    updateAutoSave();
 }
 
-void KMComposeWin::slotContinueAutoSave( bool )
-{
-  disconnect( this, SIGNAL( applyChangesDone( bool ) ),
-              this, SLOT( slotContinueAutoSave( bool ) ) );
-  qApp->exit_loop();
-}
-
 //-----------------------------------------------------------------------------
 void KMComposeWin::slotView(void)
 {
@@ -2193,18 +2192,12 @@
 {
   kdDebug(5006) << "entering KMComposeWin::applyChanges" << endl;
 
-  if(!mMsg) {
+  if(!mMsg || mComposer) {
     kdDebug(5006) << "KMComposeWin::applyChanges() : mMsg == 0!\n" << endl;
     emit applyChangesDone( false );
     return;
   }
 
-  if( mComposer ) {
-    kdDebug(5006) << "KMComposeWin::applyChanges() : applyChanges called twice"
-                  << endl;
-    return;
-  }
-
   // Make new job and execute it
   mComposer = new MessageComposer( this );
   connect( mComposer, SIGNAL( done( bool ) ),
--- branches/KDE/3.5/kdepim/kmail/kmcomposewin.h #699553:699554
@@ -780,7 +780,7 @@
 
   void slotContinueDoSend( bool );
   void slotContinuePrint( bool );
-  void slotContinueAutoSave( bool );
+  void slotContinueAutoSave();
 
   void slotEncryptChiasmusToggled( bool );