Bug 310163 - Digikam crashes on importing
Summary: Digikam crashes on importing
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-IconView (show other bugs)
Version: 3.0.0
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-15 18:07 UTC by András Manţia
Modified: 2022-01-26 11:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description András Manţia 2012-11-15 18:07:58 UTC
Application: digikam (3.0.0-rc)
KDE Platform Version: 4.9.80 (Compiled from sources)
Qt Version: 4.8.3
Operating System: Linux 3.4.11-2.16-desktop x86_64
Distribution: "openSUSE 12.2 (x86_64)"

-- Information about the crash:
Digikam crashes as soon as I try to import pictures from an USB card reader. Happens both if I select the import from the device plasmoid or from the Import menu.

The crash can be reproduced every time.

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

Thread 7 (Thread 0x7fa9c978f700 (LWP 30966)):
#0  0x00007fa9e7dd68f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fa9e80909b7 in QWaitConditionPrivate::wait (this=0x14db540, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:86
#2  0x00007fa9e8090761 in QWaitCondition::wait (this=0x14c9900, mutex=0x14c98f8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000000005d4078 in Digikam::ScanController::run (this=0x136cda0) at /encrypted/home/andris/development/sources/kde-trunk/extragear/graphics/digikam/digikam/database/scancontroller.cpp:698
#4  0x00007fa9e808f362 in QThreadPrivate::start (arg=0x136cda0) at thread/qthread_unix.cpp:338
#5  0x00007fa9e6032734 in ?? () from /usr/X11R6/lib64/libGL.so.1
#6  0x00007fa9e7dd2e0e in start_thread () from /lib64/libpthread.so.0
#7  0x00007fa9e6b322bd in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fa9c8f8e700 (LWP 30967)):
#0  0x00007fa9e6b2a13f in poll () from /lib64/libc.so.6
#1  0x00007fa9dfbe5684 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fa9dfbe57a4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fa9e8208776 in QEventDispatcherGlib::processEvents (this=0x7fa9bc0008f0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007fa9e81c8d24 in QEventLoop::processEvents (this=0x7fa9c8f8db40, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fa9e81c8eb8 in QEventLoop::exec (this=0x7fa9c8f8db40, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007fa9e808c8eb in QThread::exec (this=0x14c6540) at thread/qthread.cpp:501
#7  0x00007fa9e81a36fd in QInotifyFileSystemWatcherEngine::run (this=0x14c6540) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fa9e808f362 in QThreadPrivate::start (arg=0x14c6540) at thread/qthread_unix.cpp:338
#9  0x00007fa9e6032734 in ?? () from /usr/X11R6/lib64/libGL.so.1
#10 0x00007fa9e7dd2e0e in start_thread () from /lib64/libpthread.so.0
#11 0x00007fa9e6b322bd in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fa9c3fff700 (LWP 30969)):
#0  0x00007fa9e7dd68f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fa9e80909b7 in QWaitConditionPrivate::wait (this=0x144e0f0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:86
#2  0x00007fa9e8090761 in QWaitCondition::wait (this=0x15051f0, mutex=0x15051e8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fa9ed520989 in Digikam::ParkingThread::run (this=0x15051d0) at /encrypted/home/andris/development/sources/kde-trunk/extragear/graphics/digikam/libs/threads/threadmanager.cpp:119
#4  0x00007fa9e808f362 in QThreadPrivate::start (arg=0x15051d0) at thread/qthread_unix.cpp:338
#5  0x00007fa9e6032734 in ?? () from /usr/X11R6/lib64/libGL.so.1
#6  0x00007fa9e7dd2e0e in start_thread () from /lib64/libpthread.so.0
#7  0x00007fa9e6b322bd in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fa9c0129700 (LWP 30974)):
#0  0x00007fa9e7dd68f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fa9c2073ecf in ?? () from /usr/lib64/libvlccore.so.5
#2  0x00007fa9e6032734 in ?? () from /usr/X11R6/lib64/libGL.so.1
#3  0x00007fa9e7dd2e0e in start_thread () from /lib64/libpthread.so.0
#4  0x00007fa9e6b322bd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fa9b696c700 (LWP 30978)):
#0  0x00007fa9e7dd6c61 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fa9e809099b in QWaitConditionPrivate::wait (this=0x3f39a50, time=30000) at thread/qwaitcondition_unix.cpp:84
#2  0x00007fa9e8090761 in QWaitCondition::wait (this=0x3f39a00, mutex=0x3f399f8, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fa9e807e145 in QThreadPoolThread::run (this=0x36ff250) at concurrent/qthreadpool.cpp:141
#4  0x00007fa9e808f362 in QThreadPrivate::start (arg=0x36ff250) at thread/qthread_unix.cpp:338
#5  0x00007fa9e6032734 in ?? () from /usr/X11R6/lib64/libGL.so.1
#6  0x00007fa9e7dd2e0e in start_thread () from /lib64/libpthread.so.0
#7  0x00007fa9e6b322bd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fa9b5659700 (LWP 30991)):
#0  0x00007fa9e7dd68f4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fa9e80909b7 in QWaitConditionPrivate::wait (this=0x41e5c30, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:86
#2  0x00007fa9e8090761 in QWaitCondition::wait (this=0x41e5d20, mutex=0x41e5d18, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x0000000000778aaa in Digikam::CameraController::run (this=0x46edae0) at /encrypted/home/andris/development/sources/kde-trunk/extragear/graphics/digikam/utilities/importui/backend/cameracontroller.cpp:389
#4  0x00007fa9e808f362 in QThreadPrivate::start (arg=0x46edae0) at thread/qthread_unix.cpp:338
#5  0x00007fa9e6032734 in ?? () from /usr/X11R6/lib64/libGL.so.1
#6  0x00007fa9e7dd2e0e in start_thread () from /lib64/libpthread.so.0
#7  0x00007fa9e6b322bd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fa9cf84a8c0 (LWP 30964)):
[KCrash Handler]
#6  0x00007fa9e6a82d25 in raise () from /lib64/libc.so.6
#7  0x00007fa9e6a841a8 in abort () from /lib64/libc.so.6
#8  0x00007fa9e8081b43 in qt_message_output (msgType=QtFatalMsg, buf=0x552b438 "ASSERT: \"last >= first\" in file kernel/qabstractitemmodel.cpp, line 2413") at global/qglobal.cpp:2266
#9  0x00007fa9e8081cbf in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7fa9e8250a08 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fffec45bc08) at global/qglobal.cpp:2312
#10 0x00007fa9e8082489 in qFatal (msg=0x7fa9e8250a08 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2495
#11 0x00007fa9e80816fc in qt_assert (assertion=0x7fa9e82caf5b "last >= first", file=0x7fa9e82cacfe "kernel/qabstractitemmodel.cpp", line=2413) at global/qglobal.cpp:2013
#12 0x00007fa9e81bf514 in QAbstractItemModel::beginInsertRows (this=0x5320620, parent=..., first=0, last=-1) at kernel/qabstractitemmodel.cpp:2413
#13 0x000000000079bb39 in Digikam::ImportImageModel::publiciseInfos (this=0x5320620, infos=...) at /encrypted/home/andris/development/sources/kde-trunk/extragear/graphics/digikam/utilities/importui/models/importimagemodel.cpp:621
#14 0x00007fa9e81e3b97 in QMetaCallEvent::placeMetaCall (this=0x7fa9ac002b90, object=0x5320620) at kernel/qobject.cpp:525
#15 0x00007fa9e81e4e29 in QObject::event (this=0x5320620, e=0x7fa9ac002b90) at kernel/qobject.cpp:1195
#16 0x00007fa9e8fd504c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from //opt/qt4/lib/libQtGui.so.4
#17 0x00007fa9e8fd2548 in QApplication::notify(QObject*, QEvent*) () from //opt/qt4/lib/libQtGui.so.4
#18 0x00007fa9ea0999b6 in KApplication::notify (this=0x7fffec45d210, receiver=0x5320620, event=0x7fa9ac002b90) at /encrypted/home/andris/development/sources/kde-trunk/kdelibs/kdeui/kernel/kapplication.cpp:311
#19 0x00007fa9e81cb924 in QCoreApplication::notifyInternal (this=0x7fffec45d210, receiver=0x5320620, event=0x7fa9ac002b90) at kernel/qcoreapplication.cpp:915
#20 0x00007fa9f0349dad in QCoreApplication::sendEvent(QObject*, QEvent*) () from //opt/qt4/lib/libQt3Support.so.4
#21 0x00007fa9e81cc964 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1128030) at kernel/qcoreapplication.cpp:1539
#22 0x00007fa9e81cc581 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1432
#23 0x00007fa9f03e8863 in QCoreApplication::sendPostedEvents() () from //opt/qt4/lib/libQt3Support.so.4
#24 0x00007fa9e8207e9d in postEventSourceDispatch (s=0x11a37e0) at kernel/qeventdispatcher_glib.cpp:279
#25 0x00007fa9dfbe53b5 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#26 0x00007fa9dfbe56e8 in ?? () from /usr/lib64/libglib-2.0.so.0
#27 0x00007fa9dfbe57a4 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#28 0x00007fa9e8208753 in QEventDispatcherGlib::processEvents (this=0x112d8b0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#29 0x00007fa9e90b15e2 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from //opt/qt4/lib/libQtGui.so.4
#30 0x00007fa9e81c8d24 in QEventLoop::processEvents (this=0x7fffec45cbe0, flags=...) at kernel/qeventloop.cpp:149
#31 0x00007fa9e81c8eb8 in QEventLoop::exec (this=0x7fffec45cbe0, flags=...) at kernel/qeventloop.cpp:204
#32 0x00007fa9e81cbfba in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#33 0x00007fa9e8fd2132 in QApplication::exec() () from //opt/qt4/lib/libQtGui.so.4
#34 0x000000000049827b in main (argc=3, argv=0x7fffec45d448) at /encrypted/home/andris/development/sources/kde-trunk/extragear/graphics/digikam/digikam/main/main.cpp:234

