Bug 239996 - kabcclient crashes
Summary: kabcclient crashes
Status: RESOLVED FIXED
Alias: None
Product: kdepim
Classification: Applications
Component: libkdepim (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-29 18:12 UTC by Russ Fineman
Modified: 2011-06-16 17:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (3.68 KB, text/plain)
2011-05-13 08:17 UTC, John Zaitseff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Russ Fineman 2010-05-29 18:12:53 UTC
Application: kabc2mutt (0.8.1)
KDE Platform Version: 4.4.3 (KDE 4.4.3)
Qt Version: 4.6.3
Operating System: Linux 2.6.31.12-0.2-desktop x86_64
Distribution: "openSUSE 11.2 (x86_64)"

-- Information about the crash:
using command kabcclient -L from command line. got error on konsole:
 kabcclient -L
kabcclient(5293)/kdecore (KSycoca): Trying to open ksycoca from  "/var/tmp/kdecache-finemanruss/ksycoca4"
kabcclient(5293)/kio (KDirWatch) KDirWatchPrivate::removeEntry: doesn't know "/home/finemanruss/.kde4/share/apps/kabc" 
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
KCrash: Application 'kabcclient' crashing...
sock_file=/home/finemanruss/.kde4/socket-linux-7utx/kdeinit4__0

[1]+  Stopped                 kabcclient -L

KDE 4.4.3, openSUSE 11.2 (2.6.31.12-0.2-desktop)
Kontact 4.4.3
Kmail 1.13.3
Kaddressbook 4.4.3


 -- Backtrace:
Application: KABC client (kabc2mutt), signal: Segmentation fault
[KCrash Handler]
#5  0x00007fe0cf1a6ff0 in strlen () from /lib64/libc.so.6
#6  0x000000000041c968 in length (__s=<value optimized out>) at /usr/include/c++/4.4/bits/char_traits.h:263
#7  operator<< <std::char_traits<char> > (__s=<value optimized out>) at /usr/include/c++/4.4/ostream:510
#8  VCardOutput::writeAddresseeList (__s=<value optimized out>) at /usr/src/debug/kdepim-4.4.3/console/kabcclient/src/outputformatimpls.cpp:234
#9  0x0000000000413bdf in KABCClient::performList (this=0x7fffe0ec3ed0) at /usr/src/debug/kdepim-4.4.3/console/kabcclient/src/kabcclient.cpp:459
#10 0x0000000000417bb8 in KABCClient::slotAddressBookLoaded (this=0x7fffe0ec3ed0) at /usr/src/debug/kdepim-4.4.3/console/kabcclient/src/kabcclient.cpp:750
#11 0x0000000000417c10 in KABCClient::qt_metacall (this=0x7fffe0ec3ed0, _c=InvokeMetaMethod, _id=<value optimized out>, _a=<value optimized out>)
    at /usr/src/debug/kdepim-4.4.3/build/console/kabcclient/src/kabcclient.moc:72
#12 0x00007fe0d0798916 in QMetaObject::activate (sender=0x7e1940, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fe0cf1f8a37) at kernel/qobject.cpp:3287
#13 0x00007fe0d079fd8f in QSingleShotTimer::timerEvent (this=0x7e1940) at kernel/qtimer.cpp:308
#14 0x00007fe0d07951a3 in QObject::event (this=0x7e1940, e=0x7fffe0ec3960) at kernel/qobject.cpp:1204
#15 0x00007fe0cf94c35c in QApplicationPrivate::notify_helper (this=0x643e20, receiver=0x7e1940, e=0x7fffe0ec3960) at kernel/qapplication.cpp:4302
#16 0x00007fe0cf95293b in QApplication::notify (this=0x7fffe0ec3f50, receiver=0x7e1940, e=0x7fffe0ec3960) at kernel/qapplication.cpp:4185
#17 0x00007fe0d10e04e6 in KApplication::notify (this=0x7fffe0ec3f50, receiver=0x7e1940, event=0x7fffe0ec3960) at /usr/src/debug/kdelibs-4.4.3/kdeui/kernel/kapplication.cpp:302
#18 0x00007fe0d078567c in QCoreApplication::notifyInternal (this=0x7fffe0ec3f50, receiver=0x7e1940, event=0x7fffe0ec3960) at kernel/qcoreapplication.cpp:726
#19 0x00007fe0d07b2435 in sendEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.h:215
#20 QTimerInfoList::activateTimers (event=<value optimized out>, receiver=<value optimized out>) at kernel/qeventdispatcher_unix.cpp:617
#21 0x00007fe0d07aefe4 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#22 0x00007fe0cc1c5dee in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#23 0x00007fe0cc1c97b8 in ?? () from /usr/lib64/libglib-2.0.so.0
#24 0x00007fe0cc1c98e0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#25 0x00007fe0d07aecd3 in QEventDispatcherGlib::processEvents (this=0x62bbc0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#26 0x00007fe0cf9fab2e in QGuiEventDispatcherGlib::processEvents (this=0xffff801f3fd28fd8, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#27 0x00007fe0d0783f92 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#28 0x00007fe0d078436c in QEventLoop::exec (this=0x7fffe0ec3cb0, flags=) at kernel/qeventloop.cpp:201
#29 0x00007fe0d078901b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003
#30 0x000000000040e550 in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/src/debug/kdepim-4.4.3/console/kabcclient/src/main.cpp:256

Reported using DrKonqi
Comment 1 John Zaitseff 2011-05-13 08:17:44 UTC
Created attachment 59951 [details]
New crash information added by DrKonqi

kabcclient (0.8.1) on KDE Platform 4.6.3 (4.6.3) using Qt 4.7.2

- What I was doing when the application crashed:

I can confirm that kabcclient crashes (segmentation fault) when invoked from the command line as "kabcclient -L".

-- Backtrace (Reduced):
#8  0x08061eb7 in length (this=0x98672a8, addresseeList=..., stream=...) at /usr/include/c++/4.5/bits/char_traits.h:263
#9  operator<< <std::char_traits<char> > (this=0x98672a8, addresseeList=..., stream=...) at /usr/include/c++/4.5/ostream:513
#10 VCardOutput::writeAddresseeList (this=0x98672a8, addresseeList=..., stream=...) at ../../../../console/kabcclient/src/outputformatimpls.cpp:234
#11 0x08059ddb in KABCClient::performList (this=0xbf9b4744) at ../../../../console/kabcclient/src/kabcclient.cpp:459
#12 0x0805e078 in KABCClient::slotAddressBookLoaded (this=0xbf9b4744) at ../../../../console/kabcclient/src/kabcclient.cpp:750
Comment 2 John Zaitseff 2011-05-13 08:49:35 UTC
Further to my confirmatory post: running "kabcclient -L -oc utf8" causes the application to segfault; running "kabcclient -L -oc iso8859-1" works, even though the output is NOT ISO-8859-1 but UTF-8 (a bug in itself!).
Comment 3 Kevin Krammer 2011-05-15 12:44:33 UTC
I've tried to reproduce this with the executable shipped on Debian and the one I built from master.
Also tried running the excutable from Debian (KDEPIM 4.4.10 I think) with newer KDE.

All tests so far worked.

Since both backtraces indicate a problem when writing the results to output, it is probably dependent on some data in one of your address book entries.

Maybe one of you has time to try finding the problematic entry using
kabcclient -S "name"

This is almost certainly related to the encoding problem, so it is most likely an entry with any field containing non ASCII characters.
Comment 4 Kevin Krammer 2011-06-16 17:16:33 UTC
Git commit f5bf00638a3cefe7f23cd5f428598fb0ca921833 by Kevin Krammer.
Committed on 16/06/2011 at 17:12.
Pushed by krake into branch '4.6'.

Fix output encoding for vcard output

KABC::VCardConverter creates UTF-8 encoded output, so implicitly
converting that to QString and then converting with output codec
resulted in a broken chain conversions.

Now check if output codec is not UTF-8 and then recode vcard output
from UTF-8 to QString before passing that to the chosen output
converter.
BUG: 239996

M  +16   -4    console/kabcclient/src/outputformatimpls.cpp     

http://commits.kde.org/kdepim/f5bf00638a3cefe7f23cd5f428598fb0ca921833
Comment 5 Kevin Krammer 2011-06-16 17:17:02 UTC
Git commit c2ff3d4dc89883773d9cf3cb9fb206520cf22e45 by Kevin Krammer.
Committed on 16/06/2011 at 17:12.
Pushed by krake into branch 'master'.

Fix output encoding for vcard output

KABC::VCardConverter creates UTF-8 encoded output, so implicitly
converting that to QString and then converting with output codec
resulted in a broken chain conversions.

Now check if output codec is not UTF-8 and then recode vcard output
from UTF-8 to QString before passing that to the chosen output
converter.
BUG: 239996

M  +16   -4    console/kabcclient/src/outputformatimpls.cpp     

http://commits.kde.org/kdepim/c2ff3d4dc89883773d9cf3cb9fb206520cf22e45