Bug 189636

Summary: application crashes when closing completed batch resize or convert
Product: [Applications] digikam Reporter: Mathieu Baudier <mbaudier>
Component: Plugin-Bqm-ResizeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: anaselli
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 0.3.0
Sentry Crash Report:

Description Mathieu Baudier 2009-04-14 20:19:04 UTC
Version:           0.10.0 (using KDE 4.2.1)
OS:                Linux
Installed from:    Fedora RPMs

After a batch resize or convert is completed, clicking on the 'Close' button of the resize / convert dialog causes Digikam as a whole to crash.

The transformation itself is performed without problem and the images are properly generated. I would suspect that it is related to some tasks (either UI or background) performed when closing the dialog.

The images are stored on a USB hard-drive.

This is reproduced systematically.

Here is the backtrace:

Application: digiKam (digikam), signal SIGSEGV
0x0000003e632a7f81 in nanosleep () from /lib64/libc.so.6
[Current thread is 1 (Thread 0x7fba97901810 (LWP 9182))]

Thread 13 (Thread 0x7fba911a0950 (LWP 9183)):
#0  0x0000003e63e0b309 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000359285a839 in QWaitCondition::wait () from /usr/lib64/libQtCore.so.4
#2  0x000000000063c0a3 in ?? ()
#3  0x0000003592859852 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#5  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 12 (Thread 0x7fba89405950 (LWP 9184)):
#0  0x0000003e63e0b309 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000359285a839 in QWaitCondition::wait () from /usr/lib64/libQtCore.so.4
#2  0x000000308933151c in Digikam::LoadSaveThread::run () from /usr/lib64/libdigikamcore.so.1
#3  0x0000003592859852 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#5  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7fba88a04950 (LWP 9185)):
#0  0x0000003e63e0b309 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000359285a839 in QWaitCondition::wait () from /usr/lib64/libQtCore.so.4
#2  0x000000308933151c in Digikam::LoadSaveThread::run () from /usr/lib64/libdigikamcore.so.1
#3  0x0000003592859852 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#5  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7fba81269950 (LWP 9186)):
#0  0x0000003e63e0b58d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fba824fca91 in ?? () from /usr/lib64/libxine.so.1
#2  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#3  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7fba7f827950 (LWP 9187)):
#0  0x0000003e632deaa2 in select () from /lib64/libc.so.6
#1  0x00007fba825250d4 in xine_usec_sleep () from /usr/lib64/libxine.so.1
#2  0x00007fba8250a92b in ?? () from /usr/lib64/libxine.so.1
#3  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#4  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7fba7ee26950 (LWP 9188)):
#0  0x0000003e63e08aa1 in pthread_mutex_lock () from /lib64/libpthread.so.0
#1  0x000000328983a888 in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#2  0x000000328983ac6a in ?? () from /lib64/libglib-2.0.so.0
#3  0x000000328983b12b in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x000000359296a7be in QEventDispatcherGlib::processEvents () from /usr/lib64/libQtCore.so.4
#5  0x0000003592940cb2 in QEventLoop::processEvents () from /usr/lib64/libQtCore.so.4
#6  0x0000003592940e3d in QEventLoop::exec () from /usr/lib64/libQtCore.so.4
#7  0x00000035928568e8 in QThread::exec () from /usr/lib64/libQtCore.so.4
#8  0x00007fba82756c54 in Phonon::MediaSource::type () from /usr/lib64/kde4/plugins/phonon_backend/phonon_xine.so
#9  0x0000003592859852 in ?? () from /usr/lib64/libQtCore.so.4
#10 0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#11 0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fba7e425950 (LWP 9189)):
#0  0x0000003e632dc886 in poll () from /lib64/libc.so.6
#1  0x000000364822a034 in ?? () from /usr/lib64/libpulse.so.0
#2  0x000000364821ac62 in pa_mainloop_poll () from /usr/lib64/libpulse.so.0
#3  0x000000364821b015 in pa_mainloop_iterate () from /usr/lib64/libpulse.so.0
#4  0x000000364821b08a in pa_mainloop_run () from /usr/lib64/libpulse.so.0
#5  0x000000364822a0a2 in ?? () from /usr/lib64/libpulse.so.0
#6  0x000000364825b22d in ?? () from /usr/lib64/libpulse.so.0
#7  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#8  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fba79a23950 (LWP 9190)):
#0  0x0000003e63e0b309 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fba8250deb3 in ?? () from /usr/lib64/libxine.so.1
#2  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#3  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fba74f78950 (LWP 9205)):
#0  0x0000003e63e0b309 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000359285a839 in QWaitCondition::wait () from /usr/lib64/libQtCore.so.4
#2  0x000000308933151c in Digikam::LoadSaveThread::run () from /usr/lib64/libdigikamcore.so.1
#3  0x0000003592859852 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#5  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fba781f6950 (LWP 9220)):
#0  0x0000003e63e0b309 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000359285a839 in QWaitCondition::wait () from /usr/lib64/libQtCore.so.4
#2  0x000000308933151c in Digikam::LoadSaveThread::run () from /usr/lib64/libdigikamcore.so.1
#3  0x0000003592859852 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#5  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fba76df4950 (LWP 9221)):
#0  0x0000003e63e0b309 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x000000359285a839 in QWaitCondition::wait () from /usr/lib64/libQtCore.so.4
#2  0x000000308933151c in Digikam::LoadSaveThread::run () from /usr/lib64/libdigikamcore.so.1
#3  0x0000003592859852 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#5  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fba763a4950 (LWP 9224)):
#0  0x0000003e632deaa2 in select () from /lib64/libc.so.6
#1  0x0000003592922626 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x0000003592859852 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x0000003e63e073da in start_thread () from /lib64/libpthread.so.0
#4  0x0000003e632e62bd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fba97901810 (LWP 9182)):
[KCrash Handler]
#5  0x000000359295ba53 in ?? () from /usr/lib64/libQtCore.so.4
#6  0x000000359295ad5a in QSignalMapper::map () from /usr/lib64/libQtCore.so.4
#7  0x000000359295b8d0 in QSignalMapper::qt_metacall () from /usr/lib64/libQtCore.so.4
#8  0x0000003592956764 in QMetaObject::activate () from /usr/lib64/libQtCore.so.4
#9  0x000000364e3080c7 in QAbstractButton::clicked () from /usr/lib64/libQtGui.so.4
#10 0x000000364e08c1cb in ?? () from /usr/lib64/libQtGui.so.4
#11 0x000000364e08dd82 in ?? () from /usr/lib64/libQtGui.so.4
#12 0x000000364e08dfd5 in QAbstractButton::mouseReleaseEvent () from /usr/lib64/libQtGui.so.4
#13 0x000000364ddd4fd9 in QWidget::event () from /usr/lib64/libQtGui.so.4
#14 0x000000364dd828dd in QApplicationPrivate::notify_helper () from /usr/lib64/libQtGui.so.4
#15 0x000000364dd8aefa in QApplication::notify () from /usr/lib64/libQtGui.so.4
#16 0x0000003084a04f3b in KApplication::notify () from /usr/lib64/libkdeui.so.5
#17 0x0000003592942391 in QCoreApplication::notifyInternal () from /usr/lib64/libQtCore.so.4
#18 0x000000364dd8a298 in QApplicationPrivate::sendMouseEvent () from /usr/lib64/libQtGui.so.4
#19 0x000000364ddee919 in ?? () from /usr/lib64/libQtGui.so.4
#20 0x000000364dded337 in QApplication::x11ProcessEvent () from /usr/lib64/libQtGui.so.4
#21 0x000000364de13ae4 in ?? () from /usr/lib64/libQtGui.so.4
#22 0x000000328983779b in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#23 0x000000328983af6d in ?? () from /lib64/libglib-2.0.so.0
#24 0x000000328983b12b in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#25 0x000000359296a79f in QEventDispatcherGlib::processEvents () from /usr/lib64/libQtCore.so.4
#26 0x000000364de1328f in ?? () from /usr/lib64/libQtGui.so.4
#27 0x0000003592940cb2 in QEventLoop::processEvents () from /usr/lib64/libQtCore.so.4
#28 0x0000003592940e3d in QEventLoop::exec () from /usr/lib64/libQtCore.so.4
#29 0x00000035929432ed in QCoreApplication::exec () from /usr/lib64/libQtCore.so.4
#30 0x0000000000660057 in ?? ()
#31 0x0000003e6321e576 in __libc_start_main () from /lib64/libc.so.6
#32 0x0000000000453339 in _start ()
Comment 1 caulier.gilles 2009-04-14 21:18:23 UTC
Well, i cannot see what is wrong here. Ther eis nothing special in backtrace.

