Bug 274148

Summary: cl crashes when cancel file transfer
Product: [Unmaintained] telepathy Reporter: Alin M Elena <alinm.elena>
Component: contactlistAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: 0.4.0   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alin M Elena 2011-05-25 22:42:49 UTC
Application: telepathy-kde-contactlist (0.1)
KDE Platform Version: 4.6.80 (4.7 Beta1) "release 2"
Qt Version: 4.7.3
Operating System: Linux 2.6.38-4-desktop x86_64
Distribution: "openSUSE 12.1 Milestone 0 (x86_64)"

-- Information about the crash:
cl crashes when cancel file transfer
get a contact that claims to support file transfer
click on the clip... 
you should get the file selection dialog
choose cancel... and cl crashes

The crash can be reproduced every time.

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

Thread 2 (Thread 0x7fb6a85a5700 (LWP 12892)):
#0  0x00007fb6b42f4c83 in poll () from /lib64/libc.so.6
#1  0x00007fb6afd88b84 in ?? () from /lib64/libglib-2.0.so.0
#2  0x00007fb6afd890b9 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x00007fb6b56beac6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fb6b5692ec2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fb6b56930bf in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fb6b55aa7df in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fb6b5675f4f in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fb6b55ad225 in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007fb6b21a8b4f in start_thread () from /lib64/libpthread.so.0
#10 0x00007fb6b42fdb3d in clone () from /lib64/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb6b75c0760 (LWP 12602)):
[KCrash Handler]
#6  0x00007fb6b701ff11 in Tp::DBusProxy::dbusConnection() const () from /usr/lib64/libtelepathy-qt4.so.1
#7  0x00007fb6b704be6b in ?? () from /usr/lib64/libtelepathy-qt4.so.1
#8  0x00007fb6b6f3539a in Tp::Account::createFileTransfer(Tp::SharedPtr<Tp::Contact> const&, Tp::FileTransferChannelCreationProperties const&, QDateTime const&, QString const&, Tp::ChannelRequestHints const&) () from /usr/lib64/libtelepathy-qt4.so.1
#9  0x00007fb6b6f3544e in Tp::Account::createFileTransfer(Tp::SharedPtr<Tp::Contact> const&, Tp::FileTransferChannelCreationProperties const&, QDateTime const&, QString const&) () from /usr/lib64/libtelepathy-qt4.so.1
#10 0x000000000042f3a4 in MainWidget::startFileTransferChannel (this=0x7fda20, index=<optimized out>) at /usr/src/debug/telepathy-contact-list-0.1git.1306230155/main-widget.cpp:612
#11 0x0000000000435895 in MainWidget::qt_metacall (this=0x7fda20, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fffa4c60c60) at /usr/src/debug/telepathy-contact-list-0.1git.1306230155/build/main-widget.moc:162
#12 0x00007fb6b56a6a6a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#13 0x000000000041c750 in FileTransferContactOverlay::activated (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/telepathy-contact-list-0.1git.1306230155/build/contact-overlays.moc:314
#14 0x000000000041c79c in FileTransferContactOverlay::slotClicked (this=0x91bab0, checked=<optimized out>) at /usr/src/debug/telepathy-contact-list-0.1git.1306230155/contact-overlays.cpp:419
#15 0x000000000041c82c in FileTransferContactOverlay::qt_metacall (this=0x91bab0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fffa4c60da0) at /usr/src/debug/telepathy-contact-list-0.1git.1306230155/build/contact-overlays.moc:302
#16 0x00007fb6b56a6a6a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#17 0x00007fb6b50d0252 in QAbstractButton::clicked(bool) () from /usr/lib64/libQtGui.so.4
#18 0x00007fb6b4e1817e in ?? () from /usr/lib64/libQtGui.so.4
#19 0x00007fb6b4e194bb in ?? () from /usr/lib64/libQtGui.so.4
#20 0x00007fb6b4e1972c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQtGui.so.4
#21 0x00007fb6b4ab93e6 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#22 0x00007fb6b4a68de4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#23 0x00007fb6b4a6e56b in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#24 0x00007fb6b6a52176 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#25 0x00007fb6b5693cbc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#26 0x00007fb6b4a69db2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQtGui.so.4
#27 0x00007fb6b4ae5ac5 in ?? () from /usr/lib64/libQtGui.so.4
#28 0x00007fb6b4ae499a in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#29 0x00007fb6b4b0be62 in ?? () from /usr/lib64/libQtGui.so.4
#30 0x00007fb6afd8864d in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#31 0x00007fb6afd88e28 in ?? () from /lib64/libglib-2.0.so.0
#32 0x00007fb6afd890b9 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#33 0x00007fb6b56bea5f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#34 0x00007fb6b4b0baee in ?? () from /usr/lib64/libQtGui.so.4
#35 0x00007fb6b5692ec2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#36 0x00007fb6b56930bf in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#37 0x00007fb6b56972b7 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#38 0x000000000041801e in main (argc=1, argv=0x7fffa4c62638) at /usr/src/debug/telepathy-contact-list-0.1git.1306230155/main.cpp:60

Reported using DrKonqi
Comment 1 David Edmundson 2011-05-28 15:34:05 UTC
Git commit 11619254779d3c3ea56b254316fe19f86b3c6312 by David Edmundson.
Committed on 27/05/2011 at 16:57.
Pushed by davidedmundson into branch 'master'.

Replace passing round QModelIndexes with ContactModelItem* this fixes various crashes when using proxy models.

Reviewed by Martin Klapetek

BUG: 274148
BUG: 274160
REVIEW: 101448

M  +4    -26   accounts-model.cpp     
M  +3    -3    accounts-model.h     
M  +17   -4    contact-overlays.cpp     
M  +6    -9    contact-overlays.h     
M  +56   -88   main-widget.cpp     
M  +5    -4    main-widget.h     

http://commits.kde.org/telepathy-contact-list/11619254779d3c3ea56b254316fe19f86b3c6312