Bug 294884

Summary: Digikam crash at startup (due to notification window)
Product: [Applications] digikam Reporter: Frederic Grelot <fredericg_99>
Component: ProgressManager-BatchAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: 2.6.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 2.6.0
Sentry Crash Report:

Description Frederic Grelot 2012-02-26 20:02:53 UTC
Application: digikam (2.6.0-beta2)
KDE Platform Version: 4.7.4 (4.7.4)
Qt Version: 4.8.0
Operating System: Linux 3.2.7-1.fc16.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:
I just started digikam

According to the trace, the crash is related to the notification window.
I may add that I am quite "frenetic" with my desktop (Gnome 3), and the crash seems to occur when I start digikam, then immediately do something else.
If I wait for digikam to start, then for the task that scan new items to finish properly, nothing bad happens.

The crash can be reproduced some of the time.

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f25b91b8a40 (LWP 3660))]

Thread 5 (Thread 0x7f25a985f700 (LWP 3695)):
#0  0x000000389b80bae5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000038ac07c07b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00000000005d1d10 in Digikam::ScanController::run (this=0x2cb15e0) at /home/goulou/digikam/digikam-sc/core/digikam/database/scancontroller.cpp:647
#3  0x00000038ac07bb6b in ?? () from /usr/lib64/libQtCore.so.4
#4  0x000000389b807d90 in start_thread () from /lib64/libpthread.so.0
#5  0x000000389b4f0f5d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f25a905e700 (LWP 3696)):
#0  0x000000389b80af9d in pthread_mutex_unlock () from /lib64/libpthread.so.0
#1  0x000000389d444465 in g_main_context_query () from /lib64/libglib-2.0.so.0
#2  0x000000389d444eda in ?? () from /lib64/libglib-2.0.so.0
#3  0x000000389d44549c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x00000038ac1a7dc6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00000038ac178182 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00000038ac1783d7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#7  0x00000038ac078b27 in QThread::exec() () from /usr/lib64/libQtCore.so.4
#8  0x00000038ac157e7f in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00000038ac07bb6b in ?? () from /usr/lib64/libQtCore.so.4
#10 0x000000389b807d90 in start_thread () from /lib64/libpthread.so.0
#11 0x000000389b4f0f5d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f25a885d700 (LWP 3728)):
#0  0x000000389b80bae5 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000038ac07c07b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f25b995e499 in Digikam::ParkingThread::run (this=0x2eda180) at /home/goulou/digikam/digikam-sc/core/libs/threads/threadmanager.cpp:119
#3  0x00000038ac07bb6b in ?? () from /usr/lib64/libQtCore.so.4
#4  0x000000389b807d90 in start_thread () from /lib64/libpthread.so.0
#5  0x000000389b4f0f5d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f258bbe0700 (LWP 3764)):
#0  0x000000389b80be4f in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00000038ac07bfdf in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00000038ac06f5af in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00000038ac07bb6b in ?? () from /usr/lib64/libQtCore.so.4
#4  0x000000389b807d90 in start_thread () from /lib64/libpthread.so.0
#5  0x000000389b4f0f5d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f25b91b8a40 (LWP 3660)):
[KCrash Handler]
#6  0x00000038aec0e008 in QWidget::pos() const () from /usr/lib64/libQtGui.so.4
#7  0x00007f25b997c7e2 in showNotification (icon=..., text=..., caption=..., this=0x7c1d690) at /home/goulou/digikam/digikam-sc/core/libs/widgets/common/knotificationwrapper.cpp:62
#8  Digikam::KNotificationWrapper (eventId=..., message=..., parent=0x0, windowTitle=..., pixmap=<optimized out>) at /home/goulou/digikam/digikam-sc/core/libs/widgets/common/knotificationwrapper.cpp:101
#9  0x000000000051d0c9 in Digikam::MaintenanceTool::slotDone (this=0x3d64a70) at /home/goulou/digikam/digikam-sc/core/utilities/maintenance/maintenancetool.cpp:87
#10 0x00000038ac191f16 in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4
#11 0x00000038aebc9994 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#12 0x00000038aebce813 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#13 0x00000038b3050766 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#14 0x00000038ac17904c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#15 0x00000038ac17cada in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQtCore.so.4
#16 0x00000038ac1a7933 in ?? () from /usr/lib64/libQtCore.so.4
#17 0x000000389d444acd in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#18 0x000000389d4452c8 in ?? () from /lib64/libglib-2.0.so.0
#19 0x000000389d44549c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#20 0x00000038ac1a7d5f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#21 0x00000038aec6c66e in ?? () from /usr/lib64/libQtGui.so.4
#22 0x00000038ac178182 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#23 0x00000038ac1783d7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#24 0x00000038ac17cdd5 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#25 0x000000000048d7ab in main (argc=5, argv=<optimized out>) at /home/goulou/digikam/digikam-sc/core/digikam/main/main.cpp:232

Reported using DrKonqi
Comment 1 caulier.gilles 2012-02-26 21:49:52 UTC
Gnome or KDE desktop ?

It crash in Qt4... There is a packaging problem on your computer ?

Gilles Caulier
Comment 2 Frederic Grelot 2012-02-27 17:43:19 UTC
Sorry, the automatic bug report tool did not include all the usual stuff :
-OS : fedora 16 (fully updated)
-Desktop : Gnome 3
-digikam : built from source (latest git as of yesterday evening)

As You suggest, I'm actually not sure this bug is relative to digikam, and I don't use many other Qt-based software, so I can't say for the others.
Comment 3 Marcel Wiesweg 2012-03-01 21:20:43 UTC
Git commit cd6c2eb59770eb3f1379ece36fabddb5aef13620 by Marcel Wiesweg.
Committed on 01/03/2012 at 22:17.
Pushed by mwiesweg into branch 'master'.

Do not crash if null parent is given to notification wrapper

This can happen at startup. We could use the desktop window then, but I believe
putting a notifier just somewhere is more wrong than right, better skip it then.

M  +2    -1    NEWS
M  +4    -0    libs/widgets/common/knotificationwrapper.cpp

http://commits.kde.org/digikam/cd6c2eb59770eb3f1379ece36fabddb5aef13620