Bug 303119 - digiKam crashes when applying Restoration on a PNG picture
Summary: digiKam crashes when applying Restoration on a PNG picture
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-Restoration (show other bugs)
Version: 2.6.0
Platform: Debian unstable Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-06 18:04 UTC by Theo Widmer
Modified: 2016-06-30 11:39 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Theo Widmer 2012-07-06 18:04:03 UTC
Application: digikam (2.6.0)
KDE Platform Version: 4.8.4 (4.8.4)
Qt Version: 4.8.2
Operating System: Linux 3.2.0-3-amd64 x86_64
Distribution: Debian GNU/Linux testing/unstable

-- Information about the crash:
- What I was doing when the application crashed:
1) Open digiKam in Edit mode, select a PNG picture (1.5MPx, 2.0MiB size)
2) Enhance, Restoration, Reduce Uniform Noise -> digiKam starts to process the picture, but crashes before finishing

- Custom settings of the application:
PNG compression ratio 9

The crash can be reproduced every time.

-- Backtrace:
Application: digiKam (digikam), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:39
[Current thread is 1 (Thread 0x7fb05e497a00 (LWP 12508))]

Thread 26 (Thread 0x7fb038a94700 (LWP 12509)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb0587a420b in wait (time=18446744073709551615, this=0x1e07ae0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1e079d8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000000005fa903 in ?? ()
#4  0x00007fb0587a3d0b in QThreadPrivate::start (arg=0x1e07770) at thread/qthread_unix.cpp:307
#5  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#6  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 25 (Thread 0x7fb038293700 (LWP 12510)):
#0  0x00007fb057a4ca93 in *__GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fb050e1b4d4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb050e1b5f4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb0588cd306 in QEventDispatcherGlib::processEvents (this=0x1ddf5e0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007fb05889d92f in QEventLoop::processEvents (this=this@entry=0x7fb038292b70, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fb05889dbb8 in QEventLoop::exec (this=0x7fb038292b70, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007fb0587a0d70 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007fb05887e23f in QInotifyFileSystemWatcherEngine::run (this=0x1d5a6e0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fb0587a3d0b in QThreadPrivate::start (arg=0x1d5a6e0) at thread/qthread_unix.cpp:307
#9  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#10 0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 24 (Thread 0x7fb037a92700 (LWP 12512)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb0587a420b in wait (time=18446744073709551615, this=0x1df6440) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x1fec8a8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fb05bc96f33 in ?? () from /usr/lib/libdigikamcore.so.2
#4  0x00007fb0587a3d0b in QThreadPrivate::start (arg=0x1fec890) at thread/qthread_unix.cpp:307
#5  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#6  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 23 (Thread 0x7fb03415a700 (LWP 12517)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb02cd32eaf in ?? () from /usr/lib/libvlccore.so.5
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 22 (Thread 0x7fb023d3f700 (LWP 12520)):
#0  0x00007fb057a4ca93 in *__GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fb050e1b4d4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb050e1b5f4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb0588cd306 in QEventDispatcherGlib::processEvents (this=0xa5e68b0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007fb05889d92f in QEventLoop::processEvents (this=this@entry=0x7fb023d3eb70, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fb05889dbb8 in QEventLoop::exec (this=0x7fb023d3eb70, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007fb0587a0d70 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007fb05887e23f in QInotifyFileSystemWatcherEngine::run (this=0xab33640) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fb0587a3d0b in QThreadPrivate::start (arg=0xab33640) at thread/qthread_unix.cpp:307
#9  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#10 0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 21 (Thread 0x7fb020b8e700 (LWP 12521)):
#0  0x00007fb057a4b70d in read () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007fb050e5650f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb050e1b059 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb050e1b472 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb050e1b5f4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb0588cd306 in QEventDispatcherGlib::processEvents (this=0xab57c60, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007fb05889d92f in QEventLoop::processEvents (this=this@entry=0x7fb020b8db70, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007fb05889dbb8 in QEventLoop::exec (this=0x7fb020b8db70, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007fb0587a0d70 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#9  0x00007fb05887e23f in QInotifyFileSystemWatcherEngine::run (this=0xab580a0) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x00007fb0587a3d0b in QThreadPrivate::start (arg=0xab580a0) at thread/qthread_unix.cpp:307
#11 0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#12 0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 20 (Thread 0x7fb0057fa700 (LWP 14365)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb0587a420b in wait (time=18446744073709551615, this=0x2ffe500) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x2ffe328, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x000000000071b88e in ?? ()
#4  0x00007fb0587a3d0b in QThreadPrivate::start (arg=0x2ffd870) at thread/qthread_unix.cpp:307
#5  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#6  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 19 (Thread 0x7fb0067fc700 (LWP 14368)):
#0  0x00007fb057a4b70d in read () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007fb050e5650f in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fb050e1b059 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fb050e1b472 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb050e1b5f4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fb0588cd306 in QEventDispatcherGlib::processEvents (this=0xc994750, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007fb05889d92f in QEventLoop::processEvents (this=this@entry=0x7fb0067fbb50, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007fb05889dbb8 in QEventLoop::exec (this=0x7fb0067fbb50, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007fb05bc964bf in ?? () from /usr/lib/libdigikamcore.so.2
#9  0x00007fb0587976bd in QThreadPoolThread::run (this=0xb636f30) at concurrent/qthreadpool.cpp:107
#10 0x00007fb0587a3d0b in QThreadPrivate::start (arg=0xb636f30) at thread/qthread_unix.cpp:307
#11 0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#12 0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 18 (Thread 0x7fb01a4d3700 (LWP 14369)):
[KCrash Handler]
#6  0x00007fb0579b1475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007fb0579b46f0 in *__GI_abort () at abort.c:92
#8  0x00007fb0579eb2fb in __libc_message (do_abort=<optimized out>, fmt=<optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#9  0x00007fb0579f4b46 in malloc_printerr (action=3, str=0x7fb057acb988 "malloc(): memory corruption (fast)", ptr=<optimized out>) at malloc.c:6283
#10 0x00007fb0579f8428 in _int_malloc (av=0x7fb000000020, bytes=<optimized out>) at malloc.c:4308
#11 0x00007fb0579f9960 in *__GI___libc_malloc (bytes=8) at malloc.c:3660
#12 0x00007fb0588b482a in queued_activate (argv=0x7fb01a4d2ab0, c=0xd0e4060, signal=11, sender=0xce83890) at kernel/qobject.cpp:3419
#13 QMetaObject::activate (sender=0xce83890, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fb01a4d2ab0) at kernel/qobject.cpp:3507
#14 0x00007fb05bae1480 in Digikam::DImgThreadedFilter::finished(bool) () from /usr/lib/libdigikamcore.so.2
#15 0x00007fb05bae1fc0 in Digikam::DImgThreadedFilter::startFilterDirectly() () from /usr/lib/libdigikamcore.so.2
#16 0x00007fb05bae215f in Digikam::DImgThreadedFilter::run() () from /usr/lib/libdigikamcore.so.2
#17 0x00007fb05bc99134 in Digikam::DynamicThread::DynamicThreadPriv::run() () from /usr/lib/libdigikamcore.so.2
#18 0x00007fb0587976bd in QThreadPoolThread::run (this=0xa46db10) at concurrent/qthreadpool.cpp:107
#19 0x00007fb0587a3d0b in QThreadPrivate::start (arg=0xa46db10) at thread/qthread_unix.cpp:307
#20 0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#21 0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#22 0x0000000000000000 in ?? ()

Thread 17 (Thread 0x7fb018dbe700 (LWP 14370)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 16 (Thread 0x7fb01bdb5700 (LWP 14371)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 15 (Thread 0x7fb01acd4700 (LWP 14372)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 14 (Thread 0x7fb013fff700 (LWP 14373)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 13 (Thread 0x7fb0137fe700 (LWP 14374)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7fb012733700 (LWP 14375)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7fb011f32700 (LWP 14376)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7fb010f30700 (LWP 14378)):
#0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97
#1  0x00007fb0579fb488 in _L_lock_9627 () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fb0579f9871 in *__GI___libc_free (mem=0x7fb000000020) at malloc.c:3736
#3  0x00007fb053cf2ef4 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#4  0x00007fb053367139 in __nptl_deallocate_tsd () at pthread_create.c:155
#5  0x00007fb053367b5e in start_thread (arg=<optimized out>) at pthread_create.c:311
#6  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7fb007fff700 (LWP 14379)):
#0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:97
#1  0x00007fb0579fb488 in _L_lock_9627 () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fb0579f9871 in *__GI___libc_free (mem=0x7fb000000020) at malloc.c:3736
#3  0x00007fb050e18a67 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fb0588cd5e1 in QEventDispatcherGlib::~QEventDispatcherGlib (this=0xc4f1b10, __in_chrg=<optimized out>) at kernel/qeventdispatcher_glib.cpp:375
#5  0x00007fb0588cd749 in QEventDispatcherGlib::~QEventDispatcherGlib (this=0xc4f1b10, __in_chrg=<optimized out>) at kernel/qeventdispatcher_glib.cpp:403
#6  0x00007fb0587a2e21 in QThreadPrivate::finish (arg=arg@entry=0xa6e36f0) at thread/qthread_unix.cpp:339
#7  0x00007fb0587a3d13 in ~__pthread_cleanup_class (this=<synthetic pointer>, __in_chrg=<optimized out>) at /usr/include/pthread.h:545
#8  QThreadPrivate::start (arg=0xa6e36f0) at thread/qthread_unix.cpp:309
#9  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#10 0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7faffe7fc700 (LWP 14387)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7faffdffb700 (LWP 14388)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7faffd7fa700 (LWP 14389)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7faffcff9700 (LWP 14390)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7faffc7f8700 (LWP 14391)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7faffbff7700 (LWP 14392)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7faffb7f6700 (LWP 14393)):
#0  0x00007fb053cf47e6 in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#1  0x00007fb053cf307e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1
#2  0x00007fb053367b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#3  0x00007fb057a576dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb05e497a00 (LWP 12508)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:39
#1  0x00007fb0587a27f4 in _q_futex (timeout=0x0, val=2, op=0, addr=0x1c21b70, addr2=<optimized out>, val2=<optimized out>) at thread/qmutex_unix.cpp:99
#2  QMutexPrivate::wait (this=0x1c21b70, timeout=<optimized out>) at thread/qmutex_unix.cpp:113
#3  0x00007fb05879ea05 in QMutex::lockInternal (this=<optimized out>) at thread/qmutex.cpp:450
#4  0x00007fb0588b53e0 in relock (mtx2=0x1cb4280, mtx1=0x1dd5010) at ../../include/QtCore/private/../../../src/corelib/thread/qorderedmutexlocker_p.h:108
#5  relock (mtx2=0x1cb4280, mtx1=0x1dd5010) at kernel/qobject.cpp:817
#6  QObject::~QObject (this=0xb91cd30, __in_chrg=<optimized out>) at kernel/qobject.cpp:881
#7  0x00007fb05a125e89 in OrgKdeKNotifyInterface::~OrgKdeKNotifyInterface (this=0xb91cd30, __in_chrg=<optimized out>) at knotify_interface.cpp:25
#8  0x00007fb05a00c361 in KNotificationManager::~KNotificationManager (this=0xcc71e80, __in_chrg=<optimized out>) at ../../kdeui/notifications/knotificationmanager.cpp:73
#9  0x00007fb05a00c3b9 in KNotificationManager::~KNotificationManager (this=0xcc71e80, __in_chrg=<optimized out>) at ../../kdeui/notifications/knotificationmanager.cpp:75
#10 0x00007fb0579b5df2 in __run_exit_handlers (status=1, listp=0x7fb057d004c8, run_list_atexit=true) at exit.c:78
#11 0x00007fb0579b5e45 in *__GI_exit (status=29498224) at exit.c:100
#12 0x00007fb059319148 in qt_xio_errhandler () at kernel/qapplication_x11.cpp:770
#13 0x00007fb059fe1688 in KApplication::xioErrhandler (this=0x7ffff4cd9650, dpy=0x1bbd530) at ../../kdeui/kernel/kapplication.cpp:419
#14 0x00007fb055f9060e in _XIOError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#15 0x00007fb055f8e0ad in _XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#16 0x00007fb055f7f6af in XEventsQueued () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#17 0x00007fb0593507cc in x11EventSourceCheck (s=0x1b811f0) at kernel/qguieventdispatcher_glib.cpp:85
#18 0x00007fb050e1afeb in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007fb050e1b472 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007fb050e1b5f4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fb0588cd2e6 in QEventDispatcherGlib::processEvents (this=0x1b7e830, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#22 0x00007fb05935096e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#23 0x00007fb05889d92f in QEventLoop::processEvents (this=this@entry=0x7ffff4cd94d0, flags=...) at kernel/qeventloop.cpp:149
#24 0x00007fb05889dbb8 in QEventLoop::exec (this=0x7ffff4cd94d0, flags=...) at kernel/qeventloop.cpp:204
#25 0x00007fb0588a2d78 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#26 0x00000000006d955f in ?? ()
#27 0x00007fb05799dead 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=0x7ffff4cd9d38) at libc-start.c:228
#28 0x0000000000499ca9 in _start ()

Reported using DrKonqi
Comment 1 caulier.gilles 2012-07-09 10:51:59 UTC
*** Bug 301526 has been marked as a duplicate of this bug. ***
Comment 2 caulier.gilles 2012-07-09 10:56:06 UTC
Marcel,

I can reproduce the crash here. Whithout to change any settings in Restortation filter config, let's filter processing image until end, and  at 99% it crash :

(gdb) bt
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb497da7f in raise () from /lib/i686/libc.so.6
#2  0xb497f4a5 in abort () from /lib/i686/libc.so.6
#3  0xb49b733a in __libc_message () from /lib/i686/libc.so.6
#4  0xb49bdbe2 in malloc_printerr () from /lib/i686/libc.so.6
#5  0xb49bf832 in _int_malloc () from /lib/i686/libc.so.6
#6  0xb49c150c in malloc () from /lib/i686/libc.so.6
#7  0xb4df3e7b in qMalloc(unsigned int) () from /usr/lib/libQtCore.so.4
#8  0xb4f260b3 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#9  0xb6dda050 in Digikam::DImgThreadedFilter::finished (this=0xb343fe8, _t1=true)
    at /mnt/data/Devel/GIT/2.x/build/core/digikam/dimgthreadedfilter.moc:117
#10 0xb6ddab03 in Digikam::DImgThreadedFilter::startFilterDirectly (this=0xb343fe8)
    at /mnt/data/Devel/GIT/2.x/core/libs/dimg/filters/dimgthreadedfilter.cpp:199
#11 0xb6ddacb0 in Digikam::DImgThreadedFilter::run (this=0xb343fe8)
    at /mnt/data/Devel/GIT/2.x/core/libs/dimg/filters/dimgthreadedfilter.cpp:210
#12 0xb6f83d98 in Digikam::DynamicThread::DynamicThreadPriv::run (this=0xb4921d8)
    at /mnt/data/Devel/GIT/2.x/core/libs/threads/dynamicthread.cpp:186
#13 0xb4dee45b in ?? () from /usr/lib/libQtCore.so.4
#14 0xb4dfbb60 in ?? () from /usr/lib/libQtCore.so.4
#15 0xb4d7fa37 in start_thread () from /lib/i686/libpthread.so.0
#16 0xb4a2598e in clone () from /lib/i686/libc.so.6
Backtrace stopped: Not enough registers or memory available to unwind further
(gdb) 

It sound like it try to emit finished() signal and end through dimgthreadedfilter.cpp:199. Perhaps filter instance is go out quickly from memory ?

Gilles Caulier
Comment 3 Marcel Wiesweg 2012-07-09 19:08:20 UTC
#4  0xb49bdbe2 in malloc_printerr () from /lib/i686/libc.so.6
#5  0xb49bf832 in _int_malloc () from /lib/i686/libc.so.6
#6  0xb49c150c in malloc () from /lib/i686/libc.so.6

Seems libc/malloc detects memory corruption and aborts. Maybe valgrind can point to the root of the problem (probably unrelated location)
Comment 4 caulier.gilles 2012-07-09 19:12:22 UTC
ok, as i can reproduce the problem, tomorrow morning i will run digiKam through Valgrind and get a backtrace...
Comment 5 caulier.gilles 2012-08-22 20:23:50 UTC
MArcel,

On my home computer, i can get a valgrind backtrace :

==3687== Conditional jump or move depends on uninitialised value(s)
==3687==    at 0xD7CB579: sin (in /lib64/libm-2.14.1.so)
==3687==    by 0x7C0FA06: cimg_library::CImg<float> const& cimg_library::CImg<float>::eigen<float>(cimg_library::CImg<float>&, cimg_library::CImg<float>&) const (CImg.h:27384)
==3687==    by 0x7C05BA1: cimg_library::CImg<float> const& cimg_library::CImg<float>::symmetric_eigen<float>(cimg_library::CImg<float>&, cimg_library::CImg<float>&) const (CImg.h:27434)
==3687==    by 0x7BFD94D: cimg_library::CImg<float>& cimg_library::CImg<float>::blur_anisotropic<unsigned char>(cimg_library::CImg<unsigned char> const&, float, float, float, float, float, float, float, float, unsigned int, bool, float) (CImg.h:25545)
==3687==    by 0x7BC8050: cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:428)
==3687==    by 0xCD1CB98: start_thread (in /lib64/libpthread-2.14.1.so)
==3687==    by 0xDD200CC: clone (in /lib64/libc-2.14.1.so)
==3687== 
==3687== Conditional jump or move depends on uninitialised value(s)
==3687==    at 0xD7ECC60: ??? (in /lib64/libm-2.14.1.so)
==3687==    by 0xD7CBA49: cos (in /lib64/libm-2.14.1.so)
==3687==    by 0x7C0F9C9: cimg_library::CImg<float> const& cimg_library::CImg<float>::eigen<float>(cimg_library::CImg<float>&, cimg_library::CImg<float>&) const (CImg.h:27383)
==3687==    by 0x7C05BA1: cimg_library::CImg<float> const& cimg_library::CImg<float>::symmetric_eigen<float>(cimg_library::CImg<float>&, cimg_library::CImg<float>&) const (CImg.h:27434)
==3687==    by 0x7BFD94D: cimg_library::CImg<float>& cimg_library::CImg<float>::blur_anisotropic<unsigned char>(cimg_library::CImg<unsigned char> const&, float, float, float, float, float, float, float, float, unsigned int, bool, float) (CImg.h:25545)
==3687==    by 0x7BC8050: cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:428)
==3687==    by 0xCD1CB98: start_thread (in /lib64/libpthread-2.14.1.so)
==3687==    by 0xDD200CC: clone (in /lib64/libc-2.14.1.so)
==3687== 
...
==3687== 
==3687== Conditional jump or move depends on uninitialised value(s)
==3687==    at 0x7C0DF9F: cimg_library::CImg<float>& cimg_library::CImg<float>::blur_anisotropic<float>(cimg_library::CImg<float> const&, float, float, float, float, unsigned int, bool) (CImg.h:25470)
==3687==    by 0x7BFDD12: cimg_library::CImg<float>& cimg_library::CImg<float>::blur_anisotropic<unsigned char>(cimg_library::CImg<unsigned char> const&, float, float, float, float, float, float, float, float, unsigned int, bool, float) (CImg.h:25558)
==3687==    by 0x7BC8050: cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:428)
==3687==    by 0xCD1CB98: start_thread (in /lib64/libpthread-2.14.1.so)
==3687==    by 0xDD200CC: clone (in /lib64/libc-2.14.1.so)
==3687== 
==3687== Thread 8:
==3687== Invalid write of size 1
==3687==    at 0x7BC8389: cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:457)
==3687==    by 0xCD1CB98: start_thread (in /lib64/libpthread-2.14.1.so)
==3687==    by 0xDD200CC: clone (in /lib64/libc-2.14.1.so)
==3687==  Address 0x295de690 is 0 bytes inside a block of size 1 free'd
==3687==    at 0x4C2572C: operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==3687==    by 0x7BC8254: cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:448)
==3687==    by 0xCD1CB98: start_thread (in /lib64/libpthread-2.14.1.so)
==3687==    by 0xDD200CC: clone (in /lib64/libc-2.14.1.so)

This is when i press TRY button on editor. Rendering is done. No crash into valgrind...

Gilles
Comment 6 caulier.gilles 2012-08-23 05:23:35 UTC
Marcel,

This is the valgrind result on home computer when i press Apply button on Restoration tool :


digikam(3687)/digikam (core) Digikam::GreycstorationFilter::filterImage: Finalization...
digikam(3687)/digikam (core) Digikam::EditorToolThreaded::slotFilterFinished: Preview  "Restoration"  completed...
digikam(3687)/digikam (core) Digikam::EditorToolThreaded::slotOk: Final  "Restoration"  started...
digikam(3687)/digikam (core) Digikam::GreycstorationFilter::filterImage: Initialization...
digikam(3687)/digikam (core) Digikam::GreycstorationFilter::filterImage: Process Computation...
==3687== Conditional jump or move depends on uninitialised value(s)
==3687==    at 0xD7C9FBE: sin (in /lib64/libm-2.14.1.so)
==3687==    by 0x7C0FA06: cimg_library::CImg<float> const& cimg_library::CImg<float>::eigen<float>(cimg_library::CImg<float>&, cimg_library::CImg<float>&) const (CImg.h:27384)
==3687==    by 0x7C05BA1: cimg_library::CImg<float> const& cimg_library::CImg<float>::symmetric_eigen<float>(cimg_library::CImg<float>&, cimg_library::CImg<float>&) const (CImg.h:27434)
==3687==    by 0x7BFD94D: cimg_library::CImg<float>& cimg_library::CImg<float>::blur_anisotropic<unsigned char>(cimg_library::CImg<unsigned char> const&, float, float, float, float, float, float, float, float, unsigned int, bool, float) (CImg.h:25545)
==3687==    by 0x7BC8050: cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:428)
==3687==    by 0xCD1CB98: start_thread (in /lib64/libpthread-2.14.1.so)
==3687==    by 0xDD200CC: clone (in /lib64/libc-2.14.1.so)
==3687== 
==3687== Conditional jump or move depends on uninitialised value(s)
==3687==    at 0xD7CC72B: cos (in /lib64/libm-2.14.1.so)
==3687==    by 0x7C0F9C9: cimg_library::CImg<float> const& cimg_library::CImg<float>::eigen<float>(cimg_library::CImg<float>&, cimg_library::CImg<float>&) const (CImg.h:27383)
==3687==    by 0x7C05BA1: cimg_library::CImg<float> const& cimg_library::CImg<float>::symmetric_eigen<float>(cimg_library::CImg<float>&, cimg_library::CImg<float>&) const (CImg.h:27434)
==3687==    by 0x7BFD94D: cimg_library::CImg<float>& cimg_library::CImg<float>::blur_anisotropic<unsigned char>(cimg_library::CImg<unsigned char> const&, float, float, float, float, float, float, float, float, unsigned int, bool, float) (CImg.h:25545)
==3687==    by 0x7BC8050: cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:428)
==3687==    by 0xCD1CB98: start_thread (in /lib64/libpthread-2.14.1.so)
==3687==    by 0xDD200CC: clone (in /lib64/libc-2.14.1.so)
==3687== 
==3687== Thread 5:
==3687== Invalid read of size 8
==3687==    at 0x7BC6F64: cimg_library::CImg<float>::greycstoration_progress() const (greycstoration.h:136)
==3687==    by 0x7BC3FCE: Digikam::GreycstorationFilter::iterationLoop(unsigned int) (greycstorationfilter.cpp:482)
==3687==    by 0x7BC37AB: Digikam::GreycstorationFilter::restoration() (greycstorationfilter.cpp:344)
==3687==    by 0x7BC319D: Digikam::GreycstorationFilter::filterImage() (greycstorationfilter.cpp:248)
==3687==    by 0x7B01751: Digikam::DImgThreadedFilter::startFilterDirectly() (dimgthreadedfilter.cpp:189)
==3687==    by 0x7B01910: Digikam::DImgThreadedFilter::run() (dimgthreadedfilter.cpp:210)
==3687==    by 0x7CB421B: Digikam::DynamicThread::DynamicThreadPriv::run() (dynamicthread.cpp:186)
==3687==    by 0xC8B34A1: ??? (in /usr/lib64/libQtCore.so.4.8.2)
==3687==    by 0xC8BFC3A: ??? (in /usr/lib64/libQtCore.so.4.8.2)
==3687==    by 0xCD1CB98: start_thread (in /lib64/libpthread-2.14.1.so)
==3687==    by 0xDD200CC: clone (in /lib64/libc-2.14.1.so)
==3687==  Address 0x3c5fb610 is 0 bytes inside a block of size 8 free'd
==3687==    at 0x4C2572C: operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==3687==    by 0x7BC81F6: cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:446)
==3687==    by 0xCD1CB98: start_thread (in /lib64/libpthread-2.14.1.so)
==3687==    by 0xDD200CC: clone (in /lib64/libc-2.14.1.so)
==3687== 
==3687== (action on error) vgdb me ... 

