Bug 193560

Summary: kfind crash while in background
Product: [Applications] kfind Reporter: Clemens Eisserer <linuxhippy>
Component: generalAssignee: Eric Coquelle <coquelle>
Status: RESOLVED FIXED    
Severity: crash CC: andresbajotierra, echidnaman
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Clemens Eisserer 2009-05-21 21:47:58 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Fedora RPMs

KFind crashed when it was minimized in background, as far as I know it didn't even do a search.

Application: KFind (kfind), signal SIGSEGV
__kernel_vsyscall () at arch/x86/vdso/vdso32/int80.S:16
16		ret
Current language:  auto; currently asm
[Current thread is 1 (Thread 0xb7f05780 (LWP 4606))]

Thread 1 (Thread 0xb7f05780 (LWP 4606)):
[KCrash Handler]
#6  QBasicAtomicInt::deref (this=<value optimized out>) at ../../src/corelib/arch/qatomic_i386.h:132
#7  derefEngine (this=<value optimized out>) at tools/qregexp.cpp:3280
#8  invalidateEngine (this=<value optimized out>) at tools/qregexp.cpp:3336
#9  0x0019c104 in QRegExp::~QRegExp (this=0x9029ec8, __in_chrg=<value optimized out>) at tools/qregexp.cpp:3421
#10 0x0806daac in KQuery::slotListEntries (this=0x901e938, list=
          {<QList<QString>> = {{p = {static shared_null = {ref = {_q_value = 5489}, alloc = 0, begin = 0, end = 0, sharable = 1, array = {0x0}}, d = 0x9048310}, d = 0x9048310}}, <No data fields>})
    at /usr/src/debug/kdebase-4.2.2/apps/kfind/kquery.cpp:166
#11 0x0805b255 in KfindDlg::slotNewItems (this=0xbf92fc4c, file=@0xbf92e28c) at /usr/src/debug/kdebase-4.2.2/apps/kfind/kfinddlg.cpp:275
#12 0x0805c3e2 in KfindDlg::qt_metacall (this=0xbf92fc4c, _c=QMetaObject::InvokeMetaMethod, _id=82, _a=0xbf92e218) at /usr/src/debug/kdebase-4.2.2/i586-redhat-linux-gnu/apps/kfind/kfinddlg.moc:93
#13 0x00269948 in QMetaObject::activate (sender=0x8ea6288, from_signal_index=5, to_signal_index=5, argv=0xbf92e218) at kernel/qobject.cpp:3069
#14 0x0026a5e2 in QMetaObject::activate (sender=0x8ea6288, m=0x7f73ce4, local_signal_index=1, argv=0xbf92e218) at kernel/qobject.cpp:3143
#15 0x07decd23 in KDirWatch::created (this=0x8ea6288, _t1=@0xbf92e28c) at /usr/src/debug/kdelibs-4.2.2/i586-redhat-linux-gnu/kio/kdirwatch.moc:90
#16 0x07decd54 in KDirWatch::setCreated (this=0x8ea6288, _file=@0xbf92e28c) at /usr/src/debug/kdelibs-4.2.2/kio/kio/kdirwatch.cpp:1676
#17 0x07ded96c in KDirWatchPrivate::emitEvent (this=0x90225f0, e=0x9021064, event=2, fileName=@0xbf92e3f0) at /usr/src/debug/kdelibs-4.2.2/kio/kio/kdirwatch.cpp:1159
#18 0x07df35c8 in KDirWatchPrivate::inotifyEventReceived (this=0x90225f0) at /usr/src/debug/kdelibs-4.2.2/kio/kio/kdirwatch.cpp:333
#19 0x07df423b in KDirWatchPrivate::qt_metacall (this=0x90225f0, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbf92f568) at /usr/src/debug/kdelibs-4.2.2/i586-redhat-linux-gnu/kio/kdirwatch_p.moc:75
#20 0x00269948 in QMetaObject::activate (sender=0x8d5dc10, from_signal_index=4, to_signal_index=4, argv=0xbf92f568) at kernel/qobject.cpp:3069
#21 0x0026a5e2 in QMetaObject::activate (sender=0x8d5dc10, m=0x344a90, local_signal_index=0, argv=0xbf92f568) at kernel/qobject.cpp:3143
#22 0x002a47e3 in QSocketNotifier::activated (this=0x8d5dc10, _t1=12) at .moc/release-shared/moc_qsocketnotifier.cpp:83
#23 0x0026e407 in QSocketNotifier::event (this=0x8d5dc10, e=0xbf92f924) at kernel/qsocketnotifier.cpp:316
#24 0x06ff6cfc in QApplicationPrivate::notify_helper (this=0x8d727b8, receiver=0x8d5dc10, e=0xbf92f924) at kernel/qapplication.cpp:4084
#25 0x06ffe124 in QApplication::notify (this=0xbf92fc80, receiver=0x8d5dc10, e=0xbf92f924) at kernel/qapplication.cpp:4049
#26 0x0359b4ea in KApplication::notify (this=0xbf92fc80, receiver=0x8d5dc10, event=0xbf92f924) at /usr/src/debug/kdelibs-4.2.2/kdeui/kernel/kapplication.cpp:307
#27 0x002536db in QCoreApplication::notifyInternal (this=0xbf92fc80, receiver=0x8d5dc10, event=0xbf92f924) at kernel/qcoreapplication.cpp:602
#28 0x0027ee6a in QCoreApplication::sendEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.h:213
#29 socketNotifierSourceDispatch (event=<value optimized out>, receiver=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:109
#30 0x005c61e8 in g_main_dispatch (context=<value optimized out>) at gmain.c:1814
#31 IA__g_main_context_dispatch (context=<value optimized out>) at gmain.c:2367
#32 0x005c97f8 in g_main_context_iterate (context=0x8d74310, block=<value optimized out>, dispatch=1, self=0x8d72988) at gmain.c:2448
#33 0x005c996a in IA__g_main_context_iteration (context=0x8d74310, may_block=1) at gmain.c:2511
#34 0x0027ebcc in QEventDispatcherGlib::processEvents (this=0x8d60750, flags={i = 100}) at kernel/qeventdispatcher_glib.cpp:323
#35 0x07096825 in QGuiEventDispatcherGlib::processEvents (this=0x8d60750, flags={i = 100}) at kernel/qguieventdispatcher_glib.cpp:202
#36 0x00251c69 in QEventLoop::processEvents (this=0xbf92fbc0, flags=) at kernel/qeventloop.cpp:149
#37 0x002520b2 in QEventLoop::exec (this=0xbf92fbc0, flags={i = 64}) at kernel/qeventloop.cpp:200
#38 0x07515d33 in QDialog::exec (this=0xbf92fc4c) at dialogs/qdialog.cpp:498
#39 0x0805d62a in main (argc=1, argv=0xbf92fec4) at /usr/src/debug/kdebase-4.2.2/apps/kfind/main.cpp:56
Comment 1 Dario Andres 2009-05-22 00:20:54 UTC
What is your Qt4 version ? 
Can you reproduce this at will ? (have you find some pattern to reproduce the crash) ? Thanks!
Comment 2 Clemens Eisserer 2009-05-22 10:35:15 UTC
QT-4.5.0
No I haven't because it crashed when it was in background, so I did not do anything with it.
Comment 3 Dario Andres 2009-05-22 14:23:24 UTC
The backtrace tells that KFind was in middle of a search. And KFind doesn't start or start a search automatically. So at least you started it... Or how did it happened? Thanks
Comment 4 Clemens Eisserer 2009-05-25 10:11:32 UTC
OK, maybe a search was running, but I didn't pay attention to it.
But at least as far as I can remember, kfind was done with searching.

