Bug 339196 - crash when opening the group chat dialog in KTp::JoinChatRoomDialog::loadFavoriteRooms()
Summary: crash when opening the group chat dialog in KTp::JoinChatRoomDialog::loadFavo...
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: contactlist (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-19 07:51 UTC by Bernhard E. Reiter
Modified: 2014-10-18 16:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard E. Reiter 2014-09-19 07:51:21 UTC
getting a ktp-contactlist crash when trying to open the joinchatroom dialog.

Happens with
OpenSuse 13.1 with Distribution: KDE:Extra / KDE_Current_openSUSE_13.1dr
Name        : ktp-contact-list
Version     : 0.8.80
Release     : 22.1
Architecture: x86_64
obs://build.opensuse.org/KDE

Name        : ktp-contact-list
Architecture: x86_64
Signature   : DSA/SHA1, Do 18 Sep 2014 14:47:30 CEST, Key ID 27c070176f88bb2f
Source RPM  : ktp-contact-list-0.8.80-20.2.src.rpm
Build Date  : Do 18 Sep 2014 14:47:17 CEST

Appears after the update to OpenSuse 13.1 (before I was using 12.3 with current KDE stable release)
A typical backtrace:

gdb ktp-contactlist
run --nocrashhandler --nofork

[New Thread 0x7fffd7fff700 (LWP 30358)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff58fd26c in QVariant::toString() const ()
   from /usr/lib64/libQtCore.so.4

(gdb) bt
#0  0x00007ffff58fd26c in QVariant::toString() const ()
   from /usr/lib64/libQtCore.so.4
#1  0x00007ffff7726f05 in KTp::JoinChatRoomDialog::loadFavoriteRooms() ()
   from /usr/lib64/libktpwidgetsprivate.so.8
#2  0x00007ffff7727ec7 in KTp::JoinChatRoomDialog::JoinChatRoomDialog(Tp::SharedPtr<Tp::AccountManager>, QWidget*) () from /usr/lib64/libktpwidgetsprivate.so.8
#3  0x0000000000438510 in MainWidget::onJoinChatRoomRequested (
    this=<optimized out>)
    at /usr/src/debug/ktp-contact-list-0.8.80/main-widget.cpp:263
#4  0x00007ffff58efd68 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#5  0x00007ffff452c752 in QAction::triggered(bool) ()
   from /usr/lib64/libQtGui.so.4
#6  0x00007ffff452e123 in QAction::activate(QAction::ActionEvent) ()
   from /usr/lib64/libQtGui.so.4
#7  0x00007ffff48e0602 in ?? () from /usr/lib64/libQtGui.so.4
#8  0x00007ffff48e072c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib64/libQtGui.so.4
#9  0x00007ffff49976aa in QToolButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib64/libQtGui.so.4
#10 0x00007ffff4581dfe in QWidget::event(QEvent*) ()
   from /usr/lib64/libQtGui.so.4
#11 0x00007ffff45328ac in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib64/libQtGui.so.4
#12 0x00007ffff4538fad in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib64/libQtGui.so.4
#13 0x00007ffff70cb5ea in KApplication::notify(QObject*, QEvent*) ()
   from /usr/lib64/libkdeui.so.5
#14 0x00007ffff58dc0ad in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib64/libQtCore.so.4
#15 0x00007ffff4538763 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /usr/lib64/libQtGui.so.4
#16 0x00007ffff45a9f7b in ?? () from /usr/lib64/libQtGui.so.4
#17 0x00007ffff45a89ec in QApplication::x11ProcessEvent(_XEvent*) ()
   from /usr/lib64/libQtGui.so.4
#18 0x00007ffff45cf882 in ?? () from /usr/lib64/libQtGui.so.4
#19 0x00007fffef187316 in g_main_context_dispatch ()
   from /usr/lib64/libglib-2.0.so.0
#20 0x00007fffef187668 in ?? () from /usr/lib64/libglib-2.0.so.0
#21 0x00007fffef18770c in g_main_context_iteration ()
   from /usr/lib64/libglib-2.0.so.0
#22 0x00007ffff5908d55 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#23 0x00007ffff45cf936 in ?? () from /usr/lib64/libQtGui.so.4
#24 0x00007ffff58dad0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#25 0x00007ffff58db005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#26 0x00007ffff58e013b in QCoreApplication::exec() ()
   from /usr/lib64/libQtCore.so.4
#27 0x000000000041faf9 in main (argc=3, argv=0x7fffffffdbd8)
at /usr/src/debug/ktp-contact-list-0.8.80/main.cpp:64






Reproducible: Always

Steps to Reproduce:
1. start ktp-contactlist (either on the command line or via the menue)
2. press the "join groupchat" button (it is a visual '#')
(Does not depend on if I am offline or online.)

Actual Results:  
crash

Expected Results:  
Join Groupchat dialog opens.

I guess some old configuration setup causes the issue to appear.
I have two accounts configured, but there used to be favourite rooms
before the upgrade when I've opened the dialog. They are not there.
Looking for them in .local shows that there is no config file.

1833843    4 drwx------   3 bernhard users        4096 Jun  6  2012 /home/bernhard/.local/share/telepathy/
1833844    4 drwx------   2 bernhard users        4096 Sep 19 09:21 /home/bernhard/.local/share/telepathy/mission-control
1857460    4 -rw-------   1 bernhard users         954 Sep 19 09:21 /home/bernhard/.local/share/telepathy/mission-control/accounts.cfg
1839795    4 -rw-------   1 bernhard users          38 Sep 19 09:21 /home/bernhard/.local/share/telepathy/mission-control/accounts-goa.cfg
1857924   36 -rw-------   1 bernhard users       36269 Feb 25  2014 /home/bernhard/.local/share/telepathy/mission-control/gabble-jabber-bernhard_40chat_2eintevation_2eorg0.avatar
Comment 1 Luiz Angelo De Luca 2014-10-17 22:04:44 UTC
Just got the same crash.

Also OpenSuSE but running a kf5 session.
Comment 2 Luiz Angelo De Luca 2014-10-17 22:06:23 UTC
I'll add my BT as it seems to have some more info:

Thread 1 (Thread 0x7f31d31d7880 (LWP 12434)):
[KCrash Handler]
#5  0x00007f31d0b4826c in QVariant::toString() const () from /usr/lib64/libQtCore.so.4
#6  0x00007f31d2969f05 in KTp::JoinChatRoomDialog::loadFavoriteRooms (this=this@entry=0xbaf560) at /usr/src/debug/ktp-common-internals-0.8.80/KTp/Widgets/join-chat-room-dialog.cpp:472
#7  0x00007f31d296aec7 in KTp::JoinChatRoomDialog::JoinChatRoomDialog (this=0xbaf560, accountManager=..., parent=<optimized out>) at /usr/src/debug/ktp-common-internals-0.8.80/KTp/Widgets/join-chat-room-dialog.cpp:74
#8  0x0000000000438510 in MainWidget::onJoinChatRoomRequested (this=<optimized out>) at /usr/src/debug/ktp-contact-list-0.8.80/main-widget.cpp:263
#9  0x00007f31d0b3ad68 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#10 0x00007f31cf777752 in QAction::triggered(bool) () from /usr/lib64/libQtGui.so.4
#11 0x00007f31cf779123 in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQtGui.so.4
#12 0x00007f31cfb2b612 in ?? () from /usr/lib64/libQtGui.so.4
#13 0x00007f31cfb2b73c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#14 0x00007f31cfbe26ba in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#15 0x00007f31cf7ccdfe in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#16 0x00007f31cf77d8ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#17 0x00007f31cf783fad in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#18 0x00007f31d230e59a in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#19 0x00007f31d0b270ad in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#20 0x00007f31cf783763 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQtGui.so.4
#21 0x00007f31cf7f4f7b in ?? () from /usr/lib64/libQtGui.so.4
#22 0x00007f31cf7f39ec in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#23 0x00007f31cf81a882 in ?? () from /usr/lib64/libQtGui.so.4
#24 0x00007f31cad28316 in g_main_dispatch (context=0x705380) at gmain.c:3066
#25 g_main_context_dispatch (context=context@entry=0x705380) at gmain.c:3642
#26 0x00007f31cad28668 in g_main_context_iterate (context=context@entry=0x705380, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3713
#27 0x00007f31cad2870c in g_main_context_iteration (context=0x705380, may_block=1) at gmain.c:3774
#28 0x00007f31d0b53d76 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#29 0x00007f31cf81a936 in ?? () from /usr/lib64/libQtGui.so.4
#30 0x00007f31d0b25d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#31 0x00007f31d0b26005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#32 0x00007f31d0b2b13b in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#33 0x000000000041faf9 in main (argc=1, argv=0x7fff426f7b38) at /usr/src/debug/ktp-contact-list-0.8.80/main.cpp:64
Comment 3 David Edmundson 2014-10-18 16:25:45 UTC
Git commit 86e6df06e2ac2c7c29e0d866a10a19fdafb18211 by David Edmundson, on behalf of Diane Trout.
Committed on 18/10/2014 at 16:26.
Pushed by davidedmundson into branch 'kde-telepathy-0.9'.

Handle the case where there is not a valid recentRoomsGroup.

I have some inactive accounts and for some rason the Q\_FOREACH was
being executed by the readEntry was returning an invalid recent list.

This handles that case and prevents a crash when accessing off the end
of the list.

REVIEW: 120588
FIXED-IN: 0.9.0

M  +11   -7    KTp/Widgets/join-chat-room-dialog.cpp

http://commits.kde.org/telepathy-common-internals/86e6df06e2ac2c7c29e0d866a10a19fdafb18211