Bug 322135

Summary: kde-text-ui crashed upon close
Product: [Unmaintained] telepathy Reporter: Dennis Schridde <heri+kde>
Component: text-uiAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: kde
Priority: NOR    
Version: 0.6.2   
Target Milestone: Future   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dennis Schridde 2013-07-08 22:17:55 UTC
Application: ktp-text-ui (0.6.2)
KDE Platform Version: 4.10.5
Qt Version: 4.8.4
Operating System: Linux 3.10.0-gentoo x86_64
Distribution: "Gentoo Base System release 2.2"

-- Information about the crash:
- What I was doing when the application crashed: I closed the chat window and it crashed right then. Right before that I wrote a message.

-- Backtrace:
Application: Telepathy-Text-Oberfläche (ktp-text-ui), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f51fa8f9780 (LWP 16788))]

Thread 3 (Thread 0x7f51f5564700 (LWP 16791)):
#0  0x0000003a0480b8b4 in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x0000003ac7736f4b in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x0000003ac7737049 in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#3  0x0000003a04807dff in start_thread () from /lib64/libpthread.so.0
#4  0x0000003a040e701d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f51f4c63700 (LWP 16792)):
#0  0x00007fff1f9727ff in clock_gettime ()
#1  0x0000003a040f889d in clock_gettime () from /lib64/libc.so.6
#2  0x0000003fd7ccf784 in do_gettime (frac=0x7f51f4c62ba8, sec=0x7f51f4c62ba0) at tools/qelapsedtimer_unix.cpp:123
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#4  0x0000003fd7da10ed in QTimerInfoList::updateCurrentTime (this=this@entry=0x7f51f0002660) at kernel/qeventdispatcher_unix.cpp:354
#5  0x0000003fd7da1433 in QTimerInfoList::timerWait (this=0x7f51f0002660, tm=...) at kernel/qeventdispatcher_unix.cpp:461
#6  0x0000003fd7d9fedc in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7f51f4c62c94) at kernel/qeventdispatcher_glib.cpp:136
#7  0x0000003fd7d9ff7d in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#8  0x0000003a0604699f in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#9  0x0000003a0604702b in ?? () from /usr/lib64/libglib-2.0.so.0
#10 0x0000003a06047224 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#11 0x0000003fd7da080e in QEventDispatcherGlib::processEvents (this=0x7f51f00008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#12 0x0000003fd7d71cdf in QEventLoop::processEvents (this=this@entry=0x7f51f4c62e70, flags=...) at kernel/qeventloop.cpp:149
#13 0x0000003fd7d71f60 in QEventLoop::exec (this=this@entry=0x7f51f4c62e70, flags=...) at kernel/qeventloop.cpp:204
#14 0x0000003fd7c78480 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#15 0x0000003fd7c7b37c in QThreadPrivate::start (arg=0x2873670) at thread/qthread_unix.cpp:338
#16 0x0000003a04807dff in start_thread () from /lib64/libpthread.so.0
#17 0x0000003a040e701d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f51fa8f9780 (LWP 16788)):
[KCrash Handler]
#6  ChatWidget::acknowledgeMessages (this=0x0) at /var/tmp/portage/net-im/ktp-text-ui-0.6.2/work/ktp-text-ui-0.6.2/lib/chat-widget.cpp:495
#7  0x00000000004137f6 in ChatWindow::event (this=0x2705f00, e=0x7fff1f8acc70) at /var/tmp/portage/net-im/ktp-text-ui-0.6.2/work/ktp-text-ui-0.6.2/app/chat-window.cpp:862
#8  0x0000003ac59cb66c in QApplicationPrivate::notify_helper (this=this@entry=0x2465900, receiver=receiver@entry=0x2705f00, e=e@entry=0x7fff1f8acc70) at kernel/qapplication.cpp:4562
#9  0x0000003ac59cfa2a in QApplication::notify (this=this@entry=0x245da70, receiver=receiver@entry=0x2705f00, e=e@entry=0x7fff1f8acc70) at kernel/qapplication.cpp:4423
#10 0x0000003ac3e41dbb in KApplication::notify (this=0x245da70, receiver=0x2705f00, event=0x7fff1f8acc70) at /var/tmp/portage/kde-base/kdelibs-4.10.5/work/kdelibs-4.10.5/kdeui/kernel/kapplication.cpp:311
#11 0x0000003fd7d72f4d in QCoreApplication::notifyInternal (this=0x245da70, receiver=receiver@entry=0x2705f00, event=event@entry=0x7fff1f8acc70) at kernel/qcoreapplication.cpp:946
#12 0x0000003ac59cf5bd in sendSpontaneousEvent (event=0x7fff1f8acc70, receiver=0x2705f00) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#13 QApplication::setActiveWindow (act=act@entry=0x2727220) at kernel/qapplication.cpp:2641
#14 0x0000003ac5a44e1d in QApplication::x11ProcessEvent (this=0x245da70, event=event@entry=0x7fff1f8ad240) at kernel/qapplication_x11.cpp:3618
#15 0x0000003ac5a697c2 in x11EventSourceDispatch (s=0x2468760, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#16 0x0000003a06046e1c in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#17 0x0000003a06047174 in ?? () from /usr/lib64/libglib-2.0.so.0
#18 0x0000003a06047224 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#19 0x0000003fd7da080e in QEventDispatcherGlib::processEvents (this=0x241dad0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#20 0x0000003ac5a6944e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#21 0x0000003fd7d71cdf in QEventLoop::processEvents (this=this@entry=0x7fff1f8ad620, flags=...) at kernel/qeventloop.cpp:149
#22 0x0000003fd7d71f60 in QEventLoop::exec (this=this@entry=0x7fff1f8ad620, flags=...) at kernel/qeventloop.cpp:204
#23 0x0000003fd7d76ac8 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#24 0x0000003ac59c995c in QApplication::exec () at kernel/qapplication.cpp:3823
#25 0x000000000040ed42 in main (argc=1, argv=0x7fff1f8ada68) at /var/tmp/portage/net-im/ktp-text-ui-0.6.2/work/ktp-text-ui-0.6.2/app/main.cpp:93

Reported using DrKonqi
Comment 1 David Edmundson 2013-07-08 22:21:19 UTC
I have never seen that. Thanks.
Backtrace is really useful so I'm confirming.

Will look for ways in which chat widget might be null, and in the worst case add a guard around it.
Comment 2 David Edmundson 2013-07-08 23:06:28 UTC
Git commit b75a4f1ba4bea95071b5faca84ee2d83e89215dc by David Edmundson.
Committed on 08/07/2013 at 23:03.
Pushed by davidedmundson into branch 'kde-telepathy-0.6'.

Add a guard that the current tab exists on a window activated event

This fixes a crash
Fixed-in: 0.6.3
Reviewed-by: Sven Brauch

M  +5    -2    app/chat-window.cpp

http://commits.kde.org/telepathy-text-ui/b75a4f1ba4bea95071b5faca84ee2d83e89215dc