What I did was running "make" on a directory I used that kfind instance before. Could it be that kfind struggles with the modifying files, or that that could have triggered another search?
Comment 5 Dario Andres 2009-05-25 17:58:55 UTC
Now I get it. When new files are added to the folder KFind searched before (or is currently showing), this files will be scanned to and added to the Found items list (if they meet the search requirements).
I will try to reproduce it.
Comment 6 Dario Andres 2009-05-27 19:42:27 UTC
I could not reproduce it yet.
Let see if anyone else can reproduce it on KDE4.3
Comment 7 Jonathan Thomas 2009-10-01 14:24:35 UTC
We received a report with the same (although a bit damaged) backtrace at https://launchpad.net/bugs/411652
The bug is reported against KDE 4.3.
Comment 8 Dario Andres 2009-10-01 15:11:27 UTC
SVN commit 1030054 by darioandres:

- Until we redesign the logic to avoid a bad re-entrancy caused by processEvents while searching
  into file contents, try to not crash at least. (metaKeyRx could be already deleted)

BUG: 193560
BUG: 203325



 M  +4 -1      kfinddlg.cpp  
 M  +5 -8      kquery.cpp  
 M  +1 -1      kquery.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1030054
Comment 9 Dario Andres 2009-10-01 15:16:34 UTC
SVN commit 1030059 by darioandres:

Backport to 4.3 of:
SVN commit 1030054 by darioandres:

- Until we redesign the logic to avoid a bad re-entrancy caused by
processEvents while searching
  into file contents, try to not crash at least. (metaKeyRx could be already
deleted)

- Fix a memleak

CCBUG: 193560
CCBUG: 203325



 M  +4 -1      kfinddlg.cpp  
 M  +5 -8      kquery.cpp  
 M  +1 -1      kquery.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1030059