Bug 284215 - digikam crashes when "Create photo layouts" used second time
Summary: digikam crashes when "Create photo layouts" used second time
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-PhotoLayoutEditor (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-16 19:20 UTC by nucleo
Modified: 2017-08-18 13:23 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.3.0


Attachments
valgrind output when digikam crashed (23.68 KB, text/plain)
2011-10-16 20:06 UTC, nucleo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nucleo 2011-10-16 19:20:32 UTC
Version:           2.2.0 (using KDE 4.7.2) 
OS:                Linux

digikam crashes when "Create photo layouts" used second time.

Reproducible: Always

Steps to Reproduce:
1. Open "Create photo layouts..."  first time
2. Select one of tools, for example "Text editor"
3. Close "Photo Layouts Editor" window, answer No on saving
4. Open "Create photo layouts..."  second time
5. Select the same tool

Actual Results:  
Crash.

Thread 12 (Thread 0xaf30bb40 (LWP 2831)):
#0  0x00133416 in __kernel_vsyscall ()
#1  0x0333abb4 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x030bf560 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x030b17fc in ?? () from /usr/lib/libQtCore.so.4
#4  0x030bf061 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03336c8e in start_thread () from /lib/libpthread.so.0
#6  0x036b53ee in clone () from /lib/libc.so.6

Thread 11 (Thread 0xafb0cb40 (LWP 2830)):
#0  0x00133416 in __kernel_vsyscall ()
#1  0x0333abb4 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x030bf560 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x030b17fc in ?? () from /usr/lib/libQtCore.so.4
#4  0x030bf061 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03336c8e in start_thread () from /lib/libpthread.so.0
#6  0x036b53ee in clone () from /lib/libc.so.6

Thread 10 (Thread 0xac2feb40 (LWP 2829)):
#0  0x00133416 in __kernel_vsyscall ()
#1  0x0333abb4 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x030bf560 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x030b17fc in ?? () from /usr/lib/libQtCore.so.4
#4  0x030bf061 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03336c8e in start_thread () from /lib/libpthread.so.0
#6  0x036b53ee in clone () from /lib/libc.so.6

Thread 5 (Thread 0xb1002b40 (LWP 2815)):
#0  0x00133416 in __kernel_vsyscall ()
#1  0x0333a80c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb4772904 in vlc_cond_wait () from /usr/lib/libvlccore.so.4
#3  0xb46ef9de in ?? () from /usr/lib/libvlccore.so.4
#4  0x03336c8e in start_thread () from /lib/libpthread.so.0
#5  0x036b53ee in clone () from /lib/libc.so.6

Thread 4 (Thread 0xb5fffb40 (LWP 2808)):
#0  0x00133416 in __kernel_vsyscall ()
#1  0x0333a80c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x030bf5e8 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x011b7264 in Digikam::ParkingThread::run (this=0x8862fd8)
    at /usr/src/debug/digikam-2.2.0/core/libs/threads/threadmanager.cpp:119
#4  0x030bf061 in ?? () from /usr/lib/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
#5  0x03336c8e in start_thread () from /lib/libpthread.so.0
#6  0x036b53ee in clone () from /lib/libc.so.6

Thread 2 (Thread 0xb6987b40 (LWP 2806)):
#0  0x00133416 in __kernel_vsyscall ()
#1  0x0333a80c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x030bf5e8 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#3  0x08201276 in Digikam::ScanController::run (this=0x86c8a08)
    at /usr/src/debug/digikam-2.2.0/core/digikam/database/scancontroller.cpp:647
#4  0x030bf061 in ?? () from /usr/lib/libQtCore.so.4
#5  0x03336c8e in start_thread () from /lib/libpthread.so.0
#6  0x036b53ee in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb78cd900 (LWP 2803)):
#0  0x031d66f6 in QCoreApplication::postEvent(QObject*, QEvent*, int) () from /usr/lib/libQtCore.so.4
#1  0x031d6aac in QCoreApplication::postEvent(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#2  0x031e5ed5 in QObject::deleteLater() () from /usr/lib/libQtCore.so.4
#3  0xb006bc9a in KIPIPhotoLayoutsEditor::ToolsDockWidget::setTextWidgetVisible (this=0x86948f8, isVisible=true)
    at /usr/src/debug/digikam-2.2.0/extra/kipi-plugins/photolayoutseditor/widgets/tools/ToolsDockWidget.cpp:378
#4  0x031e87e1 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#5  0x02ad2c5e in QAbstractButton::toggled(bool) () from /usr/lib/libQtGui.so.4
#6  0x027c5b12 in QAbstractButton::setChecked(bool) () from /usr/lib/libQtGui.so.4
#7  0x027c5cb1 in QAbstractButton::nextCheckState() () from /usr/lib/libQtGui.so.4
#8  0x027c574c in ?? () from /usr/lib/libQtGui.so.4
#9  0x027c5a46 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#10 0x023f680d in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#11 0x027c4cb1 in QAbstractButton::event(QEvent*) () from /usr/lib/libQtGui.so.4
#12 0x028695e9 in QPushButton::event(QEvent*) () from /usr/lib/libQtGui.so.4
#13 0x0239b9f4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#14 0x023a1b8a in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#15 0x02006d52 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#16 0x031d2f3e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#17 0x0239c9c6 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#18 0x0242642c in ?? () from /usr/lib/libQtGui.so.4
#19 0x0242540d in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#20 0x02450325 in ?? () from /usr/lib/libQtGui.so.4
#21 0x04a4b5bf in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#22 0x04a4bd00 in ?? () from /lib/libglib-2.0.so.0
#23 0x04a4bfaf in g_main_context_iteration () from /lib/libglib-2.0.so.0
#24 0x03205be8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#25 0x0244ffbb in ?? () from /usr/lib/libQtGui.so.4
#26 0x031d1e2e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
#27 0x031d20d9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#28 0x031d727b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#29 0x023997f5 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#30 0x080b6424 in main (argc=1, argv=0xbffff164) at /usr/src/debug/digikam-2.2.0/core/digikam/main/main.cpp:232

Expected Results:  
No Crash.

Crash happens both with fix from bug 283321 and without it.
Comment 1 nucleo 2011-10-16 20:06:34 UTC
Created attachment 64606 [details]
valgrind output when digikam crashed
Comment 2 caulier.gilles 2011-11-03 12:44:32 UTC
kipi-plugins 2.2.0 is out since few weeks. Crash still valid with this version ?

Gilles Caulier
Comment 3 nucleo 2011-11-03 12:48:19 UTC
This bug is in photolayouts plugin which released first with kipi-plugins 2.2.0.
Comment 4 Ananta Palani 2011-11-03 14:30:51 UTC
Crash is happening in kipi-plugins/photolayoutseditor/widgets/tools/ToolsDockWidget.cpp when the following is performed:

   w->deleteLater();

I don't know enough about Qt to know why this crash happens.

-Ananta
Comment 5 caulier.gilles 2011-11-03 14:33:49 UTC
I CC plugin author for info...

Gilles Caulier
Comment 6 Kevin Kofler 2011-11-03 15:44:28 UTC
Most likely, this means that w was already deleted when you try calling deleteLater on it.
Comment 7 Łukasz Spas 2011-11-04 20:12:02 UTC
Git commit 438cef5e3c746ee599bbac7082258374893140d8 by Łukasz Spas.
Committed on 04/11/2011 at 21:11.
Pushed by lukaszspas into branch 'master'.

BUG: 284215

M  +46   -39   photolayoutseditor/widgets/tools/ToolsDockWidget.cpp

http://commits.kde.org/kipi-plugins/438cef5e3c746ee599bbac7082258374893140d8
Comment 8 nucleo 2011-11-04 20:31:22 UTC
Is this fix will be in kipi-plugins-2.3.0?
Comment 9 caulier.gilles 2011-11-04 20:36:48 UTC
yes, it will...

Gilles Caulier