Bug 206960 - Kate intermittently crashes auto-completing filenames when directory listing is incomplete
Summary: Kate intermittently crashes auto-completing filenames when directory listing ...
Status: RESOLVED WORKSFORME
Alias: None
Product: kfile
Classification: Applications
Component: general (show other bugs)
Version: 4.5 and older
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: triaged
: 212391 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-10 12:46 UTC by Christopher January
Modified: 2018-10-27 03:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher January 2009-09-10 12:46:18 UTC
Application that crashed: kate
Version of the application: 3.3.0
KDE Version: 4.3.00 (KDE 4.3.0)
Qt Version: 4.5.2
Operating System: Linux 2.6.30.5-43.fc11.x86_64 x86_64
Distribution: "Fedora release 11 (Leonidas)"

What I was doing when the application crashed:
Steps to reproduce:
1. Have a home directory with lots of subdirectories and files in it.
2. Ensure that the home directory has not been listed recently by any program (i.e. the directory listing is not cached).
3. Run Kate.
4. Select File->Open...
5. Quickly check that you are in your home directory.
6. Start typing the name of a subdirectory of your home directory in the Name box, e.g. ~/q
7. Check that no auto-completion if offered for the subdirectory you have started typing (i.e. the file dialog has not finished listing your home directory yet).
8. Delete the q.
9. Type the q again. Rinse, wash, repeat.
10. Kate will often (>50% time) segfault.

The problem seems to be when trying to auto-complete a directory name when the directory listing is still being loaded. At the point the directory listing is finished loading the application may crash.


 -- Backtrace:
Application: Kate (kate), signal: Segmentation fault
87	  int result = INLINE_SYSCALL (poll, 3, CHECK_N (fds, nfds), nfds, timeout);
[Current thread is 1 (Thread 0x7f3149994820 (LWP 5185))]

Thread 2 (Thread 0x7f313e5fa910 (LWP 5189)):
[KCrash Handler]
#5  QMutex::lock (this=0x80) at thread/qmutex.cpp:152
#6  0x00000037c0459e88 in QMutexLocker::relock (this=<value optimized out>) at ../../src/corelib/thread/qmutex.h:120
#7  QMutexLocker (this=<value optimized out>) at ../../src/corelib/thread/qmutex.h:102
#8  QThreadPrivate::finish (this=<value optimized out>) at thread/qthread_unix.cpp:198
#9  0x00000037c0459d4d in ~__pthread_cleanup_class (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/pthread.h:535
#10 QThreadPrivate::start (this=<value optimized out>, __in_chrg=<value optimized out>) at thread/qthread_unix.cpp:190
#11 0x00000032a560686a in start_thread (arg=<value optimized out>) at pthread_create.c:297
#12 0x00000032a4ade39d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f3149994820 (LWP 5185)):
#0  0x00000032a4ad50b3 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00000032a620882a in _xcb_conn_wait (c=0x20198f0, cond=<value optimized out>, vector=0x7fff1ad6a618, count=0x7fff1ad6a614) at xcb_conn.c:306
#2  0x00000032a6208d67 in _xcb_out_send (c=0x20198f0, vector=0x7fff1ad6a618, count=0x7fff1ad6a614) at xcb_out.c:338
#3  0x00000032a6209015 in xcb_writev (c=0x20198f0, vector=0x7fff1ad6a670, count=3, requests=4) at xcb_out.c:286
#4  0x00000032a5e4c8aa in _XSend (dpy=0x202f2f0, data=0x0, size=<value optimized out>) at xcb_io.c:332
#5  0x00000032a5e4c9e9 in _XReply (dpy=0x7fff1ad6a590, rep=0x7fff1ad6a740, extra=0, discard=1) at xcb_io.c:450
#6  0x00000032a5e4232d in XTranslateCoordinates (dpy=0x202f2f0, src_win=<value optimized out>, dest_win=567, src_x=272, src_y=532, dst_x=0x7fff1ad6a7cc, dst_y=0x7fff1ad6a7c8, child=0x7fff1ad6a7b8)
    at TrCoords.c:53
