Bug 316484

Summary: ktp-text-ui 0.6_beta1 crashes when typing text
Product: [Unmaintained] telepathy Reporter: Dennis Schridde <heri+kde>
Component: text-uiAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: coder.tux, kde, me, mklapetek
Priority: NOR    
Version: unspecified   
Target Milestone: Future   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dennis Schridde 2013-03-10 18:56:32 UTC
Application: ktp-text-ui (0.5.80)
KDE Platform Version: 4.10.1
Qt Version: 4.8.4
Operating System: Linux 3.8.2-gentoo x86_64
Distribution: "Gentoo Base System release 2.2"

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

A conversation was open with only a few messages exchanged. I then was using another program, after which I alt-tabbed back to the conversation window. Soon after I started typing another message, ktp-text-ui crashed.

-- 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 0x7fb7c0d68780 (LWP 10278))]

Thread 4 (Thread 0x7fb7bbcb1700 (LWP 10280)):
#0  0x000000302280b8a4 in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x0000003f64736f4b in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#2  0x0000003f64737049 in ?? () from /usr/lib64/qt4/libQtWebKit.so.4
#3  0x0000003022807dff in start_thread () from /lib64/libpthread.so.0
#4  0x00000030220e228d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fb7bb4b0700 (LWP 10281)):
#0  0x00007fff3a7ff847 in clock_gettime ()
#1  0x0000003023403f2d in clock_gettime () from /lib64/librt.so.1
#2  0x0000003f3a8cf784 in do_gettime (frac=0x7fb7bb4afba8, sec=0x7fb7bb4afba0) at tools/qelapsedtimer_unix.cpp:123
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#4  0x0000003f3a9a10ed in QTimerInfoList::updateCurrentTime (this=this@entry=0x7fb7b4002660) at kernel/qeventdispatcher_unix.cpp:354
#5  0x0000003f3a9a1433 in QTimerInfoList::timerWait (this=0x7fb7b4002660, tm=...) at kernel/qeventdispatcher_unix.cpp:461
#6  0x0000003f3a99fedc in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7fb7bb4afc94) at kernel/qeventdispatcher_glib.cpp:136
#7  0x0000003f3a99ff7d in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#8  0x000000381b64699f in g_main_context_prepare () from /usr/lib64/libglib-2.0.so.0
#9  0x000000381b64702b in ?? () from /usr/lib64/libglib-2.0.so.0
#10 0x000000381b647224 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#11 0x0000003f3a9a080e in QEventDispatcherGlib::processEvents (this=0x7fb7b40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#12 0x0000003f3a971cdf in QEventLoop::processEvents (this=this@entry=0x7fb7bb4afe70, flags=...) at kernel/qeventloop.cpp:149
#13 0x0000003f3a971f60 in QEventLoop::exec (this=0x7fb7bb4afe70, flags=...) at kernel/qeventloop.cpp:204
#14 0x0000003f3a878480 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#15 0x0000003f3a87b37c in QThreadPrivate::start (arg=0x35f7b40) at thread/qthread_unix.cpp:338
#16 0x0000003022807dff in start_thread () from /lib64/libpthread.so.0
#17 0x00000030220e228d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fb7b9863700 (LWP 10283)):
#0  0x00000030220da34d in poll () from /lib64/libc.so.6
#1  0x000000381b64710c in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x000000381b647224 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x0000003f3a9a080e in QEventDispatcherGlib::processEvents (this=0x7fb76c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x0000003f3a971cdf in QEventLoop::processEvents (this=this@entry=0x7fb7b9862e40, flags=...) at kernel/qeventloop.cpp:149
#5  0x0000003f3a971f60 in QEventLoop::exec (this=0x7fb7b9862e40, flags=...) at kernel/qeventloop.cpp:204
#6  0x0000003f3a878480 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#7  0x0000003f3a952d4f in QInotifyFileSystemWatcherEngine::run (this=0x29ba800) at io/qfilesystemwatcher_inotify.cpp:256
#8  0x0000003f3a87b37c in QThreadPrivate::start (arg=0x29ba800) at thread/qthread_unix.cpp:338
#9  0x0000003022807dff in start_thread () from /lib64/libpthread.so.0
#10 0x00000030220e228d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fb7c0d68780 (LWP 10278)):
[KCrash Handler]
#6  QKeySequence::isEmpty (this=0xc0) at kernel/qkeysequence.cpp:1064
#7  0x0000003f5d5c7209 in QAction::shortcuts (this=<optimized out>) at kernel/qaction.cpp:508
#8  0x0000003f5e76caa1 in KAction::shortcut (this=0x2a4bb50, type=...) at /var/tmp/portage/kde-base/kdelibs-4.10.1/work/kdelibs-4.10.1/kdeui/actions/kaction.cpp:193
#9  0x000000310023f2ff in ?? () from /usr/lib64/libktpchat.so
#10 0x0000003f5d5cb66c in QApplicationPrivate::notify_helper (this=this@entry=0x275caa0, receiver=receiver@entry=0x4524580, e=e@entry=0x7fff3a7b2860) at kernel/qapplication.cpp:4562
#11 0x0000003f5d5d05a0 in QApplication::notify (this=<optimized out>, receiver=0x4524580, e=0x7fff3a7b2860) at kernel/qapplication.cpp:4003
#12 0x0000003f5e8423b6 in KApplication::notify (this=0x2735500, receiver=0x4524580, event=0x7fff3a7b2860) at /var/tmp/portage/kde-base/kdelibs-4.10.1/work/kdelibs-4.10.1/kdeui/kernel/kapplication.cpp:311
#13 0x0000003f3a972f4d in QCoreApplication::notifyInternal (this=0x2735500, receiver=0x4524580, event=0x7fff3a7b2860) at kernel/qcoreapplication.cpp:946
#14 0x0000003f5d5fd15c in sendEvent (event=0x7fff3a7b2860, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#15 QShortcutMap::tryShortcutEvent (this=0x275cbc0, o=<optimized out>, e=0x7fff3a7b2860) at kernel/qshortcutmap.cpp:340
#16 0x0000003f5d5d16c5 in QApplication::notify (this=0x2735500, receiver=0x4524580, e=0x7fff3a7b2860) at kernel/qapplication.cpp:3986
#17 0x0000003f5e8423b6 in KApplication::notify (this=0x2735500, receiver=0x4524580, event=0x7fff3a7b2860) at /var/tmp/portage/kde-base/kdelibs-4.10.1/work/kdelibs-4.10.1/kdeui/kernel/kapplication.cpp:311
#18 0x0000003f3a972f4d in QCoreApplication::notifyInternal (this=0x2735500, receiver=0x4524580, event=0x7fff3a7b2860) at kernel/qcoreapplication.cpp:946
#19 0x0000003f5d665727 in QKeyMapper::sendKeyEvent (keyWidget=keyWidget@entry=0x4524580, grab=grab@entry=false, type=QEvent::KeyPress, code=16777248, modifiers=..., text=..., autorepeat=autorepeat@entry=false, count=1, nativeScanCode=50, nativeVirtualKey=65505, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1866
#20 0x0000003f5d665b31 in QKeyMapperPrivate::translateKeyEvent (this=0x2786880, keyWidget=0x4524580, event=0x7fff3a7b3260, grab=false) at kernel/qkeymapper_x11.cpp:1836
#21 0x0000003f5d644000 in QApplication::x11ProcessEvent (this=0x2735500, event=0x7fff3a7b3260) at kernel/qapplication_x11.cpp:3532
#22 0x0000003f5d6697c2 in x11EventSourceDispatch (s=0x27443b0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#23 0x000000381b646e1c in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#24 0x000000381b647174 in ?? () from /usr/lib64/libglib-2.0.so.0
#25 0x000000381b647224 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#26 0x0000003f3a9a080e in QEventDispatcherGlib::processEvents (this=0x26d8cf0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#27 0x0000003f5d66944e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#28 0x0000003f3a971cdf in QEventLoop::processEvents (this=this@entry=0x7fff3a7b3640, flags=...) at kernel/qeventloop.cpp:149
#29 0x0000003f3a971f60 in QEventLoop::exec (this=0x7fff3a7b3640, flags=...) at kernel/qeventloop.cpp:204
#30 0x0000003f3a976ac8 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#31 0x000000000040ee5a in ?? ()
#32 0x00000030220216f5 in __libc_start_main () from /lib64/libc.so.6
#33 0x000000000040f515 in _start ()

