Bug 352900

Summary: Crash in KDirWatch::~KDirWatch() in many different applications upon exit
Product: [Frameworks and Libraries] frameworks-kcoreaddons Reporter: Luca Beltrame <lbeltrame>
Component: generalAssignee: Michael Pyne <mpyne>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kdelibs-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Luca Beltrame 2015-09-19 07:57:18 UTC
Since the latest updates in kcoreaddons, many applications which use KBookmarkManager crash at the time of exit. The traceback is always the same (see below).

I'm not sure if the fault lies in KBookmarkManager or in KDirWatch, but it's kind of problematic for apps (any app which uses kdialog, such as chromium, will be unable to select files as kdialog will crash on exit).

Application: KDialog (kdialog), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#6  0x00007f5db32b19f0 in  () at /usr/lib64/libKF5CoreAddons.so.5
#7  0x00007f5db32b1e23 in KDirWatch::~KDirWatch() () at /usr/lib64/libKF5CoreAddons.so.5
#8  0x00007f5db32b1e69 in KDirWatch::~KDirWatch() () at /usr/lib64/libKF5CoreAddons.so.5
#9  0x00007f5daecb7dd1 in KBookmarkManager::~KBookmarkManager() (this=0x22be880, __in_chrg=<optimized out>) at /home/lb/rpmbuild/BUILD/kbookmarks-5.14.0git.20150812T123205~8d84e79/src/kbookmarkmanager.cpp:135
#10 0x00007f5daecb7dd1 in KBookmarkManager::~KBookmarkManager() (this=0x228db70, __in_chrg=<optimized out>) at /home/lb/rpmbuild/BUILD/kbookmarks-5.14.0git.20150812T123205~8d84e79/src/kbookmarkmanager.cpp:329
#11 0x00007f5daecb7fa9 in KBookmarkManager::~KBookmarkManager() (this=0x228db70, __in_chrg=<optimized out>) at /home/lb/rpmbuild/BUILD/kbookmarks-5.14.0git.20150812T123205~8d84e79/src/kbookmarkmanager.cpp:330
#12 0x00007f5daecb740e in (anonymous namespace)::Q_QGS_s_pSelf::Holder::~Holder() (end=..., begin=...) at /usr/include/qt5/QtCore/qalgorithms.h:317
#13 0x00007f5daecb740e in (anonymous namespace)::Q_QGS_s_pSelf::Holder::~Holder() (c=...) at /usr/include/qt5/QtCore/qalgorithms.h:325
#14 0x00007f5daecb740e in (anonymous namespace)::Q_QGS_s_pSelf::Holder::~Holder() (this=0x7f5daeed9cf0 <(anonymous namespace)::Q_QGS_s_pSelf::innerFunction()::holder>, __in_chrg=<optimized out>) at /home/lb/rpmbuild/BUILD/kbookmarks-5.14.0git.20150812T123205~8d84e79/src/kbookmarkmanager.cpp:60
#15 0x00007f5daecb740e in (anonymous namespace)::Q_QGS_s_pSelf::Holder::~Holder() (this=0x7f5daeed9cf0 <(anonymous namespace)::Q_QGS_s_pSelf::innerFunction()::holder>, __in_chrg=<optimized out>) at /home/lb/rpmbuild/BUILD/kbookmarks-5.14.0git.20150812T123205~8d84e79/src/kbookmarkmanager.cpp:66
#16 0x00007f5daecb740e in (anonymous namespace)::Q_QGS_s_pSelf::Holder::~Holder() () at /usr/lib64/libKF5Bookmarks.so.5
#17 0x00007f5daecb740e in (anonymous namespace)::Q_QGS_s_pSelf::Holder::~Holder() (bookmarksFile=...) at /home/lb/rpmbuild/BUILD/kbookmarks-5.14.0git.20150812T123205~8d84e79/src/kbookmarkmanager.cpp:161
#18 0x00007f5db5d9a0e8 in __run_exit_handlers () at /lib64/libc.so.6
#19 0x00007f5db5d9a135 in  () at /lib64/libc.so.6
#20 0x00007f5db5d84617 in __libc_start_main () at /lib64/libc.so.6
#21 0x00000000004113d9 in _start ()


Reproducible: Always

Steps to Reproduce:
1. Run kdialog --getexistingdirectory ./
2. Close kdialog

Actual Results:  
Crash occurs.

Expected Results:  
Crash does not occur.

kcoreaddons master, revision 14833ae.
Comment 1 Christoph Feck 2015-09-25 10:21:12 UTC
Does this still happen with a recent checkout from master? It could be bug 353080.
Comment 2 Luca Beltrame 2016-03-13 08:01:35 UTC

*** This bug has been marked as a duplicate of bug 353080 ***