Bug 261964 - Crashes when trying to open configure dialog
Summary: Crashes when trying to open configure dialog
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Runtime (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-03 15:46 UTC by Alin M Elena
Modified: 2018-02-04 11:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alin M Elena 2011-01-03 15:46:00 UTC
Application: digikam (2.0.0-beta1)
KDE Platform Version: 4.6.40 (4.7 >= 20101222) "release 1" (Compiled from sources)
Qt Version: 4.7.1
Operating System: Linux 2.6.37-rc8-desktop x86_64
Distribution: "openSUSE 11.4 Milestone 5 of 6 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
digikam2 crashes when trying to open confiure digikam
- Unusual behavior I noticed:
crash
- Custom settings of the application:
none that I know
more lines to keep the thing happy.....

The crash can be reproduced every time.

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f60e1816860 (LWP 24346))]

Thread 5 (Thread 0x7f60c3c70700 (LWP 24347)):
#0  0x00007f60d8bac38c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f60dc59617b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x000000000061e520 in ?? ()
#3  0x00007f60dc595a8e in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f60d8ba7a3f in start_thread () from /lib64/libpthread.so.0
#5  0x00007f60dabf93dd in clone () from /lib64/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f60c346f700 (LWP 24348)):
#0  0xffffffffff600177 in ?? ()
#1  0x00007fff2e1d17a1 in ?? ()
#2  0x00007f60d34162b3 in clock_gettime () from /lib64/librt.so.1
#3  0x00007f60dc5e7302 in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f60dc6aa38d in ?? () from /usr/lib64/libQtCore.so.4
#5  0x00007f60dc6aa705 in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007f60dc6a91cc in ?? () from /usr/lib64/libQtCore.so.4
#7  0x00007f60dc6a9275 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007f60d3169ef7 in g_main_context_prepare () from /lib64/libglib-2.0.so.0
#9  0x00007f60d316ae19 in ?? () from /lib64/libglib-2.0.so.0
#10 0x00007f60d316b4c0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#11 0x00007f60dc6a99c6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#12 0x00007f60dc67e092 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#13 0x00007f60dc67e2a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#14 0x00007f60dc593214 in QThread::exec() () from /usr/lib64/libQtCore.so.4
#15 0x00007f60dc65f9a8 in ?? () from /usr/lib64/libQtCore.so.4
#16 0x00007f60dc595a8e in ?? () from /usr/lib64/libQtCore.so.4
#17 0x00007f60d8ba7a3f in start_thread () from /lib64/libpthread.so.0
#18 0x00007f60dabf93dd in clone () from /lib64/libc.so.6
#19 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f60c2c6e700 (LWP 24358)):
#0  0x00007f60d8bac38c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f60dc59617b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f60de73bad7 in Digikam::ParkingThread::run (this=0xe2ec00) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/core/libs/threads/threadmanager.cpp:119
#3  0x00007f60dc595a8e in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f60d8ba7a3f in start_thread () from /lib64/libpthread.so.0
#5  0x00007f60dabf93dd in clone () from /lib64/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f6086e86700 (LWP 24362)):
#0  0x00007f60d8bac38c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f60be358d02 in ?? () from /usr/lib64/libvlccore.so.4
#2  0x00007f60d8ba7a3f in start_thread () from /lib64/libpthread.so.0
#3  0x00007f60dabf93dd in clone () from /lib64/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f60e1816860 (LWP 24346)):
[KCrash Handler]
#6  0x00007f60db7cbc61 in QAction::icon() const () from /usr/lib64/libQtGui.so.4
#7  0x00007f60dfc98fa3 in KIPI::PluginLoader::Info::icon (this=0xea3000) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/extra/libkipi/libkipi/pluginloader.cpp:191
#8  0x00007f60dfc992ef in PluginCheckBox (this=0x46c5720, parent=<value optimized out>) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/extra/libkipi/libkipi/pluginloader.cpp:381
#9  KIPI::ConfigWidget::ConfigWidget (this=0x46c5720, parent=<value optimized out>) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/extra/libkipi/libkipi/pluginloader.cpp:409
#10 0x00007f60dfc993e9 in KIPI::PluginLoader::configWidget (this=<value optimized out>, parent=0x46c4400) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/extra/libkipi/libkipi/pluginloader.cpp:368
#11 0x00000000004e09ca in _start ()

Possible duplicates by query: bug 255733, bug 254283, bug 245776, bug 245775, bug 245628.

Reported using DrKonqi
Comment 1 caulier.gilles 2011-01-03 15:50:25 UTC
Marcel,

