Bug 278757 - can't add contacts in contactlist
Summary: can't add contacts in contactlist
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Unmaintained
Component: contactlist (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: 0.4.0
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-29 07:26 UTC by Michi
Modified: 2012-07-06 12:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michi 2011-07-29 07:26:24 UTC
Application: telepathy-kde-contactlist (0.1)
KDE Platform Version: 4.7.00 (4.7.0)
Qt Version: 4.7.4
Operating System: Linux 3.0.0-4-desktop x86_64
Distribution: "openSUSE 12.1 Milestone 2 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:

in the buddy list I simply try to add a new contact (+ button). The following dialog is showing an empty account combo box and a field for the screen name. Since I can't do anything about an empty combo box I can only add a screen name and try to head on. That's when the crash happens.

-- Backtrace:
Application: Telepathy KDE Contact List (telepathy-kde-contactlist), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f9c75583760 (LWP 8419))]

Thread 3 (Thread 0x7f9c6630f700 (LWP 8425)):
#0  0x00007f9c7010a0eb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9c7358100e in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f9c73575a7f in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f9c73580c05 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f9c70105e55 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f9c722ac86d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f9c65b0e700 (LWP 8426)):
#0  0x00007f9c7010a0eb in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f9c7358100e in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f9c73575a7f in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f9c73580c05 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f9c70105e55 in start_thread () from /lib64/libpthread.so.0
#5  0x00007f9c722ac86d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f9c75583760 (LWP 8419)):
[KCrash Handler]
#6  Tp::Account::connection (this=0x0) at /usr/src/debug/telepathy-qt4-0.7.1.60.1310094280/TelepathyQt4/account.cpp:1658
#7  0x000000000042aa12 in MainWidget::onAddContactRequest (this=0x75fa10) at /usr/src/debug/telepathy-contact-list-0.09git.1311616312/main-widget.cpp:714
#8  0x0000000000431c5e in MainWidget::qt_metacall (this=0x75fa10, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fffa673ce60) at /usr/src/debug/telepathy-contact-list-0.09git.1311616312/build/main-widget.moc:184
#9  0x00007f9c73679fda in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#10 0x00007f9c72a31472 in QAction::triggered(bool) () from /usr/lib64/libQtGui.so.4
#11 0x00007f9c72a3165f in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQtGui.so.4
#12 0x00007f9c72deb13a in ?? () from /usr/lib64/libQtGui.so.4
#13 0x00007f9c72deb3ec in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#14 0x00007f9c72ea781a in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#15 0x00007f9c72a880d6 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#16 0x00007f9c72a37a84 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#17 0x00007f9c72a3d20b in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#18 0x00007f9c74a239f6 in KApplication::notify (this=0x7fffa673e440, receiver=0x86cfa0, event=0x7fffa673d740) at /usr/src/debug/kdelibs-4.7.0/kdeui/kernel/kapplication.cpp:311
#19 0x00007f9c7366727c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#20 0x00007f9c72a38a52 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQtGui.so.4
#21 0x00007f9c72ab4785 in ?? () from /usr/lib64/libQtGui.so.4
#22 0x00007f9c72ab365a in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#23 0x00007f9c72adac82 in ?? () from /usr/lib64/libQtGui.so.4
#24 0x00007f9c6dcdf9dd in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#25 0x00007f9c6dce01d8 in ?? () from /usr/lib64/libglib-2.0.so.0
#26 0x00007f9c6dce03a9 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#27 0x00007f9c73691f1f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#28 0x00007f9c72ada90e in ?? () from /usr/lib64/libQtGui.so.4
#29 0x00007f9c73666482 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#30 0x00007f9c7366667f in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#31 0x00007f9c7366a847 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#32 0x0000000000419890 in main (argc=1, argv=0x7fffa673e718) at /usr/src/debug/telepathy-contact-list-0.09git.1311616312/main.cpp:62

Reported using DrKonqi
Comment 1 Martin Klapetek 2011-07-29 12:08:55 UTC
Is your account (any) connected?
Comment 2 David Edmundson 2011-07-29 12:14:50 UTC
Good spot, main-widget.cpp:712 needs a check that the returned account is valid.
Checking account->connection() should be safe enough, and catch issues with the account disconnecting too.

As for the empty list, I would also guess that one of the accounts is offline. We also hide any accounts which do not support adding of contacts (IRC, for example).

I'm confirming the crash is valid, the "empty list" needs more info. 
 - what accounts do you have.
 - are you sure they were connected. 
This should probably be a separate bug report to the crash, as they're not related.
Comment 3 Michi 2011-07-29 13:48:02 UTC
(In reply to comment #2)
> Good spot, main-widget.cpp:712 needs a check that the returned account is
> valid.
> Checking account->connection() should be safe enough, and catch issues with the
> account disconnecting too.
> 
> As for the empty list, I would also guess that one of the accounts is offline.
> We also hide any accounts which do not support adding of contacts (IRC, for
> example).
> 
> I'm confirming the crash is valid, the "empty list" needs more info. 
>  - what accounts do you have.
>  - are you sure they were connected. 
> This should probably be a separate bug report to the crash, as they're not
> related.

I tried with both bonjour and SIP account, both were connected (I don't know about the situation when I reported, at least it definitely happens when connected too).
My google IM account does not connect due to a network error, which I can't track down (have not found any logfiles or anything, so no bug report about that unfortunately).
Comment 4 Martin Klapetek 2011-09-13 10:18:26 UTC
Git commit d19ba7525a6b8e033a6a1e0ad8e548f3d0f186fc by Martin Klapetek.
Committed on 13/09/2011 at 12:15.
Pushed by mklapetek into branch 'master'.

Prevent a crash when no account was selected in the Add Contact dialog or when the connection() of that account is null.

BUG: 278757

M  +15   -4    main-widget.cpp

http://commits.kde.org/telepathy-contact-list/d19ba7525a6b8e033a6a1e0ad8e548f3d0f186fc