Bug 284667 - Crash occurs when closing
Summary: Crash occurs when closing
Status: RESOLVED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-22 07:00 UTC by Mark Rooks
Modified: 2012-02-21 19:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Rooks 2011-10-22 07:00:50 UTC
Application: kphotoalbum (4.1.1)
KDE Platform Version: 4.6.5 (4.6.5)
Qt Version: 4.7.4
Operating System: Linux 2.6.40.6-0.fc15.i686.PAE i686
Distribution: "Fedora release 15 (Lovelock)"

-- Information about the crash:
Opened the app, fresh rpm based install
App spent some time scanning the root folder I defined
I waited for 20 minutes until the app had finished scanning
I then closed the app, and the crash occurred

The crash can be reproduced some of the time.

-- Backtrace:
Application: KPhotoAlbum (kphotoalbum), signal: Aborted
[Current thread is 1 (Thread 0xb6498b40 (LWP 29441))]

Thread 3 (Thread 0xb3fe9b70 (LWP 6660)):
#0  0x0052b424 in __kernel_vsyscall ()
#1  0x004e714c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:172
#2  0x02a18618 in wait (time=4294967295, this=0xa0387f0) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xa03e454, mutex=0xa03e458, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0x0812851c in ImageManager::Manager::next (this=0xa03e438) at /usr/src/debug/kphotoalbum-4.1.1/ImageManager/Manager.cpp:142
#5  0x081279e8 in ImageManager::ImageLoader::run (this=0x9fadb78) at /usr/src/debug/kphotoalbum-4.1.1/ImageManager/ImageLoader.cpp:61
#6  0x02a18104 in QThreadPrivate::start (arg=0x9fadb78) at thread/qthread_unix.cpp:331
#7  0x004e3a2e in start_thread (arg=0xb3fe9b70) at pthread_create.c:305
#8  0x041bf34e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:133

Thread 2 (Thread 0xb37e8b70 (LWP 6661)):
#0  0x0052b424 in __kernel_vsyscall ()
#1  0x004e714c in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:172
#2  0x02a18618 in wait (time=4294967295, this=0xa0387f0) at thread/qwaitcondition_unix.cpp:88
#3  QWaitCondition::wait (this=0xa03e454, mutex=0xa03e458, time=4294967295) at thread/qwaitcondition_unix.cpp:160
#4  0x0812851c in ImageManager::Manager::next (this=0xa03e438) at /usr/src/debug/kphotoalbum-4.1.1/ImageManager/Manager.cpp:142
#5  0x081279e8 in ImageManager::ImageLoader::run (this=0xa0057a8) at /usr/src/debug/kphotoalbum-4.1.1/ImageManager/ImageLoader.cpp:61
#6  0x02a18104 in QThreadPrivate::start (arg=0xa0057a8) at thread/qthread_unix.cpp:331
#7  0x004e3a2e in start_thread (arg=0xb37e8b70) at pthread_create.c:305
#8  0x041bf34e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:133