To be sure, try to reproduce the crash using Gwenview as kipi host program.

Gilles Caulier
Comment 2 Mathieu Baudier 2009-04-14 21:52:09 UTC
I just installed Gwenview but I cannot use the plugins (batch resize / convert). They are grey even when I select a few pictures. Only Red eyes removal is active.
What should I do to use them / activate them?

I forgot to say that I am working with Gnome.
Comment 3 caulier.gilles 2009-04-14 22:13:12 UTC
There is no reason. I don't know why it doesn' work under GWenview...

Angelo, any tips here ?

Note: Gnome as no incidence here...

Gilles
Comment 4 Mathieu Baudier 2009-04-14 22:24:29 UTC
Please note that it is pretty easy to reproduce with Digikam.

I ran it in GDB but got the same backtrace.

Don't hesitate to tell me if I can do something else.
I am a developer myself (rather Java, but I'm comfortable with building Linux apps).
Comment 5 Andi Clemens 2009-04-30 23:57:41 UTC
I've made some changes in current SVN, maybe they fixed the problem. Can you
test it?

Note: You need to compile kipi-plugins from SVN, it is not a digiKam problem (I hope so at least).

Andi
Comment 6 Mathieu Baudier 2009-05-01 09:52:56 UTC
Hi,

I followed the instructions on this page in order to build digikam and Kipi plugins:
http://www.digikam.org/drupal/download/svn?q=download/KDE4

I uninstalled the standard digikam and kipi-plugins packages from Fedora in order to avoid the distirbute dkipi-plugins being taken by digikam. 

But when I now start the built digikam I cannot see the kipi-plugins (in the Digikam Settings), so I probably missed a step...

How do I tell digikam to use them?

(I ran 'make install' as root, is there a way to remove them afterwards? I am not too happy that it impacted /usr and not /usr/local, I should have probably changed the prefix...)

Thanks for your help!

Mathieu
Comment 7 Andi Clemens 2009-05-01 10:09:51 UTC
If you done every step as in the above link, /usr is the right way to go.
KIPIplugins are KDE services, so they need to reside in the KDE main dir.
If 'kde4-config --prefix' delivered /usr for you, then it is /usr :-)

