Version: (using KDE Devel) Installed from: Compiled sources From today's CVS: [New Thread 16384 (LWP 2769)] 0x41a41b89 in wait4 () from /lib/libc.so.6 #0 0x41a41b89 in wait4 () from /lib/libc.so.6 #1 0x41ab5000 in sys_sigabbrev () from /lib/libc.so.6 #2 0x4188b061 in waitpid () from /lib/libpthread.so.0 #3 0x40eafceb in KCrash::defaultCrashHandler(int) (sig=11) at /home/john/src/kde/kdelibs/kdecore/kcrash.cpp:235 #4 0x419ce9d8 in sigaction () from /lib/libc.so.6 #5 0x081a004c in KabcBridge::expandDistributionLists(QString) (recipients= {static null = {static null = <same as static member of an already seen type>, d = 0x8321858, static shared_null = 0x8321858}, d = 0x8498948, static shared_null = 0x8321858}) at /home/john/src/kde/kdepim/kmail/kmaddrbook.cpp:101 #6 0x08131d4a in KMComposeWin::doSend(int, bool) (this=0x83be470, aSendNow=0, saveInDrafts=false) at /home/john/src/kde/kdepim/kmail/kmcomposewin.cpp:4697 #7 0x08132482 in KMComposeWin::slotSendLater() (this=0x83be470) at /home/john/src/kde/kdepim/kmail/kmcomposewin.cpp:4744 #8 0x08115b25 in KMComposeWin::qt_invoke(int, QUObject*) (this=0x83be470, _id=73, _o=0xbffff060) at kmcomposewin.moc:543 #9 0x412ec7e0 in QObject::activate_signal(QConnectionList*, QUObject*) ( this=0x833a4e8, clist=0x833aa30, o=0xbffff060) at kernel/qobject.cpp:2226 #10 0x412ec6b3 in QObject::activate_signal(int) (this=0x833a4e8, signal=2) at kernel/qobject.cpp:2200 #11 0x40b9d55c in KAction::activated() (this=0x833a4e8) at kaction.moc:157 #12 0x40b9cf36 in KAction::slotActivated() (this=0x833a4e8) at /home/john/src/kde/kdelibs/kdeui/kaction.cpp:1054 #13 0x40b9d852 in KAction::qt_invoke(int, QUObject*) (this=0x833a4e8, _id=14, _o=0xbffff170) at kaction.moc:181 #14 0x412ec916 in QObject::activate_signal(QConnectionList*, QUObject*) ( this=0x84b5610, clist=0x84b5b80, o=0xbffff170) at kernel/qobject.cpp:2246 #15 0x412ec6b3 in QObject::activate_signal(int) (this=0x84b5610, signal=4) at kernel/qobject.cpp:2200 #16 0x415f0459 in QButton::clicked() (this=0x84b5610) at .moc/debug-shared-mt/moc_qbutton.cpp:152 #17 0x41373468 in QButton::mouseReleaseEvent(QMouseEvent*) (this=0x84b5610, e=0xbffff4f0) at widgets/qbutton.cpp:810 #18 0x41322e8c in QWidget::event(QEvent*) (this=0x84b5610, e=0xbffff4f0) at kernel/qwidget.cpp:4345 #19 0x41286b64 in QApplication::internalNotify(QObject*, QEvent*) ( this=0xbffff9f0, receiver=0x84b5610, e=0xbffff4f0) at kernel/qapplication.cpp:2363 #20 0x41286347 in QApplication::notify(QObject*, QEvent*) (this=0xbffff9f0, receiver=0x84b5610, e=0xbffff4f0) at kernel/qapplication.cpp:2172 #21 0x40e2e67b in KApplication::notify(QObject*, QEvent*) (this=0xbffff9f0, receiver=0x84b5610, event=0xbffff4f0) at /home/john/src/kde/kdelibs/kdecore/kapplication.cpp:459 #22 0x4122bc1b in QApplication::sendSpontaneousEvent(QObject*, QEvent*) ( receiver=0x84b5610, event=0xbffff4f0) at kernel/qapplication.h:481 #23 0x4122521a in QETWidget::translateMouseEvent(_XEvent const*) ( this=0x84b5610, event=0xbffff7e0) at kernel/qapplication_x11.cpp:4299 #24 0x41222db3 in QApplication::x11ProcessEvent(_XEvent*) (this=0xbffff9f0, event=0xbffff7e0) at kernel/qapplication_x11.cpp:3445 #25 0x4123af4f in QEventLoop::processEvents(unsigned) (this=0x8367850, flags=4) at kernel/qeventloop_x11.cpp:186 #26 0x4129d2ba in QEventLoop::enterLoop() (this=0x8367850) at kernel/qeventloop.cpp:198 #27 0x4129d1d6 in QEventLoop::exec() (this=0x8367850) at kernel/qeventloop.cpp:145 #28 0x41286cdd in QApplication::exec() (this=0xbffff9f0) at kernel/qapplication.cpp:2487 #29 0x080a4317 in main (argc=7, argv=0xbffffb74) at /home/john/src/kde/kdepim/kmail/main.cpp:188
Subject: Re: New: crashes whenever sending or queing mail On Monday 14 April 2003 08:12, John Firebaugh wrote: > #5 0x081a004c in KabcBridge::expandDistributionLists(QString) > (recipients= {static null = {static null = <same as static member of > an already seen type>, d = 0x8321858, static shared_null = > 0x8321858}, d = 0x8498948, static shared_null = 0x8321858}) at > /home/john/src/kde/kdepim/kmail/kmaddrbook.cpp:101 Corresponding lines: 099 KABC::AddressBook *addressBook = KABC::StdAddressBook::self(); 100 KABC::DistributionListManager manager( addressBook ); 101 manager.load(); Do you get any useful debug messages (like missing symbols)? As nothing changed in kmaddrbook.cpp since March 20 (and the changes back then were completely unrelated) this is either a bug in kdelibs/kdecore/kabc or an installation problem.
Debug output: kmail: -- /usr/local/kde/share/apps/kresources/contact/file.desktop kmail: -- /usr/local/kde/share/apps/kresources/contact/dir.desktop kmail: ResourceManagerImpl(): config: kabcrc kmail: ResourceManagerImpl::loadResource() e2ULqmjpJ kio (KDirWatch): WARNING: KDirWatch::removeDir can't handle '' kmail: ResourceManagerImpl::loadResource() DlEmFNQAa kio (KDirWatch): WARNING: KDirWatch::removeDir can't handle '' *** KMail got signal 11 (Crashing) Total: 1; NUL: 0; CTL: 0; CR: 0; LF: 1; CRLF: 0; lineMin: 0; lineMax: 0; printable: 0; eightBit: 0; trailing whitespace: no; leading 'From ': no; Total: 1; NUL: 0; CTL: 0; CR: 0; LF: 1; CRLF: 0; lineMin: 0; lineMax: 0; printable: 0; eightBit: 0; trailing whitespace: no; leading 'From ': no; appending message to ~/dead.letter.tmp GDB output: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 23315)] 0x405d8cb5 in KABC::DistributionListManager::load() (this=0xbfffea40) at /home/john/src/kde/kdelibs/kabc/distributionlist.cpp:166 166 QMap<QString,QString> entryMap = cfg.entryMap( mAddressBook->identifier() ); (gdb) bt #0 0x405d8cb5 in KABC::DistributionListManager::load() (this=0xbfffea40) at /home/john/src/kde/kdelibs/kabc/distributionlist.cpp:166 #1 0x081a004c in KabcBridge::expandDistributionLists(QString) (recipients= {static null = {static null = <same as static member of an already seen type>, d = 0x8321858, static shared_null = 0x8321858}, d = 0x8487908, static shared_null = 0x8321858}) at /home/john/src/kde/kdepim/kmail/kmaddrbook.cpp:101 #2 0x08131d4a in KMComposeWin::doSend(int, bool) (this=0x83bc0e8, aSendNow=1, saveInDrafts=false) at /home/john/src/kde/kdepim/kmail/kmcomposewin.cpp:4697 valgrind output: ==3931== ==3931== Invalid read of size 4 ==3931== at 0x407C8CB5: KABC::DistributionListManager::load() (/home/john/src/kde/kdelibs/kabc/distributionlist.cpp:166) ==3931== by 0x81A004B: KabcBridge::expandDistributionLists(QString) (/home/john/src/kde/kdepim/kmail/kmaddrbook.cpp:101) ==3931== by 0x8131D49: KMComposeWin::doSend(int, bool) (/home/john/src/kde/kdepim/kmail/kmcomposewin.cpp:4697) ==3931== by 0x813264D: KMComposeWin::slotSendNow() (/home/john/src/kde/kdepim/kmail/kmcomposewin.cpp:4778) ==3931== Address 0x0 is not stack'd, malloc'd or free'd *** KMail got signal 11 (Crashing)
I see this on cvs-head too. It was ok 1 day ago so it could be kabc to blame.
Ok, this is really bizzare. The problem is kabc/stdaddressbook.cpp:63. Somehow the call to the overloaded template function KStaticDeleter::setObject is resolving to the two-argument version -- in other words, the result of 'new StdAddressBook' is being cast to a bool (!). We want the three-argument version of setObject with the default parameter for the last argument. Compiler bug, or weird template name lookup problem? Anyone familiar enough with the C++ lookup rules to know?
To answer my own question: The static deleter is declared as: StdAddressBook *StdAddressBook::mSelf = 0; // ... static KStaticDeleter<AddressBook> addressBookDeleter; The problem is that StdAddressBook*& can be converted to AddressBook*, but not to AddressBook*&. (Exercise for the reader: why not? The answer is quite subtle.) Strange that StdAddressBook*& can be converted to bool though... Anyway the fix is to declare the static deleter as: static KStaticDeleter<StdAddressBook> addressBookDeleter;
Subject: kdelibs/kabc CVS commit by firebaugh: Fix declaration of KStaticDeleter that led to wrong name lookup and hence crashes. Authors of KStatic deleter should look at this: KStaticDeleter::setObject() is overloaded in a dangerous way. CCMAIL:57205-done@bugs.kde.org M +1 -1 stdaddressbook.cpp 1.51 --- kdelibs/kabc/stdaddressbook.cpp #1.50:1.51 @@ -39,5 +39,5 @@ StdAddressBook *StdAddressBook::mSelf = bool StdAddressBook::mAutomaticSave = true; -static KStaticDeleter<AddressBook> addressBookDeleter; +static KStaticDeleter<StdAddressBook> addressBookDeleter; QString StdAddressBook::fileName()
The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product.