Bug 345358 - digiKam crash when vkontakte plugin failed to upload images
Summary: digiKam crash when vkontakte plugin failed to upload images
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Vkontakte (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2015-03-20 12:34 UTC by Vaso
Modified: 2020-05-25 02:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vaso 2015-03-20 12:34:35 UTC
Application: digikam (4.8.0)
KDE Platform Version: 4.14.4
Qt Version: 4.8.6
Operating System: Linux 3.18.9-200.fc21.x86_64 x86_64
Distribution (Platform): Fedora RPMs

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

Start uploading images to vkonakte.
Get error messages about wrong album id.
Get digiKam crashed.

-- Backtrace:
Application: digiKam (digikam), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
81	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7f1b12341b00 (LWP 27654))]

Thread 6 (Thread 0x7f1ae2a94700 (LWP 27655)):
#0  0x00007f1b0692dc8d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f1afc40958c in linux_udev_event_thread_main () from /lib64/libusb-1.0.so.0
#2  0x00007f1b073a052a in start_thread (arg=0x7f1ae2a94700) at pthread_create.c:310
#3  0x00007f1b0693922d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7f1ad836f700 (LWP 27656)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f1b07631906 in wait (time=18446744073709551615, this=0xf6f6f0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0xe2d4a0, mutex=mutex@entry=0xe2d498, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00000000005e92a1 in Digikam::ScanController::run (this=0xe2d210) at /usr/src/debug/digikam-4.8.0/core/app/database/scancontroller.cpp:725
#4  0x00007f1b076313af in QThreadPrivate::start (arg=0xe2d210) at thread/qthread_unix.cpp:349
#5  0x00007f1b073a052a in start_thread (arg=0x7f1ad836f700) at pthread_create.c:310
#6  0x00007f1b0693922d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f1ad7b6e700 (LWP 27657)):
#0  0x00007ffd711fd8d1 in clock_gettime ()
#1  0x00007f1b069474ad in __GI___clock_gettime (clock_id=<optimized out>, tp=<optimized out>) at ../sysdeps/unix/clock_gettime.c:115
#2  0x00007f1b07688585 in do_gettime (frac=<synthetic pointer>, sec=<synthetic pointer>) at tools/qelapsedtimer_unix.cpp:127
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:144
#4  0x00007f1b0776b2d5 in updateCurrentTime (this=0x7f1ac8002ee0) at kernel/qeventdispatcher_unix.cpp:354
#5  QTimerInfoList::timerWait (this=0x7f1ac8002ee0, tm=...) at kernel/qeventdispatcher_unix.cpp:460
#6  0x00007f1b07769b7c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7f1ad7b6d8b4) at kernel/qeventdispatcher_glib.cpp:143
#7  0x00007f1b07769c45 in timerSourcePrepare (source=<optimized out>, timeout=timeout@entry=0x7f1ad7b6d8b4) at kernel/qeventdispatcher_glib.cpp:176
#8  0x00007f1b02a6c0fd in g_main_context_prepare (context=context@entry=0x7f1ac80009c0, priority=priority@entry=0x7f1ad7b6d940) at gmain.c:3399
#9  0x00007f1b02a6ca5b in g_main_context_iterate (context=context@entry=0x7f1ac80009c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3761
#10 0x00007f1b02a6cc4c in g_main_context_iteration (context=0x7f1ac80009c0, may_block=1) at gmain.c:3842
#11 0x00007f1b0776a4be in QEventDispatcherGlib::processEvents (this=0x7f1ac80008e0, flags=...) at kernel/qeventdispatcher_glib.cpp:452
#12 0x00007f1b07739cc1 in QEventLoop::processEvents (this=this@entry=0x7f1ad7b6da80, flags=...) at kernel/qeventloop.cpp:149
#13 0x00007f1b0773a025 in QEventLoop::exec (this=this@entry=0x7f1ad7b6da80, flags=...) at kernel/qeventloop.cpp:204
#14 0x00007f1b0762eb49 in QThread::exec (this=this@entry=0xf71b20) at thread/qthread.cpp:538
#15 0x00007f1b0771a623 in QInotifyFileSystemWatcherEngine::run (this=0xf71b20) at io/qfilesystemwatcher_inotify.cpp:265
#16 0x00007f1b076313af in QThreadPrivate::start (arg=0xf71b20) at thread/qthread_unix.cpp:349
#17 0x00007f1b073a052a in start_thread (arg=0x7f1ad7b6e700) at pthread_create.c:310
#18 0x00007f1b0693922d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f1ad736d700 (LWP 27659)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f1b07631906 in wait (time=18446744073709551615, this=0x122a3e0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x120b140, mutex=mutex@entry=0x120b138, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f1b0f9acc79 in Digikam::ParkingThread::run (this=0x120b120) at /usr/src/debug/digikam-4.8.0/core/libs/threads/threadmanager.cpp:119
#4  0x00007f1b076313af in QThreadPrivate::start (arg=0x120b120) at thread/qthread_unix.cpp:349
#5  0x00007f1b073a052a in start_thread (arg=0x7f1ad736d700) at pthread_create.c:310
#6  0x00007f1b0693922d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f1a3b4d7700 (LWP 27714)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f1b07631906 in wait (time=18446744073709551615, this=0x41921f0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x419dff0, mutex=mutex@entry=0x419dfe8, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f1ab813c6ac in KIPIPlugins::KPRawThumbThread::run (this=0x4194810) at /usr/src/debug/digikam-4.8.0/extra/kipi-plugins/common/libkipiplugins/tools/kprawthumbthread.cpp:108
#4  0x00007f1b076313af in QThreadPrivate::start (arg=0x4194810) at thread/qthread_unix.cpp:349
#5  0x00007f1b073a052a in start_thread (arg=0x7f1a3b4d7700) at pthread_create.c:310
#6  0x00007f1b0693922d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f1b12341b00 (LWP 27654)):
[KCrash Handler]
#6  QMutex::lock (this=this@entry=0x88) at thread/qmutex.cpp:150
#7  0x00007f1b0773ea79 in QCoreApplication::postEvent (receiver=receiver@entry=0x41cf860, event=0x42a57c0, priority=priority@entry=0) at kernel/qcoreapplication.cpp:1358
#8  0x00007f1b0773ed57 in QCoreApplication::postEvent (receiver=receiver@entry=0x41cf860, event=<optimized out>) at kernel/qcoreapplication.cpp:1311
#9  0x00007f1b0774d2a4 in QObject::deleteLater (this=this@entry=0x41cf860) at kernel/qobject.cpp:2115
#10 0x00007f1b07be0bc9 in KJob::emitResult (this=this@entry=0x41cf860) at /usr/src/debug/kdelibs-4.14.4/kdecore/jobs/kjob.cpp:321
#11 0x00007f1a426e2450 in Vkontakte::UploadPhotosJob::saveJobFinished (this=0x41cf860, kjob=<optimized out>) at /usr/src/debug/digikam-4.8.0/extra/libkvkontakte/libkvkontakte/uploadphotosjob.cpp:201
#12 0x00007f1b0774fcdc in QMetaObject::activate (sender=sender@entry=0x3b28b40, m=m@entry=0x7f1b07f80ee0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffd711dd090) at kernel/qobject.cpp:3567
#13 0x00007f1b07be0b62 in KJob::result (this=this@entry=0x3b28b40, _t1=_t1@entry=0x3b28b40) at /usr/src/debug/kdelibs-4.14.4/x86_64-redhat-linux-gnu/kdecore/kjob.moc:207
#14 0x00007f1b07be0bb0 in KJob::emitResult (this=this@entry=0x3b28b40) at /usr/src/debug/kdelibs-4.14.4/kdecore/jobs/kjob.cpp:318
#15 0x00007f1a426e7a4d in Vkontakte::VkontakteJob::jobFinished (this=0x3b28b40, kjob=<optimized out>) at /usr/src/debug/digikam-4.8.0/extra/libkvkontakte/libkvkontakte/vkontaktejobs.cpp:139
#16 0x00007f1b0774fcdc in QMetaObject::activate (sender=sender@entry=0x42d4ad0, m=m@entry=0x7f1b07f80ee0 <KJob::staticMetaObject>, local_signal_index=local_signal_index@entry=3, argv=argv@entry=0x7ffd711dd480) at kernel/qobject.cpp:3567
#17 0x00007f1b07be0b62 in KJob::result (this=this@entry=0x42d4ad0, _t1=_t1@entry=0x42d4ad0) at /usr/src/debug/kdelibs-4.14.4/x86_64-redhat-linux-gnu/kdecore/kjob.moc:207
#18 0x00007f1b07be0bb0 in KJob::emitResult (this=this@entry=0x42d4ad0) at /usr/src/debug/kdelibs-4.14.4/kdecore/jobs/kjob.cpp:318
#19 0x00007f1b09e8db9b in KIO::SimpleJob::slotFinished (this=this@entry=0x42d4ad0) at /usr/src/debug/kdelibs-4.14.4/kio/kio/job.cpp:496
#20 0x00007f1b09e8efc1 in KIO::TransferJob::slotFinished (this=0x42d4ad0) at /usr/src/debug/kdelibs-4.14.4/kio/kio/job.cpp:1110
#21 0x00007f1b0774fcdc in QMetaObject::activate (sender=sender@entry=0x41542c0, m=m@entry=0x7f1b0a252b00 <KIO::SlaveInterface::staticMetaObject>, local_signal_index=local_signal_index@entry=4, argv=argv@entry=0x0) at kernel/qobject.cpp:3567
#22 0x00007f1b09f37383 in KIO::SlaveInterface::finished (this=this@entry=0x41542c0) at /usr/src/debug/kdelibs-4.14.4/x86_64-redhat-linux-gnu/kio/slaveinterface.moc:184
#23 0x00007f1b09f393c8 in KIO::SlaveInterface::dispatch (this=0x41542c0, _cmd=104, rawdata=...) at /usr/src/debug/kdelibs-4.14.4/kio/kio/slaveinterface.cpp:176
#24 0x00007f1b09f3632d in KIO::SlaveInterface::dispatch (this=0x41542c0) at /usr/src/debug/kdelibs-4.14.4/kio/kio/slaveinterface.cpp:92
#25 0x00007f1b09f28e8e in KIO::Slave::gotInput (this=0x41542c0) at /usr/src/debug/kdelibs-4.14.4/kio/kio/slave.cpp:344
#26 0x00007f1b0774fcdc in QMetaObject::activate (sender=0x414ff70, m=m@entry=0x7f1b0a24c860 <KIO::Connection::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x0) at kernel/qobject.cpp:3567
#27 0x00007f1b09e53e70 in KIO::Connection::readyRead (this=<optimized out>) at /usr/src/debug/kdelibs-4.14.4/x86_64-redhat-linux-gnu/kio/connection.moc:105
#28 0x00007f1b09e543d1 in KIO::ConnectionPrivate::dequeue (this=0x4118630) at /usr/src/debug/kdelibs-4.14.4/kio/kio/connection.cpp:82
#29 0x00007f1b077543d1 in QObject::event (this=0x414ff70, e=<optimized out>) at kernel/qobject.cpp:1222
#30 0x00007f1b083e1efc in QApplicationPrivate::notify_helper (this=this@entry=0xda81c0, receiver=receiver@entry=0x414ff70, e=e@entry=0x429efa0) at kernel/qapplication.cpp:4565
#31 0x00007f1b083e8958 in QApplication::notify (this=this@entry=0x7ffd711de5f0, receiver=receiver@entry=0x414ff70, e=e@entry=0x429efa0) at kernel/qapplication.cpp:4351
#32 0x00007f1b093ae86a in KApplication::notify (this=0x7ffd711de5f0, receiver=0x414ff70, event=0x429efa0) at /usr/src/debug/kdelibs-4.14.4/kdeui/kernel/kapplication.cpp:311
#33 0x00007f1b0773b16d in QCoreApplication::notifyInternal (this=0x7ffd711de5f0, receiver=receiver@entry=0x414ff70, event=event@entry=0x429efa0) at kernel/qcoreapplication.cpp:953
#34 0x00007f1b0773e431 in sendEvent (event=0x429efa0, receiver=0x414ff70) at kernel/qcoreapplication.h:231
#35 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0xce5b00) at kernel/qcoreapplication.cpp:1577
#36 0x00007f1b0773e8c3 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#37 0x00007f1b0776a32e in sendPostedEvents () at kernel/qcoreapplication.h:236
#38 postEventSourceDispatch (s=0xda9c30) at kernel/qeventdispatcher_glib.cpp:300
#39 0x00007f1b02a6c7fb in g_main_dispatch (context=0xda83f0) at gmain.c:3111
#40 g_main_context_dispatch (context=context@entry=0xda83f0) at gmain.c:3710
#41 0x00007f1b02a6cb98 in g_main_context_iterate (context=context@entry=0xda83f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3781
#42 0x00007f1b02a6cc4c in g_main_context_iteration (context=0xda83f0, may_block=1) at gmain.c:3842
#43 0x00007f1b0776a49e in QEventDispatcherGlib::processEvents (this=0xdaa030, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#44 0x00007f1b08485176 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:207
#45 0x00007f1b07739cc1 in QEventLoop::processEvents (this=this@entry=0x7ffd711de0e0, flags=...) at kernel/qeventloop.cpp:149
#46 0x00007f1b0773a025 in QEventLoop::exec (this=this@entry=0x7ffd711de0e0, flags=...) at kernel/qeventloop.cpp:204
#47 0x00007f1b0773f709 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#48 0x00007f1b083e039c in QApplication::exec () at kernel/qapplication.cpp:3823
#49 0x00000000004966c6 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/digikam-4.8.0/core/app/main/main.cpp:237

