Bug 344661

Summary: Face recognition makes digikam fill all the available memory
Product: [Applications] digikam Reporter: wwdiver
Component: Faces-RecognitionAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 4.7.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 7.0.0
Sentry Crash Report:

Description wwdiver 2015-02-28 13:18:36 UTC
Face recognition makes digikam fill all the available memory ans swap space
maybe a duplicate of bug 338176

username@kubuntu:~$ kinfocenter -v
Qt: 4.8.6
KDE: 4.13.3
KDE-Infozentrum: 4.11.11

username@kubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.2 LTS
Release:        14.04
Codename:       trusty
username@kubuntu:~$ aptitude show digikam
Paket: digikam                                  
Zustand: Installiert
Automatisch installiert: nein
Version: 4:4.7.0-trusty~ppa1
Priorität: optional
Bereich: graphics
Verwalter: Philip Johnsson <philip.johnsson@gmail.com>
Architektur: amd64
Unkomprimierte Größe: 16,7 M
Hängt ab von: kde-runtime, kdepim-runtime, libakonadi-contact4 (>= 4:4.10), libc6 (>= 2.14), libgcc1 (>= 1:4.1.1), libgphoto2-6 (>= 2.5.2),
               libgphoto2-port10 (>= 2.5.2), libjasper1, libjpeg8 (>= 8c), libkabc4 (>= 4:4.10), libkdcraw23, libkdecore5 (>= 4:4.10), libkdeui5 (>=
               4:4.10), libkexiv2-11, libkface3 (>= 1.0~digikam4.7.0), libkfile4 (>= 4:4.10), libkgeomap2 (>= 1.0~digikam4.7.0), libkhtml5 (>=
               4:4.10), libkio5 (>= 4:4.10), libkipi11, libknotifyconfig4 (>= 4:4.10), libkparts4 (>= 4:4.10), liblcms2-2 (>= 2.2+git20110628),
               liblensfun0 (>= 0.2.8), liblqr-1-0 (>= 0.4.0), libopencv-core2.4, libopencv-imgproc2.4, libpgf6 (>= 6.12.24+ds1), libphonon4 (>=
               4:4.2.0), libpng12-0 (>= 1.2.13-4), libqt4-dbus (>= 4:4.5.3), libqt4-sql (>= 4:4.5.3), libqt4-xml (>= 4:4.5.3), libqtcore4 (>=
               4:4.8.0), libqtgui4 (>= 4:4.8.0), libsolid4 (>= 4:4.10), libsqlite0 (>= 2.8.17), libstdc++6 (>= 4.6), libthreadweaver4 (>= 4:4.10),
               libtiff5 (>= 4.0.3), libx11-6, phonon, perl, libqt4-sql-sqlite, digikam-data (= 4:4.7.0-trusty~ppa1)

Reproducible: Always

