Bug 243074 - channel mixer hangs on initialize
Summary: channel mixer hangs on initialize
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-Channels (show other bugs)
Version: 1.4.0
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-28 20:41 UTC by Johannes Wienke
Modified: 2020-08-26 03:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Wienke 2010-06-28 20:41:02 UTC
Version:           1.4.0
OS:                Linux

I started the channel mixer and no initial preview was generated. The progress bar had appeared and was stuck at 0% percent. So I tried to press cancel but nothing happened. This is the backtrace for all threads.

Thread 13 (Thread 0x7f5fca4b0710 (LWP 26892)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f5fd835772b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x000000000065bd4c in Digikam::ScanController::run (this=0x24e8170) at /home/languitar/kde-workspace/digikam-trunk/digikam/scancontroller.cpp:516
#3  0x00007f5fd8356775 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#5  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 12 (Thread 0x7f5fc9caf710 (LWP 27023)):
#0  0x00007f5fd73f0f53 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f5fd3d624a9 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f5fd3d628fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f5fd8474513 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f5fd8449992 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f5fd8449d6c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f5fd8353d59 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f5fd8356775 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 11 (Thread 0x7f5fc92a1710 (LWP 27024)):
#0  0x00007f5fd73f0f53 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f5fd3d624a9 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f5fd3d628fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f5fd8474513 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f5fd8449992 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f5fd8449d6c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f5fd8353d59 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f5fd8356775 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7f5fc13ca710 (LWP 27029)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f5fd835772b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f5fdbcf3c78 in Digikam::ParkingThread::run (this=<value optimized out>)
    at /home/languitar/kde-workspace/digikam-trunk/libs/threads/threadmanager.cpp:101
#3  0x00007f5fd8356775 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#5  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f5fc0bc9710 (LWP 27031)):
---Type <return> to continue, or q <return> to quit---
#0  0x00007f5fd73f0f53 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f5fd3d624a9 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f5fd3d628fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f5fd8474513 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f5fd8449992 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f5fd8449d6c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f5fd8353d59 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f5fd8356775 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7f5fc03c8710 (LWP 27032)):
#0  0x00007f5fd73f0f53 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f5fd3d624a9 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f5fd3d628fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f5fd8474513 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f5fd8449992 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f5fd8449d6c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f5fd8353d59 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f5fd8356775 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7f5fb9931710 (LWP 27096)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211
#1  0x00007f5fbdccf081 in ?? () from /usr/lib/libxine.so.1
#2  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#3  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7f5fb84f5710 (LWP 27129)):
#0  0x00007f5fd73f5fb3 in select () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f5fbdcf82c5 in xine_usec_sleep () from /usr/lib/libxine.so.1
#2  0x00007f5fbdcdcc99 in ?? () from /usr/lib/libxine.so.1
#3  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#4  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f5fb7cf4710 (LWP 27130)):
#0  0x00007f5fd73f0f53 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f5fd3d624a9 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f5fd3d628fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f5fd8474513 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f5fd8449992 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f5fd8449d6c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
#6  0x00007f5fd8353d59 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f5fbdf2b440 in ?? () from /usr/lib/qt4/plugins/phonon_backend/phonon_xine.so
#8  0x00007f5fd8356775 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#10 0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f5fb2397710 (LWP 27192)):
#0  0x00007f5fd73f0f53 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=333) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f5fb72ee915 in ?? () from /usr/lib/xine/plugins/1.27/xineplug_ao_out_alsa.so
#2  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#3  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f5fb6192710 (LWP 27193)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f5fbdcdfe23 in ?? () from /usr/lib/libxine.so.1
#2  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#3  0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f5fb1395710 (LWP 27384)):
#0  0x00007f5fd73f0f53 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f5fd3d624a9 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f5fd3d628fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f5fd8474513 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f5fd8449992 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f5fd8449d6c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f5fd8353d59 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f5fd842a178 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f5fd8356775 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f5fd80c69ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#10 0x00007f5fd73fd6cd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f5fdec807e0 (LWP 26599)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f5fd835772b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2  0x00007f5fdbcf4954 in Digikam::DynamicThread::wait (this=0xdf3b9b0, locker=<value optimized out>)
    at /home/languitar/kde-workspace/digikam-trunk/libs/threads/dynamicthread.cpp:248
#3  0x00007f5fdbcf4a0c in Digikam::DynamicThread::wait (this=0xdf3b9b0) at /home/languitar/kde-workspace/digikam-trunk/libs/threads/dynamicthread.cpp:150
#4  0x00007f5fdbbdf2cf in Digikam::DImgThreadedFilter::cancelFilter (this=0xdf3b9b0)
    at /home/languitar/kde-workspace/digikam-trunk/libs/dimg/filters/dimgthreadedfilter.cpp:175
#5  0x00007f5fdbdae5fa in Digikam::EditorToolThreaded::slotAbort (this=0x4a61bb0)
    at /home/languitar/kde-workspace/digikam-trunk/utilities/imageeditor/editor/editortool.cpp:374
#6  0x00007f5fdbdb0aac in Digikam::EditorToolIface::qt_metacall (this=0x4a655a0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, 
    _a=<value optimized out>) at /home/languitar/kde-workspace/build/digikam-trunk/digikam/editortooliface.moc:80