Thread 1 (Thread 0xb6498b40 (LWP 29441)):
[KCrash Handler]
#7  0x0052b424 in __kernel_vsyscall ()
#8  0x0411326f in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#9  0x04114ba5 in __GI_abort () at abort.c:93
#10 0x02a0df12 in qt_message_output (msgType=QtFatalMsg, buf=0xa17baa8 "ImageDB::instance must not be called before ImageDB::setup") at global/qglobal.cpp:2291
#11 0x02a0e10d in qt_message (msgType=QtFatalMsg, msg=0x81fb108 "ImageDB::instance must not be called before ImageDB::setup", ap=0xbfeb8664 "\260\301\032\n$") at global/qglobal.cpp:2337
#12 0x02a0e229 in qFatal (msg=0x81fb108 "ImageDB::instance must not be called before ImageDB::setup") at global/qglobal.cpp:2520
#13 0x081442d4 in DB::ImageDB::instance () at /usr/src/debug/kphotoalbum-4.1.1/DB/ImageDB.cpp:44
#14 0x08147b4b in DB::NewImageFinder::loadExtraFile (this=0xbfeb882c, relativeNewFileName=..., type=0) at /usr/src/debug/kphotoalbum-4.1.1/DB/NewImageFinder.cpp:196
#15 0x0814960d in DB::NewImageFinder::loadExtraFiles (this=0xbfeb882c) at /usr/src/debug/kphotoalbum-4.1.1/DB/NewImageFinder.cpp:182
#16 0x081498f0 in DB::NewImageFinder::findImages (this=0xbfeb882c) at /usr/src/debug/kphotoalbum-4.1.1/DB/NewImageFinder.cpp:63
#17 0x08144716 in DB::ImageDB::slotRescan (this=0x8f39db8) at /usr/src/debug/kphotoalbum-4.1.1/DB/ImageDB.cpp:108
#18 0x08144f1c in DB::ImageDB::qt_metacall (this=0x8f39db8, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0xbfeb8944) at /usr/src/debug/kphotoalbum-4.1.1/i686-redhat-linux-gnu/ImageDB.moc:97
#19 0x080adc24 in XMLDB::Database::qt_metacall (this=0x8f39db8, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0xbfeb8944) at /usr/src/debug/kphotoalbum-4.1.1/i686-redhat-linux-gnu/Database.moc:74
#20 0x02b1ab9e in metacall (argv=0xbfeb8944, idx=9, cl=QMetaObject::InvokeMetaMethod, object=0x8f39db8) at kernel/qmetaobject.cpp:237
#21 QMetaObject::metacall (object=0x8f39db8, cl=QMetaObject::InvokeMetaMethod, idx=9, argv=0xbfeb8944) at kernel/qmetaobject.cpp:232
#22 0x02b28b2a in QMetaObject::activate (sender=0x8e86560, m=0x2c497b8, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3278
#23 0x02b78cd6 in QTimer::timeout (this=0x8e86560) at .moc/release-shared/moc_qtimer.cpp:134
#24 0x02b31346 in QTimer::timerEvent (this=0x8e86560, e=0xbfeb8e4c) at kernel/qtimer.cpp:271
#25 0x02b2c7c4 in QObject::event (this=0x8e86560, e=0xbfeb8e4c) at kernel/qobject.cpp:1181
#26 0x0661bbb4 in notify_helper (e=0xbfeb8e4c, receiver=0x8e86560, this=0x8dac538) at kernel/qapplication.cpp:4481
#27 QApplicationPrivate::notify_helper (this=0x8dac538, receiver=0x8e86560, e=0xbfeb8e4c) at kernel/qapplication.cpp:4453
#28 0x06620ff3 in QApplication::notify (this=0xbfeb8e4c, receiver=0x8e86560, e=0xbfeb8e4c) at kernel/qapplication.cpp:4228
#29 0x011048c2 in KApplication::notify (this=0xbfeb916c, receiver=0x8e86560, event=0xbfeb8e4c) at /usr/src/debug/kdelibs-4.6.5/kdeui/kernel/kapplication.cpp:311
#30 0x02b143be in QCoreApplication::notifyInternal (this=0xbfeb916c, receiver=0x8e86560, event=0xbfeb8e4c) at kernel/qcoreapplication.cpp:787
#31 0x02b44bf0 in sendEvent (event=0xbfeb8e4c, receiver=<optimized out>) at kernel/qcoreapplication.h:215
#32 QTimerInfoList::activateTimers (this=0x8dadf7c) at kernel/qeventdispatcher_unix.cpp:603
#33 0x02b420e3 in timerSourceDispatch (source=0x8dadf48) at kernel/qeventdispatcher_glib.cpp:184
#34 0x075755bf in g_main_dispatch (context=0x8dad860) at gmain.c:2441
#35 g_main_context_dispatch (context=0x8dad860) at gmain.c:3014
#36 0x07575d30 in g_main_context_iterate (context=0x8dad860, block=123226752, dispatch=1, self=0x8db4570) at gmain.c:3092
#37 0x0757606f in g_main_context_iteration (context=0x8dad860, may_block=1) at gmain.c:3155
#38 0x02b42ab8 in QEventDispatcherGlib::processEvents (this=0x8d7d150, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#39 0x066d06eb in QGuiEventDispatcherGlib::processEvents (this=0x8d7d150, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#40 0x02b136fe in QEventLoop::processEvents (this=0xbfeb90c4, flags=...) at kernel/qeventloop.cpp:149
#41 0x02b13951 in QEventLoop::exec (this=0xbfeb90c4, flags=...) at kernel/qeventloop.cpp:201
#42 0x02b180bb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#43 0x06619995 in QApplication::exec () at kernel/qapplication.cpp:3755
#44 0x08076478 in main (argc=) at /usr/src/debug/kphotoalbum-4.1.1/main.cpp:86

Reported using DrKonqi
Comment 1 Miika Turkia 2012-01-29 15:59:18 UTC
Looks like this bug can be triggered by closing the main window while scanning for new images (e.g. clicking the close icon on the corner of the window). Apparently the NewImageFinder is not notified that KPA is closing and thus it tries to keep running.

Accidental occurrence of this bug as described in bug report has been fixed in the past (closing the KPA after the new image finder has finished). But let's keep the bug open until it is fully fixed.
Comment 2 Miika Turkia 2012-02-21 19:57:26 UTC
Git commit f0028c57737beb98995c571093c9f0d79100be0d by Miika Turkia.
Committed on 21/02/2012 at 20:54.
Pushed by mturkia into branch 'master'.

Calling exit instead of qFatal when instance==0

If new image finder is running on background and e.g. main window is
closed the instance is destroyed while new image finder is still
running. In this case we just quit.

M  +1    -1    DB/ImageDB.cpp

http://commits.kde.org/kphotoalbum/f0028c57737beb98995c571093c9f0d79100be0d