There is no way to tell digiKam to use them, try to either

1. run 'kdeinit4' while still logged into a KDE4 session
2. logout / login
3. restart your system

Sometimes new services / plugins are not detected by kdeinit4, so you need to run it manually or logout / restart the system.

If it is still not working, please post the console output you get when starting digiKam. You can also try to start gwenview and see if the plugins are in there.

Andi
Comment 8 Mathieu Baudier 2009-05-01 10:12:46 UTC
/usr > ok no pb, I have anyhow the gut feeling that I will run more and more the SVN verison of DigiKam :)  (I'm eager to work on some kipi-plugins)

I am actually working under GNOME. Is it a problem?

I had some weird logs from kdeinit, so as soon as I'm doen with what I am currently doing, I will reboot and try again.
Comment 9 Andi Clemens 2009-05-01 10:17:30 UTC
(In reply to comment #6)
> (I ran 'make install' as root, is there a way to remove them afterwards?

Since all files are in their correct place ('kde4-config --prefix' should guarantee this), then you could simply reinstall your fedora packages. If you still want to delete everything first, try the following as root:

1. updatedb
2. locate -i digikam | grep $(kde4-config --prefix). It should save to delete those listed files. But I would skip files in this folder: /YOUR_PREFIX/share/icons/, maybe you delete icons from other packages.

3. do the same with kipi-plugins, just change the search term in the above step:
digikam => kipiplugin

Andi
Comment 10 Andi Clemens 2009-05-01 10:18:53 UTC
(In reply to comment #8)
> I am actually working under GNOME. Is it a problem?

Not directly, but maybe kdeinit4 is not working correctly under Gnome? Try the restart...

Andi
Comment 11 Mathieu Baudier 2009-05-01 10:34:03 UTC
Restarting did the trick, and I could see the plugins...

I tested, and it is not crashing anymore when closing the Kipi Plugin!!
To recap my environment: Fedora 10, 2.6.27.21-170.2.56.fc10.x86_64, GNOME 2.24.3

Am I supposed to set the status to RESOLVED?

May I ask what do you use as IDE for developing Kipi Plugins? I'd like to have a closer look? (I ten to use Eclipse CDT for C++, but that's rather low-lvel C++ not big UIs like Digikam).

Many thanks!

Mathieu
Comment 12 Andi Clemens 2009-05-01 11:05:52 UTC
I'll close it.
Well I use Eclipse + CDT, for me it is the best IDE (because I use it for Python and Java, too, so I'm familiar with the UI).
Others use KDevelop, or simply vim or emacs.
Comment 13 Andi Clemens 2009-05-01 11:14:12 UTC
Little note on why I use Eclipse: Although Eclipse is sometimes slower then KDevelop or vim / emacs, I like it because of one plugin: MyLyn.
This is very helpful for working on bigger projects. Maybe you know it? It can also connect to the KDE bugtracker and help you organize your workflow.
So if you already use Eclipse and don't know MyLyn, take a look: http://www.eclipse.org/mylyn/

It changed my way of programming a lot :-)
Comment 14 Mathieu Baudier 2009-05-01 11:23:14 UTC
For the time being, I use MyLyn rather as an UI for Bugzilla, or to deal with specific bugs among tens of different projects, where the focused UI really has an added value.
But during new features development, I tend to find it a little too intrusive, with some weird side effects.

Anyhow, this is definitely a very interesting approach!