Bug 335927 - Crash on import from camera (acting as mass storage)
Summary: Crash on import from camera (acting as mass storage)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Import-UMS (show other bugs)
Version: 4.0.0
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-06-07 20:55 UTC by pbhj
Modified: 2017-08-15 22:00 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pbhj 2014-06-07 20:55:00 UTC
Application: digikam (4.0.0)
KDE Platform Version: 4.13.0
Qt Version: 4.8.6
Operating System: Linux 3.13.0-24-generic x86_64
Distribution: Ubuntu 14.04 LTS

-- Information about the crash:
- What I was doing when the application crashed: I drag selected the majority of images on the camera, 64 out of 68, then chose the "download and delete selected" option for the import. On making that menu selection the application crashed immediately. It has done this before in the same circumstances.

The crash can be reproduced sometimes.

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f486f24bac0 (LWP 2581))]

Thread 7 (Thread 0x7f484ab7d700 (LWP 2585)):
#0  0x00007f486839ffbd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f484f728248 in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#2  0x00007f48643d3182 in start_thread (arg=0x7f484ab7d700) at pthread_create.c:312
#3  0x00007f48683ad30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 6 (Thread 0x7f4843fcb700 (LWP 2586)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f486918e816 in wait (time=18446744073709551615, this=0x1838970) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x1802350, mutex=mutex@entry=0x1802348, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000000005e3d9e in Digikam::ScanController::run (this=0x1908330) at /build/buildd/digikam-4.0.0/core/digikam/database/scancontroller.cpp:725
#4  0x00007f486918e32f in QThreadPrivate::start (arg=0x1908330) at thread/qthread_unix.cpp:349
#5  0x00007f48643d3182 in start_thread (arg=0x7f4843fcb700) at pthread_create.c:312
#6  0x00007f48683ad30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 5 (Thread 0x7f48437ca700 (LWP 2587)):
#0  0x00007fffd13fea1f in ?? ()
#1  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7f4842fc9700 (LWP 2589)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f486918e816 in wait (time=18446744073709551615, this=0x2a99060) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x1b6ea80, mutex=mutex@entry=0x1b6ea78, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f486c8d18aa in Digikam::ParkingThread::run (this=0x1b6ea60) at /build/buildd/digikam-4.0.0/core/libs/threads/threadmanager.cpp:119
#4  0x00007f486918e32f in QThreadPrivate::start (arg=0x1b6ea60) at thread/qthread_unix.cpp:349
#5  0x00007f48643d3182 in start_thread (arg=0x7f4842fc9700) at pthread_create.c:312
#6  0x00007f48683ad30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 3 (Thread 0x7f4841ce4700 (LWP 2590)):
#0  0x00007f486132762d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f48613279b9 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f48612e5a20 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f48612e5f7b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f48612e60ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f48692bd7be in QEventDispatcherGlib::processEvents (this=0x7f482c0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#6  0x00007f486928f0af in QEventLoop::processEvents (this=this@entry=0x7f4841ce3ae0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f486928f3a5 in QEventLoop::exec (this=this@entry=0x7f4841ce3ae0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f486918bc5f in QThread::exec (this=this@entry=0x2c6f060) at thread/qthread.cpp:537
#9  0x00007f4869270823 in QInotifyFileSystemWatcherEngine::run (this=0x2c6f060) at io/qfilesystemwatcher_inotify.cpp:265
#10 0x00007f486918e32f in QThreadPrivate::start (arg=0x2c6f060) at thread/qthread_unix.cpp:349
#11 0x00007f48643d3182 in start_thread (arg=0x7f4841ce4700) at pthread_create.c:312
#12 0x00007f48683ad30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f47e05b8700 (LWP 2636)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f486918e816 in wait (time=18446744073709551615, this=0x6afb2c0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x6ab0908, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000000007e585c in Digikam::CameraController::run (this=0x6afb0d0) at /build/buildd/digikam-4.0.0/core/utilities/importui/backend/cameracontroller.cpp:400
#4  0x00007f486918e32f in QThreadPrivate::start (arg=0x6afb0d0) at thread/qthread_unix.cpp:349
#5  0x00007f48643d3182 in start_thread (arg=0x7f47e05b8700) at pthread_create.c:312
#6  0x00007f48683ad30d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f486f24bac0 (LWP 2581)):
[KCrash Handler]
#6  Digikam::Album::globalID (this=0x0) at /build/buildd/digikam-4.0.0/core/digikam/album/album.cpp:227
#7  0x00000000007d3d43 in Digikam::ImportUI::slotDownload (this=0x60ddb20, onlySelected=<optimized out>, deleteAfter=<optimized out>, album=0x0) at /build/buildd/digikam-4.0.0/core/utilities/importui/main/importui.cpp:1475
#8  0x00000000007d4cf9 in slotDownloadAndDeleteSelected (this=<optimized out>) at /build/buildd/digikam-4.0.0/core/utilities/importui/main/importui.cpp:1400
#9  Digikam::ImportUI::qt_static_metacall (_o=0x60ddb20, _c=78258040, _id=0, _a=0x10) at /build/buildd/digikam-4.0.0/obj-x86_64-linux-gnu/core/utilities/importui/importui.moc:202
#10 0x00007f48692a487a in QMetaObject::activate (sender=sender@entry=0x6b02ec0, m=m@entry=0x7f486a72cde0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffd13f7d80) at kernel/qobject.cpp:3539
#11 0x00007f4869c7ca62 in QAction::triggered (this=this@entry=0x6b02ec0, _t1=false) at .moc/release-shared/moc_qaction.cpp:276
#12 0x00007f4869c7e433 in QAction::activate (this=this@entry=0x6b02ec0, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#13 0x00007f486a0ac489 in QMenuPrivate::activateCausedStack (this=this@entry=0x6b2f0b0, causedStack=..., action=action@entry=0x6b02ec0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1038
#14 0x00007f486a0b09b9 in QMenuPrivate::activateAction (this=0x6b2f0b0, action=0x6b02ec0, action_e=action_e@entry=QAction::Trigger, self=self@entry=true) at widgets/qmenu.cpp:1130
#15 0x00007f486a0b4385 in QMenu::mouseReleaseEvent (this=this@entry=0x6b50b00, e=e@entry=0x7fffd13f84b0) at widgets/qmenu.cpp:2372
#16 0x00007f486aa444f5 in KMenu::mouseReleaseEvent (this=0x6b50b00, e=0x7fffd13f84b0) at ../../kdeui/widgets/kmenu.cpp:464
#17 0x00007f4869cd250a in QWidget::event (this=this@entry=0x6b50b00, event=event@entry=0x7fffd13f84b0) at kernel/qwidget.cpp:8376
#18 0x00007f486a0b47bb in QMenu::event (this=0x6b50b00, e=0x7fffd13f84b0) at widgets/qmenu.cpp:2481
#19 0x00007f4869c82e2c in QApplicationPrivate::notify_helper (this=this@entry=0x1711540, receiver=receiver@entry=0x6b50b00, e=e@entry=0x7fffd13f84b0) at kernel/qapplication.cpp:4567
#20 0x00007f4869c895dd in QApplication::notify (this=this@entry=0x7fffd13f90f0, receiver=receiver@entry=0x6b50b00, e=e@entry=0x7fffd13f84b0) at kernel/qapplication.cpp:4110
#21 0x00007f486a98dbaa in KApplication::notify (this=0x7fffd13f90f0, receiver=0x6b50b00, event=0x7fffd13f84b0) at ../../kdeui/kernel/kapplication.cpp:311
#22 0x00007f48692904dd in QCoreApplication::notifyInternal (this=0x7fffd13f90f0, receiver=receiver@entry=0x6b50b00, event=event@entry=0x7fffd13f84b0) at kernel/qcoreapplication.cpp:953
#23 0x00007f4869c88d93 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#24 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x6b50b00, event=event@entry=0x7fffd13f84b0, alienWidget=alienWidget@entry=0x0, nativeWidget=nativeWidget@entry=0x6b50b00, buttonDown=buttonDown@entry=0x7f486a768318 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#25 0x00007f4869cfdcfc in QETWidget::translateMouseEvent (this=this@entry=0x6b50b00, event=event@entry=0x7fffd13f8800) at kernel/qapplication_x11.cpp:4568
#26 0x00007f4869cfd269 in QApplication::x11ProcessEvent (this=0x7fffd13f90f0, event=event@entry=0x7fffd13f8800) at kernel/qapplication_x11.cpp:3627
#27 0x00007f4869d24b02 in x11EventSourceDispatch (s=0x170e400, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#28 0x00007f48612e5e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f48612e6048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f48612e60ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f48692bd7be in QEventDispatcherGlib::processEvents (this=0x1632020, flags=...) at kernel/qeventdispatcher_glib.cpp:436
#32 0x00007f4869d24bb6 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007f486928f0af in QEventLoop::processEvents (this=this@entry=0x7fffd13f8bd0, flags=...) at kernel/qeventloop.cpp:149
#34 0x00007f486928f3a5 in QEventLoop::exec (this=this@entry=0x7fffd13f8bd0, flags=...) at kernel/qeventloop.cpp:204
#35 0x00007f4869294b79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#36 0x00007f4869c8137c in QApplication::exec () at kernel/qapplication.cpp:3828
#37 0x00000000004948f0 in main (argc=<optimized out>, argv=<optimized out>) at /build/buildd/digikam-4.0.0/core/digikam/main/main.cpp:236

The reporter indicates this bug may be a duplicate of or related to bug 330676.

Possible duplicates by query: bug 335708.

Reported using DrKonqi
Comment 1 Jekyll Wu 2014-06-08 00:20:39 UTC

*** This bug has been marked as a duplicate of bug 330676 ***
Comment 2 caulier.gilles 2014-06-08 08:49:12 UTC
This crash is real due to a bug in code... I will fix it

Gilles Caulier
Comment 3 caulier.gilles 2014-06-08 08:49:26 UTC
Git commit b4843c2e3b70ea1a6e1559c2d76201e2f1894fb9 by Gilles Caulier.
Committed on 08/06/2014 at 08:38.
Pushed by cgilles into branch 'master'.

Check if current album selection is valid before to get first albumID, else this can crash application if selection is empty.
constify and polish coding style

M  +43   -41   utilities/importui/main/importui.cpp

http://commits.kde.org/digikam/b4843c2e3b70ea1a6e1559c2d76201e2f1894fb9
Comment 4 caulier.gilles 2014-09-12 11:47:45 UTC
*** Bug 338858 has been marked as a duplicate of this bug. ***