Steps to Reproduce:
1. Use a large set of photos >6000 (*.jpg, raw, *.tif's each round about 120MB)
2. work with face detection
3. set person names to the face tags 

Actual Results:  
digiKam fill all the available memory (1MB in 2seconds) an swap space 
16GB swap space is on SSD, photos on classic HD, 16GB RAM full used

Expected Results:  
normal RAM use

face recocnition DB is 2,2GB !
  
username@kubuntu:~$ ls -lh /home/username/.kde/share/apps/libkface/database/recognition.db
-rw-r--r-- 1 username username 2,2G Feb 28 13:24 /home/username/.kde/share/apps/libkface/database/recognition.db

top - 11:26:09 up 55 min,  7 users,  load average: 2,15, 1,55, 1,15
Aufgaben: 188 total,   2 running, 185 sleeping,   0 stopped,   1 zombie
%Cpu0  :  0,0 be,  1,7 sy,  0,3 ni, 84,9 un, 13,0 wa,  0,0 hi,  0,0 si,  0,0 st
%Cpu1  :  4,4 be,  2,7 sy,  1,7 ni,  0,7 un, 90,5 wa,  0,0 hi,  0,0 si,  0,0 st
%Cpu2  :  1,3 be,  1,7 sy,  1,3 ni, 94,3 un,  1,3 wa,  0,0 hi,  0,0 si,  0,0 st
%Cpu3  :  0,7 be,  0,3 sy,  0,7 ni, 91,4 un,  7,0 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem:  16391720 total, 16216692 used,   175028 free,      952 buffers
KiB Swap: 16732156 total, 14333372 used,  2398784 free.    48736 cached Mem

  PID BENUTZER  PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                         
 4478 username      20   0 29,213g 0,015t   3008 S   6,3 95,6  28:40.00 memcheck-amd64-                                                                 
   50 root      20   0       0      0      0 S   1,3  0,0   0:10.84 kswapd0                                                                         
 2121 username      20   0 4114496  76836  13560 S   1,3  0,5   0:44.34 plasma-desktop                                                                  
 1299 root      20   0  245956  31892  12132 S   0,7  0,2   1:23.96 Xorg                                                                            
    9 root      20   0       0      0      0 S   0,3  0,0   0:03.55 rcuos/1                                                                         
   10 root      20   0       0      0      0 S   0,3  0,0   0:02.42 rcuos/2                                                                         
  151 root      20   0       0      0      0 S   0,3  0,0   0:01.88 kworker/1:2                                                                     
 1719 username      20   0  368028    392    292 S   0,3  0,0   0:00.23 gnome-keyring-d                                                                 
 2106 username      20   0 3121640  21952   4692 S   0,3  0,1   0:25.39 kwin                                                                            
 2125 username      20   0   10092    740    432 S   0,3  0,0   0:02.33 ksysguardd                                                                      
 2131 username      39  19  398504   5732   3732 S   0,3  0,0   0:03.51 baloo_file                                                                      
 2176 username      20   0  521712  14820   7948 S   0,3  0,1   0:07.66 konsole                                                                         
 2240 username      20   0 2160284   1240   1240 S   0,3  0,0   0:00.59 akonadiserver                                                                   
 2262 username      20   0 1963628     92     92 S   0,3  0,0   0:01.45 mysqld                                                                          
    1 root      20   0   33900    392    392 S   0,0  0,0   0:00.83 init                                                                            
    2 root      20   0       0      0      0 S   0,0  0,0   0:00.00 kthreadd                                                                        
    3 root      20   0       0      0      0 S   0,0  0,0   0:00.02 ksoftirqd/0                                                                     
    5 root       0 -20       0      0      0 S   0,0  0,0   0:00.00 kworker/0:0H                                                                    
    7 root      20   0       0      0      0 S   0,0  0,0   0:03.20 rcu_sched                                                                       
    8 root      20   0       0      0      0 S   0,0  0,0   0:02.84 rcuos/0                                                                         
   11 root      20   0       0      0      0 S   0,0  0,0   0:02.34 rcuos/3                                                                         
   12 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcu_bh                                                                          
   13 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/0                                                                         
   14 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/1                                                                         
   15 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/2                                                                         
   16 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/3                                                                         
   17 root      rt   0       0      0      0 S   0,0  0,0   0:00.20 migration/0                                                                     
   18 root      rt   0       0      0      0 S   0,0  0,0   0:00.00 watchdog/0                                                                      
   19 root      rt   0       0      0      0 S   0,0  0,0   0:00.00 watchdog/1                                                                      
   20 root      rt   0       0      0      0 S   0,0  0,0   0:00.05 migration/1                                                                     
   21 root      20   0       0      0      0 S   0,0  0,0   0:00.01 ksoftirqd/1                                                                     
   23 root       0 -20       0      0      0 S   0,0  0,0   0:00.00 kworker/1:0H                                                                    
   24 root      rt   0       0      0      0 S   0,0  0,0   0:00.00 watchdog/2                                                                      
   25 root      rt   0       0      0      0 S   0,0  0,0   0:00.03 migration/2                                                                     
   26 root      20   0       0      0      0 S   0,0  0,0   0:00.00 ksoftirqd/2                                                                     
   27 root      20   0       0      0      0 S   0,0  0,0   0:00.00 kworker/2:0                                                                     
   28 root       0 -20       0      0      0 S   0,0  0,0   0:00.00 kworker/2:0H                                                                    
   29 root      rt   0       0      0      0 S   0,0  0,0   0:00.00 watchdog/3                                                                      
   30 root      rt   0       0      0      0 S   0,0  0,0   0:00.02 migration/3                                                                     
   31 root      20   0       0      0      0 S   0,0  0,0   0:00.00 ksoftirqd/3                                                                     
   32 root      20   0       0      0      0 S   0,0  0,0   0:00.00 kworker/3:0 
   
   Linux kubuntu 3.13.0-46-generic #76-Ubuntu SMP Thu Feb 26 18:52:13 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

   username@kubuntu:~$ valgrind --tool=memcheck --leak-check=full --error-limit=no digikam
==4478== Memcheck, a memory error detector
==4478== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==4478== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==4478== Command: digikam
==4478== 
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
Bus::open: Can not get ibus-daemon's address. 
IBusInputContext::createInputContext: no connection to ibus-daemon 
==4478== Thread 10 Thread (pooled):
==4478== Syscall param write(buf) points to uninitialised byte(s)
==4478==    at 0xBEF288D: ??? (syscall-template.S:81)
==4478==    by 0x2275ED55: seekAndWriteFd (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x2275EE61: unixWrite (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x2278D33F: pager_write_pagelist (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x22796122: sqlite3PagerCommitPhaseOne.part.444 (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x22796321: sqlite3BtreeCommitPhaseOne (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x227A8C5A: sqlite3VdbeHalt (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x227BF592: sqlite3VdbeExec (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x227C206E: sqlite3_step (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x35F2911B: QSQLiteResultPrivate::fetchNext(QVector<QVariant>&, int, bool) (in /usr/lib/x86_64-linux-gnu/qt4/plugins/sqldrivers/libqsqlite.so)
==4478==    by 0x35F29E47: QSQLiteResult::exec() (in /usr/lib/x86_64-linux-gnu/qt4/plugins/sqldrivers/libqsqlite.so)
==4478==    by 0x4E48807: QSqlQuery::exec(QString const&) (in /usr/lib/x86_64-linux-gnu/libQtSql.so.4.8.6)
==4478==  Address 0x5beaf604 is 1,028 bytes inside a block of size 1,280 alloc'd
==4478==    at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4478==    by 0x2277E316: sqlite3MemMalloc (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x22756E59: mallocWithAlarm (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x2275FA47: sqlite3Malloc (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x2276392A: pcache1Alloc (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x22763B95: pcache1Fetch (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x2275CCB0: sqlite3PcacheFetch (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x2278B305: sqlite3PagerAcquire (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x2278B6EC: btreeGetPage (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x2278D8D2: getAndInitPage (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x2278D94E: moveToChild (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478==    by 0x22792B28: sqlite3BtreeMovetoUnpacked (in /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6)
==4478== 
==4478== Thread 9 Thread (pooled):
==4478== Conditional jump or move depends on uninitialised value(s)                                                                                 
==4478==    at 0x324588C7: picReadHeader(QIODevice*, PICHeader*, bool) (pic_read.cpp:54)                                                            
==4478==    by 0x32459D01: SoftimagePICHandler::canRead(QIODevice*) (pic_io_handler.cpp:44)                                                         
==4478==    by 0x3245965C: SoftimagePICPlugin::capabilities(QIODevice*, QByteArray const&) const (pic_io_plugin.cpp:33)                             
==4478==    by 0xA2A5061: createReadHandlerHelper(QIODevice*, QByteArray const&, bool, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)       
==4478==    by 0xA2A6611: QImageReaderPrivate::initHandler() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)                                       
==4478==    by 0xA2A7B67: QImageReader::read(QImage*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)                                              
==4478==    by 0xA2A7D33: QImageReader::read() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)                                                     
==4478==    by 0xA2A2E89: QImage::fromData(unsigned char const*, int, char const*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)                 
==4478==    by 0xA2A2F43: QImage::loadFromData(unsigned char const*, int, char const*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)             
==4478==    by 0x6659C04: KExiv2Iface::KExiv2::getImagePreview(QImage&) const (in /usr/lib/libkexiv2.so.11.3.0)                                     
==4478==    by 0x6E16CEA: Digikam::PreviewLoadingTask::loadImagePreview(int) (in /usr/lib/digikam/libdigikamcore.so.4.7.0)
==4478==    by 0x6E17C5F: Digikam::PreviewLoadingTask::execute() (in /usr/lib/digikam/libdigikamcore.so.4.7.0)
==4478== 
==4478== Thread 1:
==4478== Invalid read of size 4
==4478==    at 0xB30049F: QPersistentModelIndex::operator=(QModelIndex const&) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0x6E75BA0: Digikam::PersistentWidgetDelegateOverlay::showOnIndex(QModelIndex const&) (in /usr/lib/digikam/libdigikamcore.so.4.7.0)
==4478==    by 0x6B82A8: Digikam::AssignNameOverlay::showOnIndex(QModelIndex const&) (in /usr/bin/digikam)
==4478==    by 0x6B83E4: Digikam::AssignNameOverlay::eventFilter(QObject*, QEvent*) (in /usr/bin/digikam)
==4478==    by 0xB30A645: QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E2E0B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA1E95DC: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0x9BF3D19: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==4478==    by 0xB30A4DC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E8D92: QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA25D9CA: QETWidget::translateMouseEvent(_XEvent const*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA25D268: QApplication::x11ProcessEvent(_XEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==  Address 0x3d975dd0 is 0 bytes inside a block of size 40 free'd
==4478==    at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4478==    by 0xB3004F7: QPersistentModelIndex::operator=(QModelIndex const&) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0x6E75BA0: Digikam::PersistentWidgetDelegateOverlay::showOnIndex(QModelIndex const&) (in /usr/lib/digikam/libdigikamcore.so.4.7.0)
==4478==    by 0x6B82A8: Digikam::AssignNameOverlay::showOnIndex(QModelIndex const&) (in /usr/bin/digikam)
==4478==    by 0x6B83E4: Digikam::AssignNameOverlay::eventFilter(QObject*, QEvent*) (in /usr/bin/digikam)
==4478==    by 0xB30A645: QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E2E0B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA1E95DC: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0x9BF3D19: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==4478==    by 0xB30A4DC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E8D92: QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA25D9CA: QETWidget::translateMouseEvent(_XEvent const*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478== 
==4478== Invalid read of size 4
==4478==    at 0xB3004A6: QPersistentModelIndex::operator=(QModelIndex const&) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0x6E75BA0: Digikam::PersistentWidgetDelegateOverlay::showOnIndex(QModelIndex const&) (in /usr/lib/digikam/libdigikamcore.so.4.7.0)
==4478==    by 0x6B82A8: Digikam::AssignNameOverlay::showOnIndex(QModelIndex const&) (in /usr/bin/digikam)
==4478==    by 0x6B83E4: Digikam::AssignNameOverlay::eventFilter(QObject*, QEvent*) (in /usr/bin/digikam)
==4478==    by 0xB30A645: QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E2E0B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA1E95DC: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0x9BF3D19: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==4478==    by 0xB30A4DC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E8D92: QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA25D9CA: QETWidget::translateMouseEvent(_XEvent const*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA25D268: QApplication::x11ProcessEvent(_XEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==  Address 0x3d975dd4 is 4 bytes inside a block of size 40 free'd
==4478==    at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4478==    by 0xB3004F7: QPersistentModelIndex::operator=(QModelIndex const&) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0x6E75BA0: Digikam::PersistentWidgetDelegateOverlay::showOnIndex(QModelIndex const&) (in /usr/lib/digikam/libdigikamcore.so.4.7.0)
==4478==    by 0x6B82A8: Digikam::AssignNameOverlay::showOnIndex(QModelIndex const&) (in /usr/bin/digikam)
==4478==    by 0x6B83E4: Digikam::AssignNameOverlay::eventFilter(QObject*, QEvent*) (in /usr/bin/digikam)
==4478==    by 0xB30A645: QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E2E0B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA1E95DC: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0x9BF3D19: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==4478==    by 0xB30A4DC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E8D92: QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA25D9CA: QETWidget::translateMouseEvent(_XEvent const*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478== 
==4478== Invalid read of size 8
==4478==    at 0xB3004AD: QPersistentModelIndex::operator=(QModelIndex const&) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0x6E75BA0: Digikam::PersistentWidgetDelegateOverlay::showOnIndex(QModelIndex const&) (in /usr/lib/digikam/libdigikamcore.so.4.7.0)
==4478==    by 0x6B82A8: Digikam::AssignNameOverlay::showOnIndex(QModelIndex const&) (in /usr/bin/digikam)
==4478==    by 0x6B83E4: Digikam::AssignNameOverlay::eventFilter(QObject*, QEvent*) (in /usr/bin/digikam)
==4478==    by 0xB30A645: QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E2E0B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA1E95DC: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0x9BF3D19: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==4478==    by 0xB30A4DC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E8D92: QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA25D9CA: QETWidget::translateMouseEvent(_XEvent const*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA25D268: QApplication::x11ProcessEvent(_XEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==  Address 0x3d975de0 is 16 bytes inside a block of size 40 free'd
==4478==    at 0x4C2C2BC: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4478==    by 0xB3004F7: QPersistentModelIndex::operator=(QModelIndex const&) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0x6E75BA0: Digikam::PersistentWidgetDelegateOverlay::showOnIndex(QModelIndex const&) (in /usr/lib/digikam/libdigikamcore.so.4.7.0)
==4478==    by 0x6B82A8: Digikam::AssignNameOverlay::showOnIndex(QModelIndex const&) (in /usr/bin/digikam)
==4478==    by 0x6B83E4: Digikam::AssignNameOverlay::eventFilter(QObject*, QEvent*) (in /usr/bin/digikam)
==4478==    by 0xB30A645: QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E2E0B: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA1E95DC: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0x9BF3D19: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:311)
==4478==    by 0xB30A4DC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==4478==    by 0xA1E8D92: QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478==    by 0xA25D9CA: QETWidget::translateMouseEvent(_XEvent const*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==4478== 


^C==4478== 
==4478== HEAP SUMMARY:
==4478==     in use at exit: 24,612,744,978 bytes in 1,853,022 blocks
==4478==   total heap usage: 42,349,768 allocs, 40,496,746 frees, 42,955,953,961 bytes allocated
==4478== 

username      5577  2048  0 10:55 ?        00:00:04 kdeinit4: kio_digikamtags [kdeinit] digikamtags local:/tmp/ksocket-username/klauncherhX2049.slave-socket local:/tmp/ksocket-username/digikamQG4478.slave-socket
username      6046  1722  0 11:29 ?        00:00:00 /usr/lib/kde4/libexec/kwin_killer_helper --pid 4478 --hostname localhost --windowname digiKam --applicationname digikam --wid 20971623 --timestamp 3549347
username      6082  2211  0 11:30 pts/10   00:00:00 grep --color=auto digi
Comment 1 caulier.gilles 2015-02-28 16:52:02 UTC
It's same problem than bug #338176, but your valgrind trace is interresting.

Please report your trace directly in but #338176. No need to have duplicate entry in bugzilla.

Gilles Caulier

*** This bug has been marked as a duplicate of bug 338176 ***
Comment 2 Maik Qualmann 2017-12-17 19:21:28 UTC
Git commit 6a9fd9891a3ff341dc42fe36158cbf0101d513b6 by Maik Qualmann.
Committed on 17/12/2017 at 19:20.
Pushed by mqualmann into branch 'master'.

delete threads from memory when they are finished
Related: bug 375317, bug 375035, bug 321784, bug 325712, bug 328732, bug 330227, bug 331912, bug 345395, bug 350549, bug 381877, bug 338249, bug 329651, bug 329091, bug 387821, bug 381222

M  +2    -1    NEWS
M  +25   -0    libs/database/dbjobs/dbjobsmanager.cpp
M  +35   -0    libs/iojobs/iojobsmanager.cpp

https://commits.kde.org/digikam/6a9fd9891a3ff341dc42fe36158cbf0101d513b6
Comment 3 caulier.gilles 2017-12-17 20:00:56 UTC
Following this commit:

https://commits.kde.org/digikam/6a9fd9891a3ff341dc42fe36158cbf0101d513b6

... the approach to fix this problem is under way and new digiKam 5.8.0 pre-release bundles will be compiled tonight to lets a chance to end-users to give a feedback about this fix before the 5.8.0 official release planed before Christmas 2017.

The bundles will be available in 2 hours at this url:

https://files.kde.org/digikam/

Please do not waste time to test if this file is always valid for next 5.8.0.

Thanks in advance

Gilles Caulier
Comment 4 caulier.gilles 2019-12-23 07:45:42 UTC
Problem is fixed with new 7.0.0-beta1 through this long story from this bug

https://bugs.kde.org/show_bug.cgi?id=399923

You can test digiKam 7.0.0-beta1 with bundle available here:

https://download.kde.org/unstable/digikam/

Don't hesitate to give us a fresh feedback about his entry.

Thanks in advance

Gilles Caulier