Bug 313927 - Telepathy/KDE crashed
Summary: Telepathy/KDE crashed
Status: RESOLVED FIXED
Alias: None
Product: telepathy
Classification: Frameworks and Libraries
Component: text-ui (show other bugs)
Version: 0.5.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: 0.5-next
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-26 15:25 UTC by Dennis Schridde
Modified: 2013-01-27 17:46 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.5.3


Attachments
New crash information added by DrKonqi (8.57 KB, text/plain)
2013-01-26 16:52 UTC, Dennis Schridde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2013-01-26 15:25:56 UTC
Application: ktp-text-ui (0.5.2)
KDE Platform Version: 4.8.5 (4.8.5)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-36-generic i686
Distribution: Ubuntu 12.04.1 LTS

-- Information about the crash:
- What I was doing when the application crashed:
I had the Contact List open, connected my accounts, double-clicked one contact to open a chat window, then decided to set all my accounts offline - while the chat window was still not yet open. Then the chat window opened, after my accounts were already offline, and I closed the window. A while later (few seconds) I received word that Telepathy/KDE had crashed.

-- Backtrace:
Application: Telepathy-Text-Oberfläche (ktp-text-ui), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb5db39c0 (LWP 6634))]

Thread 6 (Thread 0xb3b17b40 (LWP 6643)):
#0  0x05cd0c4f in __pthread_mutex_unlock_usercnt () from /lib/i386-linux-gnu/libpthread.so.0
#1  0x012aa8a4 in pthread_mutex_unlock () from /lib/i386-linux-gnu/libc.so.6
#2  0x041c2410 in g_mutex_unlock () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x0418280b in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x04182faf in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x0418356b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6  0x07b66134 in ?? () from /usr/lib/i386-linux-gnu/gio/modules/libdconfsettings.so
#7  0x041a66b3 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0x05ccdd4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#9  0x0129cd3e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 5 (Thread 0xb31ffb40 (LWP 6644)):
#0  0x012aaa1e in ?? () from /lib/i386-linux-gnu/libc.so.6
#1  0x0128e5d8 in poll () from /lib/i386-linux-gnu/libc.so.6
#2  0x04190a7b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x041830ae in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x0418356b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x05f021ba in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0x041a66b3 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0x05ccdd4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#8  0x0129cd3e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 4 (Thread 0xb27ffb40 (LWP 6645)):
#0  0x00a22416 in __kernel_vsyscall ()
#1  0x05cd196b in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i386-linux-gnu/libpthread.so.0
#2  0x012aa64c in pthread_cond_wait () from /lib/i386-linux-gnu/libc.so.6
#3  0xb6fe0263 in ?? () from /usr/lib/i386-linux-gnu/libQtWebKit.so.4
#4  0xb6fe037f in ?? () from /usr/lib/i386-linux-gnu/libQtWebKit.so.4
#5  0x05ccdd4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#6  0x0129cd3e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 3 (Thread 0xb1efeb40 (LWP 6646)):
#0  0x00a22416 in __kernel_vsyscall ()
#1  0x0128c3eb in read () from /lib/i386-linux-gnu/libc.so.6
#2  0x041c16ae in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x04182bd2 in g_main_context_check () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x04183042 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x04183201 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6  0x0871f8e7 in QEventDispatcherGlib::processEvents (this=0xb1500468, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#7  0x086eb50d in QEventLoop::processEvents (this=0xb1efe230, flags=...) at kernel/qeventloop.cpp:149
#8  0x086eb7a9 in QEventLoop::exec (this=0xb1efe230, flags=...) at kernel/qeventloop.cpp:204
#9  0x085d494c in QThread::exec (this=0x8b77b80) at thread/qthread.cpp:501
#10 0x085d4a3b in QThread::run (this=0x8b77b80) at thread/qthread.cpp:568
#11 0x085d7de0 in QThreadPrivate::start (arg=0x8b77b80) at thread/qthread_unix.cpp:298
#12 0x05ccdd4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#13 0x0129cd3e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 2 (Thread 0xb0fd3b40 (LWP 6647)):
#0  0x05ccfdc8 in pthread_mutex_lock () from /lib/i386-linux-gnu/libpthread.so.0
#1  0x012aa864 in pthread_mutex_lock () from /lib/i386-linux-gnu/libc.so.6
#2  0x041c23d0 in g_mutex_lock () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x04182b85 in g_main_context_check () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x04183042 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x04183201 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6  0x0871f8e7 in QEventDispatcherGlib::processEvents (this=0x8b3f228, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#7  0x086eb50d in QEventLoop::processEvents (this=0xb0fd31f0, flags=...) at kernel/qeventloop.cpp:149
#8  0x086eb7a9 in QEventLoop::exec (this=0xb0fd31f0, flags=...) at kernel/qeventloop.cpp:204
#9  0x085d494c in QThread::exec (this=0x8c70630) at thread/qthread.cpp:501
#10 0x086cab7e in QDnotifySignalThread::run (this=0x8c70630) at io/qfilesystemwatcher_dnotify.cpp:179
#11 0x085d7de0 in QThreadPrivate::start (arg=0x8c70630) at thread/qthread_unix.cpp:298
#12 0x05ccdd4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#13 0x0129cd3e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 1 (Thread 0xb5db39c0 (LWP 6634)):
[KCrash Handler]
#7  0x00eb2be6 in Tp::Contact::avatarData() const () from /usr/lib/i386-linux-gnu/libtelepathy-qt4.so.2
#8  0x00902f7b in LogManager::onEventsFinished (this=0x8b45910, po=0x8b6f588) at /build/buildd/ktp-text-ui-0.5.2/lib/logmanager.cpp:198
#9  0x008db8d9 in LogManager::qt_static_metacall (_o=0x8b45910, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbfd72b78) at /build/buildd/ktp-text-ui-0.5.2/obj-i686-linux-gnu/lib/moc_logmanager.cpp:58
#10 0x087036b1 in QMetaObject::activate (sender=0x8b6f588, m=0x14c59bc, local_signal_index=0, argv=0xbfd72b78) at kernel/qobject.cpp:3547
#11 0x014b44d5 in Tpl::PendingOperation::finished (this=0x8b6f588, _t1=0x8b6f588) at /build/buildd/telepathy-logger-qt-0.5.2/obj-i686-linux-gnu/TelepathyLoggerQt4/_gen/pending-operation.moc.hpp:111
#12 0x014b4a8f in Tpl::PendingOperation::emitFinished (this=0x8b6f588) at /build/buildd/telepathy-logger-qt-0.5.2/TelepathyLoggerQt4/pending-operation.cpp:98
#13 0x014b6658 in qt_static_metacall (_a=0x8c6b3d8, _id=4, _o=0x8b6f588, _c=<optimized out>) at /build/buildd/telepathy-logger-qt-0.5.2/obj-i686-linux-gnu/TelepathyLoggerQt4/_gen/pending-operation.moc.hpp:62
#14 Tpl::PendingOperation::qt_static_metacall (_o=0x8b6f588, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x8c6b3d8) at /build/buildd/telepathy-logger-qt-0.5.2/obj-i686-linux-gnu/TelepathyLoggerQt4/_gen/pending-operation.moc.hpp:52
#15 0x086fec01 in QMetaCallEvent::placeMetaCall (this=0x8c6b3f8, object=0x8b6f588) at kernel/qobject.cpp:525
#16 0x08707c7b in QObject::event (this=0x8b6f588, e=0x8c6b3f8) at kernel/qobject.cpp:1195
#17 0x01c4bed4 in notify_helper (e=0x8c6b3f8, receiver=0x8b6f588, this=0x8904458) at kernel/qapplication.cpp:4559
#18 QApplicationPrivate::notify_helper (this=0x8904458, receiver=0x8b6f588, e=0x8c6b3f8) at kernel/qapplication.cpp:4531
#19 0x01c5130d in QApplication::notify (this=0x8c6b3f8, receiver=0x8b6f588, e=0x8c6b3f8) at kernel/qapplication.cpp:4288
#20 0x005cde01 in KApplication::notify (this=0x88f4380, receiver=0x8b6f588, event=0x8c6b3f8) at ../../kdeui/kernel/kapplication.cpp:311
#21 0x086ec97e in QCoreApplication::notifyInternal (this=0x88f4380, receiver=0x8b6f588, event=0x8c6b3f8) at kernel/qcoreapplication.cpp:876
#22 0x086f0ad8 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#23 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x88d2c30) at kernel/qcoreapplication.cpp:1500
#24 0x086f0e0c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1393
#25 0x0871f494 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#26 postEventSourceDispatch (s=0x8901f00) at kernel/qeventdispatcher_glib.cpp:279
#27 0x04182d86 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#28 0x04183125 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#29 0x04183201 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#30 0x0871f887 in QEventDispatcherGlib::processEvents (this=0x88d39a0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#31 0x01d04aaa in QGuiEventDispatcherGlib::processEvents (this=0x88d39a0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#32 0x086eb50d in QEventLoop::processEvents (this=0xbfd73324, flags=...) at kernel/qeventloop.cpp:149
#33 0x086eb7a9 in QEventLoop::exec (this=0xbfd73324, flags=...) at kernel/qeventloop.cpp:204
#34 0x086f0eba in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#35 0x01c49a74 in QApplication::exec () at kernel/qapplication.cpp:3820
#36 0x0805204b in main (argc=-536870912, argv=0xc8013540) at /build/buildd/ktp-text-ui-0.5.2/app/main.cpp:88