#7  0x00000037c1a12c8b in QWidget::mapToGlobal (this=0x7fff1ad6d9d0, pos=<value optimized out>) at kernel/qwidget_x11.cpp:1189
#8  0x00000037c1a12be2 in QWidget::mapToGlobal (this=0x2741ae0, pos=@0x7fff1ad6a880) at kernel/qwidget_x11.cpp:1182
#9  0x00000037c1a12be2 in QWidget::mapToGlobal (this=0x285ab90, pos=@0x7fff1ad6a8e0) at kernel/qwidget_x11.cpp:1182
#10 0x00000037c1a12be2 in QWidget::mapToGlobal (this=0x2888320, pos=@0x7fff1ad6a920) at kernel/qwidget_x11.cpp:1182
#11 0x00000037c2abb3f2 in KCompletionBox::globalPositionHint (this=<value optimized out>) at /usr/src/debug/kdelibs-4.3.0/kdeui/widgets/kcompletionbox.cpp:319
#12 0x00000037c2abb527 in KCompletionBox::sizeAndPosition (this=0x29d5390) at /usr/src/debug/kdelibs-4.3.0/kdeui/widgets/kcompletionbox.cpp:295
#13 0x00000037c2abb923 in KCompletionBox::setVisible (this=0x7fff1ad6a590, visible=true) at /usr/src/debug/kdelibs-4.3.0/kdeui/widgets/kcompletionbox.cpp:327
#14 0x00000037c2ad7af3 in KLineEdit::setCompletedItems (this=0x2888320, items=@0x7fff1ad6aae0, autoSuggest=true) at /usr/src/debug/kdelibs-4.3.0/kdeui/widgets/klineedit.cpp:1529
#15 0x00000037c2ad807b in KLineEdit::makeCompletion (this=0x2888320, text=<value optimized out>) at /usr/src/debug/kdelibs-4.3.0/kdeui/widgets/klineedit.cpp:460
#16 0x00000037c2ad4d3c in KLineEdit::doCompletion (this=0x2888320, txt=@0x7fff1ad6ac60) at /usr/src/debug/kdelibs-4.3.0/kdeui/widgets/klineedit.cpp:1757
#17 0x00000037c2ad8cd9 in KLineEdit::keyPressEvent (this=0x2888320, e=0x7fff1ad6b830) at /usr/src/debug/kdelibs-4.3.0/kdeui/widgets/klineedit.cpp:927
#18 0x00000037c19ddc3a in QWidget::event (this=0x2888320, event=0x7fff1ad6b830) at kernel/qwidget.cpp:7584
#19 0x00000037c1d46be1 in QLineEdit::event (this=0x2888320, e=0x7fff1ad6b830) at widgets/qlineedit.cpp:1681
#20 0x00000037c2ad9ee5 in KLineEdit::event (this=0x2888320, ev=0x7fff1ad6b830) at /usr/src/debug/kdelibs-4.3.0/kdeui/widgets/klineedit.cpp:1323
#21 0x00000037c1d0a0fd in QComboBox::keyPressEvent (this=0x285ab90, e=0x7fff1ad6b830) at widgets/qcombobox.cpp:2879
#22 0x00000037c19ddc3a in QWidget::event (this=0x285ab90, event=0x7fff1ad6b830) at kernel/qwidget.cpp:7584
#23 0x00000037c198f69c in QApplicationPrivate::notify_helper (this=0x200dc70, receiver=0x285ab90, e=0x7fff1ad6b830) at kernel/qapplication.cpp:4056
#24 0x00000037c1997413 in QApplication::notify (this=<value optimized out>, receiver=0x285ab90, e=0x7fff1ad6b830) at kernel/qapplication.cpp:3662
#25 0x00000037c2a11296 in KApplication::notify (this=0x7fff1ad70830, receiver=0x285ab90, event=0x7fff1ad6b830) at /usr/src/debug/kdelibs-4.3.0/kdeui/kernel/kapplication.cpp:302
#26 0x00000037c053f59c in QCoreApplication::notifyInternal (this=0x7fff1ad70830, receiver=0x285ab90, event=0x7fff1ad6b830) at kernel/qcoreapplication.cpp:610
#27 0x00000037c1a1e8ba in QKeyMapper::sendKeyEvent (keyWidget=0x285ab90, grab=<value optimized out>, type=QEvent::KeyPress, code=84, modifiers=<value optimized out>, text=@0x7fff1ad6ba50, 
    autorepeat=false, count=1, nativeScanCode=28, nativeVirtualKey=116, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1861