Reported using DrKonqi
Comment 1 Marcel Wiesweg 2012-11-18 09:49:15 UTC
> #11 0x00007fa9e80816fc in qt_assert (assertion=0x7fa9e82caf5b "last >=
> first", file=0x7fa9e82cacfe "kernel/qabstractitemmodel.cpp", line=2413) at
> global/qglobal.cpp:2013
> #12 0x00007fa9e81bf514 in QAbstractItemModel::beginInsertRows
> (this=0x5320620, parent=..., first=0, last=-1) at
> kernel/qabstractitemmodel.cpp:2413 

This is something for Islam:
It can be seen that it is possible to have an empty list of newInfos, which 
causes an ASSERT if Qt is compiled so.
Comment 2 Marcel Wiesweg 2012-12-22 18:36:34 UTC
Git commit 2fa633dfe382d08cf008b66a832ad43d79caffe5 by Marcel Wiesweg.
Committed on 22/12/2012 at 19:34.
Pushed by mwiesweg into branch 'master'.

Dont crash trying to add an empty list:
Filtering for mimetype is not appropriate in the core of the model.
As this seems to be about filtering out invalid entries, move it to the Controller.

M  +6    -4    utilities/importui/backend/cameracontroller.cpp
M  +8    -22   utilities/importui/models/importimagemodel.cpp