Reported using DrKonqi
Comment 1 David Edmundson 2013-01-26 15:27:39 UTC
Are you able to reproduce this?
Comment 2 Dennis Schridde 2013-01-26 16:24:14 UTC
Have not tried yet.
Comment 3 Dennis Schridde 2013-01-26 16:52:03 UTC
Created attachment 76737 [details]
New crash information added by DrKonqi

ktp-text-ui (0.5.2) on KDE Platform 4.8.5 (4.8.5) using Qt 4.8.1

- What I was doing when the application crashed:

Yes, I am able to reproduce this in exactly the way I described above:
1) Open Contact List
2) Switch from Offline to Online
3) Double-click a contact, with the intend to open a Chat Window
4) Switch to Offline again, before the Chat Window has opened
5) Observe the Chat Window crash right after it appears and see the error message via system notifications: "org.freedesktop.Telepathy.Error.Disconnected: Channel aborted"

-- Backtrace (Reduced):
#7  0x01192be6 in Tp::Contact::avatarData() const () from /usr/lib/i386-linux-gnu/libtelepathy-qt4.so.2
#8  0x004bff7b in LogManager::onEventsFinished (this=0x8ea0a28, po=0x8fcea38) at /build/buildd/ktp-text-ui-0.5.2/lib/logmanager.cpp:198
#9  0x004988d9 in LogManager::qt_static_metacall (_o=0x8ea0a28, _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbf8e57c8) at /build/buildd/ktp-text-ui-0.5.2/obj-i686-linux-gnu/lib/moc_logmanager.cpp:58
[...]
#11 0x01be64d5 in Tpl::PendingOperation::finished (this=0x8fcea38, _t1=0x8fcea38) at /build/buildd/telepathy-logger-qt-0.5.2/obj-i686-linux-gnu/TelepathyLoggerQt4/_gen/pending-operation.moc.hpp:111
#12 0x01be6a8f in Tpl::PendingOperation::emitFinished (this=0x8fcea38) at /build/buildd/telepathy-logger-qt-0.5.2/TelepathyLoggerQt4/pending-operation.cpp:98
Comment 4 David Edmundson 2013-01-26 17:17:25 UTC
Perfect, thanks
Comment 5 David Edmundson 2013-01-26 17:35:55 UTC
There are two possible ways this is crashing either

