Bug 118060 - crash when adding new identity
Summary: crash when adding new identity
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.9
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Will Stephenson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-10 12:39 UTC by michal
Modified: 2007-03-23 11:40 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 michal 2005-12-10 12:39:50 UTC
Version:           1.9 (using KDE 3.5.0, PLD Linux Distribution)
Compiler:          gcc version 3.3.6 (PLD Linux)
OS:                Linux (i686) release 2.6.14

I've opened a page in aKregator. Then I selected "Send link address..." from main menu. KMail composer appeared. I selected "configure kmail" from menu, then "add" in identities, entered name for new identity and pressed OK. Crash. Repeatable.

When I launched KMail from kicker it worked well.

Then I closed KMail and tried to add third identity running KMail from aKregator it crashes again.
Comment 1 michal 2005-12-10 12:41:12 UTC
It also crashes when I try to modify existing identity.
Comment 2 Philip Rodrigues 2005-12-11 18:39:40 UTC
If you have a useful backtrace from the crash, please paste it here
Comment 3 michal 2005-12-11 19:26:44 UTC
Unfortunatelly I don't. If you need it, I can rebuild with debug information and try to provide the backtrace. Which packages need to be rebuild to provide useful bactrace? kdepim? kdelibs?
Comment 4 Philip Rodrigues 2006-04-05 23:12:12 UTC
recompiling kdelibs and kdepim with debugging support should be enough to get a good backtrace. 
Comment 5 michal 2006-04-08 00:02:41 UTC
OK, here comes the backtrace:

-----------------------------------------------
Using host libthread_db library "/lib/tls/libthread_db.so.1".
`system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols.
[KCrash handler]
#6  0xb7c0c672 in KMMainWidget::folderTree (this=0x0) at kmmainwidget.h:105
#7  0xb7c2ca8f in IdentityDialog (this=0x84dbf20, parent=0x8479360, name=0x0)
    at identitydialog.cpp:339
#8  0xb7be08c5 in IdentityPage::slotModifyIdentity (this=0x8479360)
    at configuredialog.cpp:421
#9  0xb7be07d4 in IdentityPage::slotNewIdentity (this=0x8479360)
    at configuredialog.cpp:410
#10 0xb7c127df in IdentityPage::qt_invoke (this=0x8479360, _id=48, 
    _o=0xbfaa3e20) at configuredialog_p.moc:727
#11 0xb5cfcb93 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#12 0xb5cfc9d4 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#13 0xb600f26e in QButton::clicked () from /usr/lib/libqt-mt.so.3
#14 0xb5d8e547 in QButton::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#15 0xb5d321aa in QWidget::event () from /usr/lib/libqt-mt.so.3
#16 0xb5ca187c in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#17 0xb5ca0f9d in QApplication::notify () from /usr/lib/libqt-mt.so.3
#18 0xb62f64be in KApplication::notify (this=0xbfaa48b0, receiver=0x8433008, 
    event=0xbfaa4270) at kapplication.cpp:550
#19 0xb5c3724c in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#20 0xb5c34e45 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#21 0xb5c4c2b5 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#22 0xb5cb2b58 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#23 0xb5cb2a08 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#24 0xb5ca1ab1 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#25 0x0804aa38 in main (argc=12, argv=0xbfaa4a64) at main.cpp:110
-----------------------------------------------

I'm sorry for delay, but it took me two days to recompile these packages. Please also note that it is version 3.5.2 now. Plus some minor patches (every distro adds some).


If there is anything more I can do to help, please ask.
Comment 6 Will Stephenson 2007-03-23 09:42:50 UTC
The act of adding a new identity requires that there be an open KMail main window.  When KMail is started by Akregator using kapp->invokeMailer() this is not true, KMKernel::getKMMainWidget() returns 0, so the identity dialog segfaults when trying to initialise its FolderRequesters...  

I'm working on a way to guarantee a mainwin and thus kmmainwidget when the config dialog is started.
Comment 7 Will Stephenson 2007-03-23 11:40:23 UTC
SVN commit 645673 by wstephens:

Ensure that there is a KMMainWidget before showing the config dialog, as parts of the config (identitydialog) depend on its existence.
BUG: 118060


 M  +8 -0      kmkernel.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmkernel.cpp #645672:645673
@@ -1952,6 +1952,14 @@
              this, SLOT( slotConfigChanged() ) );
   }
 
+  if( KMKernel::getKMMainWidget() == 0 )
+  {
+    // ensure that there is a main widget available
+    // as parts of the configure dialog (identity) rely on this
+    // and this slot can be called when there is only a KMComposeWin showing
+    new KMMainWin;
+  }
+
   if( mConfigureDialog->isHidden() )
     mConfigureDialog->show();
   else