---Type <return> to continue, or q <return> to quit---
#7  0x00007f5fd845de3f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#8  0x00007f5fdbd3ad8c in Digikam::StatusProgressBar::qt_metacall (this=0x56c3e80, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, 
    _a=0x7fffa7e49140) at /home/languitar/kde-workspace/build/digikam-trunk/digikam/statusprogressbar.moc:80
#9  0x00007f5fd845de3f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#10 0x00007f5fd99d05f2 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4
#11 0x00007f5fd96ea86b in ?? () from /usr/lib/libQtGui.so.4
#12 0x00007f5fd96eb70b in ?? () from /usr/lib/libQtGui.so.4
#13 0x00007f5fd96eb97c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#14 0x00007f5fd938b582 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#15 0x00007f5fd933522c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#16 0x00007f5fd933becb in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#17 0x00007f5fda29b526 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#18 0x00007f5fd844b06c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#19 0x00007f5fd933b0ae in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /usr/lib/libQtGui.so.4
#20 0x00007f5fd93baf65 in ?? () from /usr/lib/libQtGui.so.4
#21 0x00007f5fd93b98ac in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#22 0x00007f5fd93e5882 in ?? () from /usr/lib/libQtGui.so.4
#23 0x00007f5fd3d5e8c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#24 0x00007f5fd3d62748 in ?? () from /lib/libglib-2.0.so.0
#25 0x00007f5fd3d628fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#26 0x00007f5fd8474513 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#27 0x00007f5fd93e546e in ?? () from /usr/lib/libQtGui.so.4
#28 0x00007f5fd8449992 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#29 0x00007f5fd8449d6c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#30 0x00007f5fd844daab in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#31 0x00000000006bbe7a in main (argc=<value optimized out>, argv=<value optimized out>) at /home/languitar/kde-workspace/digikam-trunk/digikam/main.cpp:195


Reproducible: Sometimes




current trunk
Comment 1 caulier.gilles 2010-06-29 06:55:56 UTC
Sound like a lock in digiKam Thread interface. But it's not reproducible there...

Gilles
Comment 2 Marcel Wiesweg 2010-06-29 17:51:43 UTC
SVN commit 1144307 by mwiesweg:

Add two more volatile flags.

CCBUG: 243074

 M  +3 -4      dynamicthread.cpp  
 M  +1 -1      dynamicthread.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1144307
Comment 3 Marcel Wiesweg 2010-06-29 18:52:41 UTC
This commit adds a volatile flag where it was missing, and compiler optimization could have introduced problems. What's your gcc version? Any special optimization flags?

But alas, I cannot reproduce this bug so far at all.
Helgrind did not reveal any possible problems. Under the slow execution with valgrind, I could see that the progress changes from 0 to 100 percent (with the progress bar not fully filled btw), then changes back to 0% when finished, and then the UI is enabled again. Maybe there is a problem in that area as well.
Comment 4 Johannes Wienke 2010-06-29 19:27:14 UTC
gcc is 4.4.3, build type in cmake was debug.

I've seen it sometimes that the progress bar didn't do anything except from showing 0% but processes finished without a problem. This was on various filter or also on writing meta data. Looks a bit like a threading issue but I'm not sure.
Comment 5 Marcel Wiesweg 2010-09-13 18:40:56 UTC
In the Gsoc branch, quite a few fixes have been added to DynamicThread, when the five concurrent threads in the face detector showed some issues reproducably.
Maybe these problems here were related.
Comment 6 caulier.gilles 2011-07-03 15:41:33 UTC
digiKam 2.0.0 RC is out including changes from Marcel (see #5).

Please test with this version and give us some feedback

Gilles Caulier
Comment 7 caulier.gilles 2011-11-10 10:21:25 UTC
Git commit 5e2795b64fedaef4a4f63214814f9bdc90702e9c by Gilles Caulier.
Committed on 10/11/2011 at 11:17.
Pushed by cgilles into branch 'master'.

Chanels Mixer : Add combobox to select output chanel independently of histogram combobox. like this code is factored better
betwwen image editor and BQM. Also, histogram can be displayed in All Colors mode now.
Code polish to prevent signals overlaod in GUI.
BUGS: 243074

M  +7    -21   imageplugins/color/channelmixertool.cpp
M  +2    -4    imageplugins/color/channelmixertool.h
M  +42   -16   libs/dimg/filters/bw/mixersettings.cpp
M  +3    -2    libs/dimg/filters/bw/mixersettings.h
M  +2    -30   utilities/queuemanager/basetools/color/channelmixer.cpp
M  +1    -4    utilities/queuemanager/basetools/color/channelmixer.h

http://commits.kde.org/digikam/5e2795b64fedaef4a4f63214814f9bdc90702e9c