connection->selfContact() is null
OR
channel->targetContact() is null..

I'd like a dev to work out which before we continue

I think either the connection or the channel get invalidated before we can properly start up, we start the log manager async - so even though the UI drops properly the log manager then finishes  but one of the two (or both) have been invalidated in the mean time so calls to selfContact/targetContact return null pointers.

Possible fixes are:
 - we check in LogManager::onEventsFinished before usage.
 - we delete any active logmanager instances inside ChatWidget::setEnabled()
Comment 6 Daniel Vrátil 2013-01-26 20:10:53 UTC
I'm afraid deleting the LogManager won't help, because Tpl::LogManager is a singleton, so PendingOperation will finish anyway and we would get crash because of invalid "this".
Comment 7 David Edmundson 2013-01-26 20:15:32 UTC
That settles that then :)
Comment 8 Daniel Vrátil 2013-01-27 17:46:45 UTC
Git commit 3730b4eabd0018737fbd0ab87b44a1237179fcf9 by Dan Vrátil.
Committed on 27/01/2013 at 18:45.
Pushed by dvratil into branch 'kde-telepathy-0.5'.

Don't crash when account goes offline while we are loading history

Also clean up coding style in the file a bit.
REVIEW: 108607
FIXED-IN: 0.5.3

M  +16   -7    lib/logmanager.cpp

http://commits.kde.org/telepathy-text-ui/3730b4eabd0018737fbd0ab87b44a1237179fcf9