Bug 304002 - Segfault when using inpainting
Summary: Segfault when using inpainting
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Plugin-Editor-Clone (show other bugs)
Version: 2.6.0
Platform: Debian testing Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-24 12:44 UTC by Simon
Modified: 2017-09-05 05:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon 2012-07-24 12:44:51 UTC
Application: digikam (2.6.0)
KDE Platform Version: 4.8.3 (4.8.3)
Qt Version: 4.8.2
Operating System: Linux 3.4.0-2.dmz.2-liquorix-amd64 x86_64
Distribution (Platform): Debian testing

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

Used four filters (contrast, saturation, and others) and finally inpainting. While it was generating the preview on a selection (maybe 1/10 of the 16 Megapixels image, took two minutes or more) it crashed at around 90 %.

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f10f26a5a00 (LWP 5369))]

Thread 15 (Thread 0x7f10cca75700 (LWP 5370)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f10ec9b420b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00000000005fa9cb in ?? ()
#3  0x00007f10ec9b3d0b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#5  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 14 (Thread 0x7f10cc274700 (LWP 5371)):
#0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97
#1  0x00007f10ebc09488 in _L_lock_9627 () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f10ebc07871 in *__GI___libc_free (mem=0x7f10ebf0fe60) at malloc.c:3736
#3  0x00007f10ecadcb93 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f10e5042feb in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f10e5043472 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f10e50435f4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f10ecadd2e6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f10ecaad92f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f10ecaadbb8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007f10ec9b0d70 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007f10eca8e23f in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#12 0x00007f10ec9b3d0b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#13 0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#14 0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#15 0x0000000000000000 in ?? ()

Thread 13 (Thread 0x7f10cba73700 (LWP 5375)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f10ec9b420b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f10efe9ef7b in ?? () from /usr/lib/libdigikamcore.so.2
#3  0x00007f10ec9b3d0b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#5  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7f10c3bc0700 (LWP 5380)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f10c8fb3aef in ?? () from /usr/lib/libvlccore.so.5
#2  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7f10b5f8f700 (LWP 5399)):
#0  0x00007f10ebc5aa93 in *__GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f10e50434d4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f10e50435f4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f10ecadd306 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007f10ecaad92f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f10ecaadbb8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f10efe9e507 in ?? () from /usr/lib/libdigikamcore.so.2
#7  0x00007f10ec9a76bd in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f10ec9b3d0b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#10 0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7f10b1b86700 (LWP 5410)):
#0  0x00007f10e7f1e7e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007f10e7f1d07e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f10b1385700 (LWP 5411)):
#0  0x00007f10e7f1e7e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007f10e7f1d07e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f10b0b84700 (LWP 5412)):
#0  0x00007f10e7f1e7e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007f10e7f1d07e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f10ab7fe700 (LWP 5444)):
#0  0x00007f10ebc72004 in pthread_mutex_lock (mutex=0x58bcb20) at forward.c:182
#1  0x00007f10e507f1b1 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f10e50434ba in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f10e50435f4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f10ecadd306 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f10ecaad92f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f10ecaadbb8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007f10efe9e507 in ?? () from /usr/lib/libdigikamcore.so.2
#8  0x00007f10ec9a76bd in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f10ec9b3d0b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#11 0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f109ebe2700 (LWP 5466)):
#0  0x00007f10e7f1e7e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007f10e7f1d07e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f109e3e1700 (LWP 5467)):
#0  0x00007f10e7f1e7e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007f10e7f1d07e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f109dbe0700 (LWP 5468)):
#0  0x00007f10e7f1e7e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007f10e7f1d07e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f10b6f91700 (LWP 5672)):
#0  0x00007f10ebc3684d in nanosleep () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f10ebc5f8f4 in usleep (useconds=<optimized out>) at ../sysdeps/unix/sysv/linux/usleep.c:33
#2  0x00007f10efdb0d97 in Digikam::GreycstorationFilter::iterationLoop(unsigned int) () from /usr/lib/libdigikamcore.so.2
#3  0x00007f10efdb094f in Digikam::GreycstorationFilter::inpainting() () from /usr/lib/libdigikamcore.so.2
#4  0x00007f10efdafe89 in Digikam::GreycstorationFilter::filterImage() () from /usr/lib/libdigikamcore.so.2
#5  0x00007f10efce9f94 in Digikam::DImgThreadedFilter::startFilterDirectly() () from /usr/lib/libdigikamcore.so.2
#6  0x00007f10efcea14f in Digikam::DImgThreadedFilter::run() () from /usr/lib/libdigikamcore.so.2
#7  0x00007f10efea1184 in Digikam::DynamicThread::DynamicThreadPriv::run() () from /usr/lib/libdigikamcore.so.2
#8  0x00007f10ec9a76bd in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f10ec9b3d0b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#11 0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f108ba15700 (LWP 5745)):
#0  0x00007f10efdf9e00 in ?? () from /usr/lib/libdigikamcore.so.2
#1  0x00007f10efdeb42f in ?? () from /usr/lib/libdigikamcore.so.2
#2  0x00007f10efdb5249 in ?? () from /usr/lib/libdigikamcore.so.2
#3  0x00007f10e7591b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#4  0x00007f10ebc656dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f10f26a5a00 (LWP 5369)):
[KCrash Handler]
#5  malloc_consolidate (av=0x7f10ebf0fe60) at malloc.c:5155
#6  0x00007f10ebc04478 in _int_free (av=0x7f10ebf0fe60, p=0x9ac0fd0) at malloc.c:5034
#7  0x00007f10ebc0787c in *__GI___libc_free (mem=<optimized out>) at malloc.c:3738
#8  0x00007f10ed56f105 in QImageData::~QImageData() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#9  0x00007f10ed56f193 in QImage::~QImage() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#10 0x00007f10ed598318 in QRasterPixmapData::~QRasterPixmapData() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#11 0x00007f10ed598359 in QRasterPixmapData::~QRasterPixmapData() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#12 0x00007f10ed588e72 in QPixmap::~QPixmap() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#13 0x00007f10eff9739b in Digikam::ImageIface::paint(QPaintDevice*, int, int, int, int, QPainter*) () from /usr/lib/libdigikamcore.so.2
#14 0x00007f10eff1043d in Digikam::ImageGuideWidget::updatePixmap() () from /usr/lib/libdigikamcore.so.2
#15 0x00007f10eff13d31 in Digikam::ImageGuideWidget::leaveEvent(QEvent*) () from /usr/lib/libdigikamcore.so.2
#16 0x00007f10ed508e68 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#17 0x00007f10ed4b970c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#18 0x00007f10ed4bdb8a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#19 0x00007f10ee1ebc16 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#20 0x00007f10ecaaebde in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#21 0x00007f10ed4b9c28 in QApplicationPrivate::dispatchEnterLeave(QWidget*, QWidget*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007f10ed4ba501 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#23 0x00007f10ed5350f4 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007f10ed534066 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007f10ed55acf2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007f10e5043205 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007f10e5043538 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007f10e50435f4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f10ecadd2e6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#30 0x00007f10ed55a96e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007f10ecaad92f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#32 0x00007f10ecaadbb8 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#33 0x00007f10ecab2d78 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#34 0x00000000006d96cb in ?? ()
#35 0x00007f10ebbabead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff0bfe1bb8) at libc-start.c:228
#36 0x0000000000499ba9 in _start ()

Reported using DrKonqi
Comment 1 caulier.gilles 2012-08-28 12:21:49 UTC
Git commit cf96fce25a846afe8cae287f0a8a6757481be769 by Gilles Caulier.
Committed on 28/08/2012 at 14:19.
Pushed by cgilles into branch 'master'.

do not start Greystoration based tools imediatly because it take a while. User must press Try button explicitly to show preview
Related: bug 232926

M  +0    -1    imageplugins/enhance/inpaintingtool.cpp
M  +0    -1    imageplugins/enhance/restorationtool.cpp

http://commits.kde.org/digikam/cf96fce25a846afe8cae287f0a8a6757481be769
Comment 2 Ananta Palani 2013-07-12 23:41:15 UTC
Git commit 421b387878e84d272f63dc12d67bef37d5eeb0cf by Ananta Palani.
Committed on 12/07/2013 at 23:40.
Pushed by palani into branch 'master'.

Fixes hang in in-painting tool and segfault caused by leaking threads each iteration of cimg tool use.
Related: bug 319632
FIXED-IN: 3.3.0

M  +3    -1    NEWS
M  +1    -2    imageplugins/enhance/inpaintingtool.cpp
M  +8    -4    libs/3rdparty/cimg/greycstoration.h

http://commits.kde.org/digikam/421b387878e84d272f63dc12d67bef37d5eeb0cf
Comment 3 caulier.gilles 2013-07-23 08:12:57 UTC
Git commit aa796e8a553b94da6c2b05a24ba66a94673171b1 by Gilles Caulier.
Committed on 23/07/2013 at 08:09.
Pushed by cgilles into branch 'master'.

Inpainting and restoration tools : handup resize event from canvas widget only when preview session settings are restored,
else greystoration configuration can be uncomplete/broken and generate infinite loop.
Rename "None" preset as "Custom" to be more user friendly.
Related: bug 319632

M  +23   -20   imageplugins/enhance/inpaintingtool.cpp
M  +1    -1    imageplugins/enhance/inpaintingtool.h
M  +22   -20   imageplugins/enhance/restorationtool.cpp
M  +1    -1    imageplugins/enhance/restorationtool.h
M  +13   -12   utilities/imageeditor/editor/editortool.cpp
M  +1    -1    utilities/imageeditor/editor/editortool.h

http://commits.kde.org/digikam/aa796e8a553b94da6c2b05a24ba66a94673171b1
Comment 4 caulier.gilles 2017-09-05 05:09:39 UTC
With 5.8.0, in-painting image editor tool was been replaced by a Clone tool.

More details here : 

https://community.kde.org/GSoC/2017/StatusReports/shazaismailkaoud

Gilles Caulier