Gilles
Comment 7 Marcel Wiesweg 2012-08-23 18:09:00 UTC
==3687== Invalid write of size 1 ==3687== at 0x7BC8389: cimg_library::CImg<float>::greycstoration_thread(void*) (greycstoration.h:457) 

Look at the relevant code:
      if (p.stop_request) delete p.stop_request;
    [...]
      (*p.stop_request) = false;

Already good for a crash, isn't it?

==3687== Invalid read of size 8 ==3687== at 0x7BC6F64: cimg_library::CImg<float>::greycstoration_progress() const (greycstoration.h:136) ==3687== by 0x7BC3FCE: Digikam::GreycstorationFilter::iterationLoop(unsigned int) (greycstorationfilter.cpp:482) 

  if (!greycstoration_is_running()) return 0.0f;
  const unsigned long counter = greycstoration_params->counter?*(greycstoration_params->counter):0;

Now the question is: is this thread-safe? Then we'd need to know about the place and time of destroying the counter. It's here:

      if (p.counter) delete p.counter;

In a thread, without mutex lock! This whole threading here I dont really like, it's not clean.
I will have a look for a fix.
Comment 8 Marcel Wiesweg 2012-08-27 20:28:29 UTC
commit 7c1573a32020bc046c74d3dc1a346e4e97401bd3
Author: Marcel Wiesweg <marcel.wiesweg@gmx.de>
Date:   Mon Aug 27 21:55:40 2012 +0200

    Rewrite the threading code for CImg using Qt classes and our own  dynamic thread.
    Remove hacks and caveats which were probably associated with the old implementation missing some necessities.