Possible duplicates by query: bug 225190, bug 225111, bug 224804, bug 224631, bug 224505.

Reported using DrKonqi
Comment 1 Alexander Potashev 2015-03-23 11:37:20 UTC
(In reply to fuckel from comment #0)
> Get error messages about wrong album id.

Please tell me what the error message looked like exactly. Did it appear as a dialog box?
Comment 2 Vaso 2015-03-23 12:12:59 UTC
Yes, it is a dialog box with text:
"The VKontakte server returned an error of type 114 in reply to method photos.save: Invalid album id"
Comment 3 Alexander Potashev 2015-03-26 07:20:22 UTC
I can reproduce the crash when I try to upload more than one image at once. I'll investigate.
Comment 4 caulier.gilles 2015-05-10 09:17:20 UTC
Alexander,

What's news about you investigations ?

Gilles Caulier
Comment 5 Alexander Potashev 2015-05-10 22:01:32 UTC
Git commit 631f6bb19c9045ab9ef0d4c1a83d6b700cf7138f by Alexander Potashev.
Committed on 10/05/2015 at 22:31.
Pushed by aspotashev into branch 'master'.

Do not emitResult multiple times

May lead to a crash if the caller is not ready for that.

Also moved m_jobs.removeAll(job) closed to ends of methods to avoid the
situation when m_jobs is empty but there is something left to do.

M  +32   -14   libkvkontakte/uploadphotosjob.cpp

http://commits.kde.org/libkvkontakte/631f6bb19c9045ab9ef0d4c1a83d6b700cf7138f
Comment 6 Alexander Potashev 2015-05-10 22:29:21 UTC
(In reply to fuckel from comment #2)
> Yes, it is a dialog box with text:
> "The VKontakte server returned an error of type 114 in reply to method
> photos.save: Invalid album id"

Wait a minute... I fixed only the crash when image upload fails.

The original problem was in the "Invalid album id" error message. It's an error code described here: https://vk.com/pages?oid=-1&p=photos.save , but I never got this error and I don't know how you could get it.

Please enable debugging output for "kipiplugins" via kdebugdialog, run digiKam in command line and tell us what album ID is being sent to the server (look for "aid" in `Vkontakte::VkontakteJob::start: Starting request KUrl("https://api.vkontakte.ru/method/photos.save?aid=xxxxxxxxx&[...]")` or whatever API method fails).
Comment 7 Alexander Potashev 2015-05-26 08:34:07 UTC
Git commit 1b1a8d4b2c7a4ba8cd1fdadb11c79bfcd81029d2 by Alexander Potashev.
Committed on 26/05/2015 at 09:14.
Pushed by aspotashev into branch 'master'.

vkontakte: Block UI during album deletion

If we don't block UI before starting the album deletion job, the user
may click the Delete button again and end up with two album deletion
jobs for the same album. This will result in error "Invalid album id"
when trying to delete the album the second time.

M  +1    -0    vkontakte/albumchooserwidget.cpp

http://commits.kde.org/kipi-plugins/1b1a8d4b2c7a4ba8cd1fdadb11c79bfcd81029d2
Comment 8 Alexander Potashev 2015-05-26 08:36:06 UTC
Git commit 62cdaa177cc1e4d27e0dbe27e5b10cce8d99ad0c by Alexander Potashev.
Committed on 26/05/2015 at 09:22.
Pushed by aspotashev into branch 'frameworks'.

Merge commit 1b1a8d4b2c7a4ba8cd1fdadb11c79bfcd81029d2 from master to frameworks

vkontakte: Block UI during album deletion

If we don't block UI before starting the album deletion job, the user
may click the Delete button again and end up with two album deletion
jobs for the same album. This will result in error "Invalid album id"
when trying to delete the album the second time.

M  +1    -0    PORT.KF5/FACTORIZE/vkontakte/albumchooserwidget.cpp

http://commits.kde.org/kipi-plugins/62cdaa177cc1e4d27e0dbe27e5b10cce8d99ad0c