#28 0x00000037c1a20e50 in QKeyMapperPrivate::translateKeyEvent (this=0x204ad00, keyWidget=0x285ab90, event=<value optimized out>, grab=true) at kernel/qkeymapper_x11.cpp:1831
#29 0x00000037c19fa4e4 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff1ad6d610) at kernel/qapplication_x11.cpp:3438
#30 0x00000037c1a227dc in x11EventSourceDispatch (s=<value optimized out>, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#31 0x00000032a6e37abe in g_main_dispatch (context=<value optimized out>) at gmain.c:1824
#32 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2377
#33 0x00000032a6e3b278 in g_main_context_iterate (context=0x2010920, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2455
#34 0x00000032a6e3b3a0 in IA__g_main_context_iteration (context=0x2010920, may_block=1) at gmain.c:2518
#35 0x00000037c056798e in QEventDispatcherGlib::processEvents (this=0x1ff11b0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:329
#36 0x00000037c1a21f8e in QGuiEventDispatcherGlib::processEvents (this=0x7fff1ad6a590, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#37 0x00000037c053ded2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 100}) at kernel/qeventloop.cpp:149
#38 0x00000037c053e2a4 in QEventLoop::exec (this=0x7fff1ad6d940, flags={i = 64}) at kernel/qeventloop.cpp:201
#39 0x00000037c1e0543e in QDialog::exec (this=0x7fff1ad6d9d0) at dialogs/qdialog.cpp:498
#40 0x00000037c31ee0b9 in KEncodingFileDialog::getOpenUrlsAndEncoding (encoding=@0x222cf70, startDir=@0x7fff1ad6db20, filter=<value optimized out>, parent=<value optimized out>, 
    caption=<value optimized out>) at /usr/src/debug/kdelibs-4.3.0/kio/kfile/kencodingfiledialog.cpp:162
#41 0x00000037c3a5202e in ?? () from /usr/lib64/libkateinterfaces.so.4
#42 0x00000037c3a52564 in ?? () from /usr/lib64/libkateinterfaces.so.4
#43 0x00000037c05547dc in QMetaObject::activate (sender=0x23345c0, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3113
#44 0x00000037c1989857 in QAction::triggered (this=0x7fff1ad6a590, _t1=false) at .moc/release-shared/moc_qaction.cpp:236
#45 0x00000037c198acbf in QAction::activate (this=0x23345c0, event=<value optimized out>) at kernel/qaction.cpp:1160
#46 0x00000037c198d747 in QAction::event (this=0x7fff1ad6a590, e=<value optimized out>) at kernel/qaction.cpp:1079
#47 0x00000037c293f93d in KAction::event (this=0x7fff1ad6a590, event=0x7fff1ad6e190) at /usr/src/debug/kdelibs-4.3.0/kdeui/actions/kaction.cpp:88
#48 0x00000037c198f69c in QApplicationPrivate::notify_helper (this=0x200dc70, receiver=0x23345c0, e=0x7fff1ad6e190) at kernel/qapplication.cpp:4056
#49 0x00000037c19968fe in QApplication::notify (this=0x7fff1ad70830, receiver=0x23345c0, e=0x7fff1ad6e190) at kernel/qapplication.cpp:4021
#50 0x00000037c2a11296 in KApplication::notify (this=0x7fff1ad70830, receiver=0x23345c0, event=0x7fff1ad6e190) at /usr/src/debug/kdelibs-4.3.0/kdeui/kernel/kapplication.cpp:302
#51 0x00000037c053f59c in QCoreApplication::notifyInternal (this=0x7fff1ad70830, receiver=0x23345c0, event=0x7fff1ad6e190) at kernel/qcoreapplication.cpp:610
#52 0x00000037c19c3cb6 in QCoreApplication::sendEvent (event=<value optimized out>, receiver=<value optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:213
#53 QShortcutMap::dispatchEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qshortcutmap.cpp:884
#54 0x00000037c19c5b27 in QShortcutMap::tryShortcutEvent (this=0x200dd88, o=<value optimized out>, e=0x7fff1ad6e620) at kernel/qshortcutmap.cpp:369
#55 0x00000037c1997596 in QApplication::notify (this=0x7fff1ad70830, receiver=0x2574070, e=0x7fff1ad6e620) at kernel/qapplication.cpp:3645
#56 0x00000037c2a11296 in KApplication::notify (this=0x7fff1ad70830, receiver=0x2574070, event=0x7fff1ad6e620) at /usr/src/debug/kdelibs-4.3.0/kdeui/kernel/kapplication.cpp:302
#57 0x00000037c053f59c in QCoreApplication::notifyInternal (this=0x7fff1ad70830, receiver=0x2574070, event=0x7fff1ad6e620) at kernel/qcoreapplication.cpp:610
#58 0x00000037c1a1e8ba in QKeyMapper::sendKeyEvent (keyWidget=0x2574070, grab=<value optimized out>, type=QEvent::KeyPress, code=79, modifiers=<value optimized out>, text=@0x7fff1ad6e840, 
    autorepeat=false, count=1, nativeScanCode=32, nativeVirtualKey=111, nativeModifiers=4) at kernel/qkeymapper_x11.cpp:1861