Comment 9 Marcel Wiesweg 2012-08-27 20:29:35 UTC
This needs testing.
It does not crash and run smoothly, but i'm not sure the individual methods all do what they are supposed to do. Restauration seems to come to some sort of blur, inpainting - I'm not sure what it's supposed to do.
Comment 10 caulier.gilles 2012-08-28 11:53:16 UTC
Marcel, 

Restoration tool crash is fixed now with your commit. I tested with small and large image on 2 computers.

Gilles
Comment 11 caulier.gilles 2012-08-28 12:07:30 UTC
Marcel,

I think fixes to greystoration tool is not enough, or at least must be check with your last fix through this entry in bugzilla :

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

Both are about Inpainting tool using GreyStoration algorithm. It's about 2.6.0 release, as this report.

I'm not a specialist of this implementation. Restauration use vertex like mechanism to render and fix image. There is a lots of parameter to control algorithm. If you want to know about, look here :

http://dlraw.sourceforge.net/GREYC/guide.shtml

The mess is about Cimg, which become a image container with transform tools. greycstoration algorithm have been moved to a new dedicated lib named GMic. we need to port restoration tool to this library in the future...
Comment 12 caulier.gilles 2012-11-12 13:02:04 UTC
*** Bug 309857 has been marked as a duplicate of this bug. ***