This bug have been fixed in 1.x release.

It's back now... I don't understand why...

Gilles Caulier
Comment 2 Marcel Wiesweg 2011-01-03 16:07:19 UTC
I'm not sure if a plugin can have no actions. But the lines
        if (d->plugin->actions()[0])
            return d->plugin->actions()[0]->icon();
do not prevent a crash in that case, it should be
        if (d->plugin->actions().isEmpty() && d->plugin->actions().first())
            return d->plugin->actions().first()->icon();
(where the second check may be paranoid)

If that is not the problem, I would assume that an old, binary-incompatible kipi-plugin is loaded.
What happens if a service for a plugin based on libkipi.so.7 is loaded from a host based on libkipi.so.9? Will d->service->createInstance fail in that case, as it should?
Comment 3 Alin M Elena 2011-01-03 16:27:10 UTC
here is a better backtrace

Application: digiKam (digikam), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f856d7d2860 (LWP 31586))]

Thread 5 (Thread 0x7f854fc2c700 (LWP 31587)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f856855217b in wait (this=<value optimized out>, mutex=0xc77218, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xc77218, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x000000000061e520 in Digikam::ScanController::run (this=0xc76e70) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/core/digikam/scancontroller.cpp:599
#4  0x00007f8568551a8e in QThreadPrivate::start (arg=0xc76e70) at thread/qthread_unix.cpp:285
#5  0x00007f8564b63a3f in start_thread (arg=0x7f854fc2c700) at pthread_create.c:297
#6  0x00007f8566bb53dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f854f42b700 (LWP 31588)):
#0  0x00007f855f126e76 in ?? () from /lib64/libglib-2.0.so.0
#1  0x00007f855f1274c0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#2  0x00007f85686659c6 in QEventDispatcherGlib::processEvents (this=0xbf5860, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#3  0x00007f856863a092 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#4  0x00007f856863a2a5 in QEventLoop::exec (this=0x7f854f42ace0, flags=...) at kernel/qeventloop.cpp:201
#5  0x00007f856854f214 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#6  0x00007f856861b9a8 in QInotifyFileSystemWatcherEngine::run (this=0xc45f00) at io/qfilesystemwatcher_inotify.cpp:248
#7  0x00007f8568551a8e in QThreadPrivate::start (arg=0xc45f00) at thread/qthread_unix.cpp:285
#8  0x00007f8564b63a3f in start_thread (arg=0x7f854f42b700) at pthread_create.c:297
#9  0x00007f8566bb53dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f854ec2a700 (LWP 31597)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f856855217b in wait (this=<value optimized out>, mutex=0xd44ff8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0xd44ff8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007f856a6f7ad7 in Digikam::ParkingThread::run (this=0xd44fe0) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/core/libs/threads/threadmanager.cpp:119
#4  0x00007f8568551a8e in QThreadPrivate::start (arg=0xd44fe0) at thread/qthread_unix.cpp:285
#5  0x00007f8564b63a3f in start_thread (arg=0x7f854ec2a700) at pthread_create.c:297
#6  0x00007f8566bb53dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f8512e43700 (LWP 31601)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f854a314d02 in ?? () from /usr/lib64/libvlccore.so.4
#2  0x00007f8564b63a3f in start_thread (arg=0x7f8512e43700) at pthread_create.c:297
#3  0x00007f8566bb53dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f856d7d2860 (LWP 31586)):
[KCrash Handler]
#6  QAction::icon (this=0x454545454545453e) at kernel/qaction.cpp:737
#7  0x00007f856bc54fa3 in KIPI::PluginLoader::Info::icon (this=0x1341e90) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/extra/libkipi/libkipi/pluginloader.cpp:191
#8  0x00007f856bc552ef in PluginCheckBox (this=0x4698dd0, parent=<value optimized out>) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/extra/libkipi/libkipi/pluginloader.cpp:381
#9  KIPI::ConfigWidget::ConfigWidget (this=0x4698dd0, parent=<value optimized out>) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/extra/libkipi/libkipi/pluginloader.cpp:409
#10 0x00007f856bc553e9 in KIPI::PluginLoader::configWidget (this=<value optimized out>, parent=0x4697aa0) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/extra/libkipi/libkipi/pluginloader.cpp:368
#11 0x00000000004e09ca in Digikam::SetupPlugins::SetupPlugins (this=0x46991f0, parent=<value optimized out>) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/core/utilities/setup/setupplugins.cpp:74
#12 0x00000000004cb3ac in Digikam::Setup::Setup (this=0x24386a0, parent=<value optimized out>) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/core/utilities/setup/setup.cpp:277
#13 0x00000000004ccd70 in Digikam::Setup::exec (parent=0xc6c5f0, page=Digikam::Setup::LastPageUsed) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/core/utilities/setup/setup.cpp:399
#14 0x00000000005d541f in Digikam::DigikamApp::qt_metacall (this=0xc6c5f0, _c=QMetaObject::InvokeMetaMethod, _id=28, _a=0x7fff6512c500) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/build/core/digikam/digikamapp.moc:228
#15 0x00007f856864fe3f in QMetaObject::activate (sender=0x19aba70, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fff6512c500) at kernel/qobject.cpp:3272
#16 0x00007f85677889a2 in QAction::triggered (this=<value optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#17 0x00007f8567788b9a in QAction::activate (this=0x19aba70, event=<value optimized out>) at kernel/qaction.cpp:1257
#18 0x00007f8567bbee33 in QMenuPrivate::activateCausedStack (this=0x1b7daa0, causedStack=..., action=0x19aba70, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:993
#19 0x00007f8567bc4e5a in QMenuPrivate::activateAction (this=0x1b7daa0, action=0x19aba70, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1085
#20 0x00007f856912511d in KMenu::mouseReleaseEvent (this=0x1b7da60, e=<value optimized out>) at /usr/src/debug/kdelibs-4.6.40svn1210926/kdeui/widgets/kmenu.cpp:458
#21 0x00007f85677e0558 in QWidget::event (this=0x1b7da60, event=0x7fff6512d180) at kernel/qwidget.cpp:8200
#22 0x00007f8567bc604b in QMenu::event (this=0x1b7da60, e=0x7fff6512d180) at widgets/qmenu.cpp:2410
#23 0x00007f856778ed44 in QApplicationPrivate::notify_helper (this=0xb6d5f0, receiver=0x1b7da60, e=0x7fff6512d180) at kernel/qapplication.cpp:4445
#24 0x00007f8567797acc in QApplication::notify (this=<value optimized out>, receiver=0x1b7da60, e=0x7fff6512d180) at kernel/qapplication.cpp:4006
#25 0x00007f856906b3b6 in KApplication::notify (this=0x7fff6512dfc0, receiver=0x1b7da60, event=0x7fff6512d180) at /usr/src/debug/kdelibs-4.6.40svn1210926/kdeui/kernel/kapplication.cpp:311
#26 0x00007f856863ac3c in QCoreApplication::notifyInternal (this=0x7fff6512dfc0, receiver=0x1b7da60, event=0x7fff6512d180) at kernel/qcoreapplication.cpp:732
#27 0x00007f856778fd45 in sendEvent (receiver=0x1b7da60, event=0x7fff6512d180, alienWidget=0x0, nativeWidget=0x1b7da60, buttonDown=0x7f856825e178, lastMouseReceiver=..., spontaneous=true) at ../../src/corelib/kernel/qcoreapplication.h:215
#28 QApplicationPrivate::sendMouseEvent (receiver=0x1b7da60, event=0x7fff6512d180, alienWidget=0x0, nativeWidget=0x1b7da60, buttonDown=0x7f856825e178, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3105
#29 0x00007f856780e074 in QETWidget::translateMouseEvent (this=0x1b7da60, event=<value optimized out>) at kernel/qapplication_x11.cpp:4372
#30 0x00007f856780c4e9 in QApplication::x11ProcessEvent (this=0x7fff6512dfc0, event=0x7fff6512dae0) at kernel/qapplication_x11.cpp:3564
#31 0x00007f8567834102 in x11EventSourceDispatch (s=0xb713b0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#32 0x00007f855f126a43 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#33 0x00007f855f127220 in ?? () from /lib64/libglib-2.0.so.0
#34 0x00007f855f1274c0 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#35 0x00007f856866596f in QEventDispatcherGlib::processEvents (this=0xb056a0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#36 0x00007f8567833d9e in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#37 0x00007f856863a092 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#38 0x00007f856863a2a5 in QEventLoop::exec (this=0x7fff6512de00, flags=...) at kernel/qeventloop.cpp:201
#39 0x00007f856863e6eb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#40 0x00000000006810bd in main (argc=11858432, argv=0x7fff6512e700) at /usr/src/debug/digikam2-1.9.92svn.rev1210843/core/digikam/main.cpp:232
Comment 4 Alin M Elena 2011-01-03 16:30:49 UTC
Indeed it seems that somehow I had a libkipi.so.8 on my system... removed it and now it works... I suspect that now something else is broken...
Comment 5 Raymond Wooninck 2011-01-03 16:56:13 UTC
This would create a very strange situation. KDE 4.6 is building libkipi.so.8 from the kdegraphics module. libkipi.so.9 can be installed along-side it, but the fact that both are on the system seems to cause the crash with digikam2.

At least this would be the situation on the openSUSE distro. I am not sure about other distro's.

alin tests shows that when he removes libkipi.so.8 digikam2 works, but ksnapshot and gwenview fail due to the missing libkipi.so.8 library. 

Is there a way to make it possible to have digikam2 work with both libkipi.so.8 and libkipi.so.9 ?  Or maybe there is another solution ? 

Thanks 

Raymond
Community member of the openSUSE KDE team
Comment 6 Marcel Wiesweg 2011-01-03 17:27:25 UTC
I believe this time it is not digikam requiring the dependency, but the newer kipi-plugins. The problem is the forked dependency graph:

kipi-plugins  host application
     |         |
       libkipi

When a new kipi-plugins version requires a newer libkipi, then the host application linked to the older libkipi cannot use this plugin. And a host application linked to the new libkipi cannot use a plugin linked to the old libkipi.

I am a bit surprised that this problem is apparently not handled. Perhaps it is? Or it's not easily possible at all?
Comment 7 Christian (Fuchs) 2011-01-04 15:12:10 UTC
I can confirm this crash with digikam 1.6.0 and 1.7.0, kipi-plugins 1.6.0 and 1.7.0  (tried all combinations). Gentoo Linux, x86_64, qt 4.7.1. 

So it might be related to libkipi  (4.5.90 currently), not digikam. However, if this really is in libkipi, it should be fixed before 4.6 release, else it will render digikam not usable for many users. 

Kind regards, 

Christian
Comment 8 caulier.gilles 2011-01-04 15:42:12 UTC
SVN commit 1211648 by cgilles:

more paranoid check to prevent crash if no action are registered in plugin.
CCBUGS: 261964


 M  +2 -2      pluginloader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211648
Comment 9 caulier.gilles 2011-01-04 15:42:50 UTC
SVN commit 1211650 by cgilles:

backport commit #1211648 from trunk
CCBUGS: 261964


 M  +2 -2      pluginloader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211650
Comment 10 caulier.gilles 2011-01-04 15:44:35 UTC
SVN commit 1211653 by cgilles:

bakport commit #1211648 from trunk
CCBUGS: 261964


 M  +2 -2      pluginloader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211653
Comment 11 Christian (Fuchs) 2011-01-04 18:33:11 UTC
Erm, 

shouldn't it  be

        if (!d->plugin->actions().isEmpty() && d->plugin->actions().first())
            return d->plugin->actions().first()->icon();

instead? Because like that it is logical to me  (if it is _not_ empty ...), plus this way it doesn't crash, plus the other way round (as you just commited) it still crashes ...

Kind regards, 

Christian
Comment 12 caulier.gilles 2011-01-05 09:08:38 UTC
SVN commit 1211960 by cgilles:

fix wrong logic
CCBUGS: 261964


 M  +1 -1      pluginloader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211960
Comment 13 caulier.gilles 2011-01-05 09:09:06 UTC
SVN commit 1211961 by cgilles:

fix wrong logic 
CCBUGS: 261964


 M  +1 -1      pluginloader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211961
Comment 14 caulier.gilles 2011-01-05 09:09:37 UTC
SVN commit 1211962 by cgilles:

fix wrong logic
CCBUGS: 261964


 M  +1 -1      pluginloader.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211962
Comment 15 Christian (Fuchs) 2011-01-05 12:55:54 UTC
Thanks a lot for the quick fix :) 

Keep up the good work, I really like digikam. 

Kind regards, 

Christian
Comment 16 caulier.gilles 2011-01-05 13:31:16 UTC
It do not crash anymore now ?

I can close this file ?

Gilles Caulier
Comment 17 Christian (Fuchs) 2011-01-05 16:58:46 UTC
Hello Gilles, 

I patched it by hand, but as far as I can see the changes are the same you just committed. 

Unfortunately I don't have digikam2 which was used by the person originally reporting this bug, so I'd recommend you wait on feedback from him. It seems that gentoo doesn't provide a build for it, but if there is no answer from the original reporter I will try to build digikam2 after my holidays (end of this week).

For me the crash is gone for digikam 1.7.0 / 1.6.0, so probably it is fixed. 

Thanks again, kind regards, 

Christian