http://commits.kde.org/digikam/2fa633dfe382d08cf008b66a832ad43d79caffe5
Comment 3 Islam Wazery 2013-01-14 20:14:46 UTC
Sorry guys because I am not replying to emails. I am now in a military
campaigns s that have very very limited internet access.

On 12/22/12, Marcel Wiesweg <marcel.wiesweg@gmx.de> wrote:
> https://bugs.kde.org/show_bug.cgi?id=310163
>
> Marcel Wiesweg <marcel.wiesweg@gmx.de> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|CONFIRMED                   |RESOLVED
>          Resolution|---                         |FIXED
>       Latest Commit|
> |http://commits.kde.org/digi
>                    |
> |kam/2fa633dfe382d08cf008b66
>                    |                            |a832ad43d79caffe5
>
> --- Comment #2 from Marcel Wiesweg <marcel.wiesweg@gmx.de> ---
> Git commit 2fa633dfe382d08cf008b66a832ad43d79caffe5 by Marcel Wiesweg.
> Committed on 22/12/2012 at 19:34.
> Pushed by mwiesweg into branch 'master'.
>
> Dont crash trying to add an empty list:
> Filtering for mimetype is not appropriate in the core of the model.
> As this seems to be about filtering out invalid entries, move it to the
> Controller.
>
> M  +6    -4    utilities/importui/backend/cameracontroller.cpp
> M  +8    -22   utilities/importui/models/importimagemodel.cpp
>
> http://commits.kde.org/digikam/2fa633dfe382d08cf008b66a832ad43d79caffe5
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel@kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>