#59 0x00000037c1a20e50 in QKeyMapperPrivate::translateKeyEvent (this=0x204ad00, keyWidget=0x2574070, event=<value optimized out>, grab=true) at kernel/qkeymapper_x11.cpp:1831
#60 0x00000037c19fa4e4 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff1ad70400) at kernel/qapplication_x11.cpp:3438
#61 0x00000037c1a227dc in x11EventSourceDispatch (s=<value optimized out>, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#62 0x00000032a6e37abe in g_main_dispatch (context=<value optimized out>) at gmain.c:1824
#63 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2377
#64 0x00000032a6e3b278 in g_main_context_iterate (context=0x2010920, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2455
#65 0x00000032a6e3b3a0 in IA__g_main_context_iteration (context=0x2010920, may_block=1) at gmain.c:2518
#66 0x00000037c0567936 in QEventDispatcherGlib::processEvents (this=0x1ff11b0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327
#67 0x00000037c1a21f8e in QGuiEventDispatcherGlib::processEvents (this=0x7fff1ad6a590, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#68 0x00000037c053ded2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 36}) at kernel/qeventloop.cpp:149
#69 0x00000037c053e2a4 in QEventLoop::exec (this=0x7fff1ad70730, flags={i = 0}) at kernel/qeventloop.cpp:201
#70 0x00000037c0540439 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#71 0x00000037c3e04ae5 in kdemain () from /usr/lib64/libkdeinit4_kate.so
#72 0x00000032a4a1ea2d in __libc_start_main (main=<value optimized out>, argc=<value optimized out>, ubp_av=<value optimized out>, init=<value optimized out>, fini=<value optimized out>, 
    rtld_fini=<value optimized out>, stack_end=0x7fff1ad71a48) at libc-start.c:220
#73 0x00000000004006c9 in _start ()

Reported using DrKonqi
Comment 1 Christopher January 2009-09-10 13:16:51 UTC
It's probably not Kate specific. The bug is probably in KUrlCompletion in kdelibs. It looks like the completion thread gets deleted twice.
Comment 2 Christopher January 2009-10-26 11:10:41 UTC
Is there anything I can do to help get this fixed? It's pretty annoying as I lose any unsaved changes each time Kate crashes.
On that note, shouldn't this bug be marked as Critical since it leads to data loss?
Comment 3 Dario Andres 2009-10-28 13:09:15 UTC
You can disable the autocompletion mode with an option if you rightclick the location lineedit and choose it from the contextual menu.
BTW; is this still happening for you with KDE4.3.2 ?
Thanks
Comment 4 Christopher January 2009-11-16 15:49:45 UTC
Yes, this still happens in KDE 4.3.2. See #212391.
Comment 5 Dario Andres 2009-11-16 15:52:10 UTC
- Do you agree on merging those two bug reports ? Thanks
Comment 6 Christopher January 2009-11-16 17:19:31 UTC
Yes fine, I should have done that in the first place.
Comment 7 Dario Andres 2009-11-17 22:17:11 UTC
*** Bug 212391 has been marked as a duplicate of this bug. ***
Comment 8 Christopher January 2010-01-20 10:16:04 UTC
Still present in KDE 4.3.4.
Comment 9 Christoph Cullmann 2010-02-16 15:04:44 UTC
That is a kdelibs problem, if any.
Comment 10 Myriam Schweingruber 2012-09-07 14:54:04 UTC
If you can reproduce this crash with KDE 4.9.0 or newer please provide a new backtrace.
Comment 11 Andrew Crouthamel 2018-09-23 02:38:15 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Andrew Crouthamel 2018-10-27 03:42:27 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!