Possible duplicates by query: bug 303186.

Reported using DrKonqi
Comment 1 David Edmundson 2013-03-10 19:07:30 UTC
Could you please install debug symbols for ktp-text-ui.
Comment 2 David Edmundson 2013-03-10 19:08:14 UTC
Waiting on debug symbols, marking as Needsinfo
Comment 3 Martin Klapetek 2013-03-12 17:06:29 UTC
*** Bug 316609 has been marked as a duplicate of this bug. ***
Comment 4 Roman 2013-03-13 16:50:22 UTC
We found out what's wrong, fix is no the go
Comment 5 Martin Klapetek 2013-03-13 16:53:03 UTC
Found how to reproduce the bug, and the cuase.

[15:00] <d_ed> jtalk: ok, imagine you have the setting "open tabs in a new
window'
[15:00] <d_ed> you open window 1
[15:00] <d_ed> it gets the right action, things are good
[15:00] <d_ed> you open window 2
[15:00] <d_ed> you get the action for the first window
[15:00] <d_ed> things still work
[15:00] <d_ed> you close window 1
[15:00] <d_ed> that KAction* is now deleted
[15:00] <d_ed> you type in window 2.. crash
Comment 6 Roman 2013-03-13 17:54:55 UTC
Git commit c971c72970192ab6bd2df246fa53c44028ff0093 by Roman Nazarenko.
Committed on 13/03/2013 at 18:47.
Pushed by romann into branch 'master'.

Fixed crash on Send Message shortcut checking, when tab was detached and parent window was already destroyed.
KAction pointer is replaced with KShortcut object inside every tab's Text Edit.

REVIEW: 109466

M  +23   -8    app/chat-window.cpp
M  +4    -0    app/chat-window.h
M  +8    -17   lib/chat-text-edit.cpp
M  +10   -1    lib/chat-text-edit.h
M  +5    -0    lib/chat-widget.cpp
M  +3    -0    lib/chat-widget.h

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