Bug 334284

Summary: digikam crashes when attempting to stitch panorama
Product: [Applications] digikam Reporter: aa.ivanov
Component: Plugin-Generic-PanoramaAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: benjamin.girault, caulier.gilles, Info, mathieu
Priority: NOR Keywords: drkonqi
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 4.1.0
Attachments: kipi-panorama-tmp-*/* files
gdb session

Description aa.ivanov 2014-05-03 15:24:10 UTC
Application: digikam (3.5.0)
KDE Platform Version: 4.12.4
Qt Version: 4.8.5
Operating System: Linux 3.13.10-200.fc20.x86_64 x86_64
Distribution: "Fedora release 20 (Heisenbug)"

-- Information about the crash:
- What I was doing when the application crashed:
1. Downloaded images from sd card
2. Selected relevant images for panorama
3. Started the panorama wizard
4. Advanced to 4th step
5. Digikam crashed

Please note I've tried this with both JPEG and Nikon's NEF files. Tried switching the output format. Also tried toggling the "detect moving skies" on page 3. None of the options seem to have any effect - program crashes in all cases.

Please advise if/what further information might be needed.

The crash can be reproduced every time.

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

Thread 12 (Thread 0x7f14dc3c0700 (LWP 6249)):
#0  0x0000003a2560eccd in recvmsg () from /lib64/libpthread.so.0
#1  0x0000003895008ed9 in udev_monitor_receive_device () from /lib64/libudev.so.1
#2  0x000000389e60ee0b in linux_udev_event_thread_main () from /lib64/libusb-1.0.so.0
#3  0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#4  0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7f14d5ccb700 (LWP 6250)):
#0  0x0000003a2560bd20 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003a2d27c8d6 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x00000000005e24ce in Digikam::ScanController::run() ()
#3  0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#4  0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#5  0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7f14d54ca700 (LWP 6251)):
#0  0x0000003a27e8a2ea in g_mutex_get_impl () from /lib64/libglib-2.0.so.0
#1  0x0000003a27e8a5c9 in g_mutex_unlock () from /lib64/libglib-2.0.so.0
#2  0x0000003a27e49549 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#3  0x0000003a27e496dc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#4  0x0000003a2d3b2ec6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#5  0x0000003a2d382edf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#6  0x0000003a2d38322d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#7  0x0000003a2d279baf in QThread::exec() () from /lib64/libQtCore.so.4
#8  0x0000003a2d363863 in QInotifyFileSystemWatcherEngine::run() () from /lib64/libQtCore.so.4
#9  0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#10 0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#11 0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7f14d4cc9700 (LWP 6255)):
#0  0x0000003a2560bd20 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003a2d27c8d6 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x00000038a4f6274a in Digikam::ParkingThread::run() () from /lib64/libdigikamcore.so.3
#3  0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#4  0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#5  0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f149ffff700 (LWP 6430)):
#0  0x0000003a27e8a2ed in g_mutex_get_impl () from /lib64/libglib-2.0.so.0
#1  0x0000003a27e8a599 in g_mutex_lock () from /lib64/libglib-2.0.so.0
#2  0x0000003a27e496c8 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#3  0x0000003a2d3b2ec6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#4  0x0000003a2d382edf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#5  0x0000003a2d38322d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#6  0x00000038a4f61da3 in Digikam::WorkerObjectRunnable::run() () from /lib64/libdigikamcore.so.3
#7  0x0000003a2d26f88e in QThreadPoolThread::run() () from /lib64/libQtCore.so.4
#8  0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#9  0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#10 0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f145f7fe700 (LWP 6481)):
#0  0x0000003a2560bd20 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003a2d27c8d6 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x000000389803b91d in KIPIPlugins::KPRawThumbThread::run() () from /lib64/libkipiplugins.so.3
#3  0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#4  0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#5  0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f14b7fff700 (LWP 6483)):
#0  0x0000003a2560bd20 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003a2d27c8d6 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x00000038a0e2b651 in KDcrawIface::RActionThreadBase::run() () from /lib64/libkdcraw.so.23
#3  0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#4  0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#5  0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f14b77fe700 (LWP 6484)):
[KCrash Handler]
#5  0x00007f145d143cf0 in panoScriptFree () from /usr/lib64/kde4/kipiplugin_panorama.so
#6  0x00007f145d1440b8 in panoScriptParse () from /usr/lib64/kde4/kipiplugin_panorama.so
#7  0x00007f145d12f4d1 in KIPIPanoramaPlugin::PTOFile::openFile(QString const&) () from /usr/lib64/kde4/kipiplugin_panorama.so
#8  0x00007f145d13c70c in KIPIPanoramaPlugin::CpCleanTask::run() () from /usr/lib64/kde4/kipiplugin_panorama.so
#9  0x000000389e20ca42 in ThreadWeaver::JobRunHelper::runTheJob(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /lib64/libthreadweaver.so.4
#10 0x000000389e20cc2e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /lib64/libthreadweaver.so.4
#11 0x000000389e20e8fb in ThreadWeaver::JobCollectionJobRunner::execute(ThreadWeaver::Thread*) () from /lib64/libthreadweaver.so.4
#12 0x000000389e20c40b in ThreadWeaver::Thread::run() () from /lib64/libthreadweaver.so.4
#13 0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#14 0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#15 0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f14b67fc700 (LWP 6485)):
#0  0x0000003a2560bd20 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003a2d27c8d6 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x000000389e20a9dc in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /lib64/libthreadweaver.so.4
#3  0x000000389e20d803 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /lib64/libthreadweaver.so.4
#4  0x000000389e20c36f in ThreadWeaver::Thread::run() () from /lib64/libthreadweaver.so.4
#5  0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#6  0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#7  0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f14b5ffb700 (LWP 6486)):
#0  0x0000003a2560bd20 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003a2d27c8d6 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x000000389e20a9dc in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /lib64/libthreadweaver.so.4
#3  0x000000389e20d803 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /lib64/libthreadweaver.so.4
#4  0x000000389e20c36f in ThreadWeaver::Thread::run() () from /lib64/libthreadweaver.so.4
#5  0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#6  0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#7  0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f14b57fa700 (LWP 6487)):
#0  0x0000003a2560bd20 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003a2d27c8d6 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x000000389e20a9dc in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned(ThreadWeaver::Thread*) () from /lib64/libthreadweaver.so.4
#3  0x000000389e20d803 in ThreadWeaver::WorkingHardState::applyForWork(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /lib64/libthreadweaver.so.4
#4  0x000000389e20c36f in ThreadWeaver::Thread::run() () from /lib64/libthreadweaver.so.4
#5  0x0000003a2d27c3af in QThreadPrivate::start(void*) () from /lib64/libQtCore.so.4
#6  0x0000003a25607f33 in start_thread () from /lib64/libpthread.so.0
#7  0x0000003a24ef4ded in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f14e28eeac0 (LWP 6248)):
#0  0x0000003a2560bd20 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x0000003a2d27c8d6 in QWaitCondition::wait(QMutex*, unsigned long) () from /lib64/libQtCore.so.4
#2  0x00000038a4f62a24 in Digikam::WorkerObject::wait() () from /lib64/libdigikamcore.so.3
#3  0x000000000062c613 in Digikam::FileActionMngr::shutDown() ()
#4  0x000000000062c645 in Digikam::FileActionMngr::~FileActionMngr() ()
#5  0x000000000062c6a7 in Digikam::._243::destroy() ()
#6  0x0000003a24e394c9 in __run_exit_handlers () from /lib64/libc.so.6
#7  0x0000003a24e39515 in exit () from /lib64/libc.so.6
#8  0x0000003911234548 in qt_xio_errhandler () from /lib64/libQtGui.so.4
#9  0x0000003895c49510 in KApplication::xioErrhandler(_XDisplay*) () from /lib64/libkdeui.so.5
#10 0x0000003a2724515e in _XIOError () from /lib64/libX11.so.6
#11 0x0000003a27242b4d in _XEventsQueued () from /lib64/libX11.so.6
#12 0x0000003a2723456b in XEventsQueued () from /lib64/libX11.so.6
#13 0x000000391126b6fc in x11EventSourceCheck(_GSource*) () from /lib64/libQtGui.so.4
#14 0x0000003a27e48ff9 in g_main_context_check () from /lib64/libglib-2.0.so.0
#15 0x0000003a27e49533 in g_main_context_iterate.isra.24 () from /lib64/libglib-2.0.so.0
#16 0x0000003a27e496dc in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#17 0x0000003a2d3b2ea5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#18 0x000000391126bca6 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtGui.so.4
#19 0x0000003a2d382edf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#20 0x0000003a2d38322d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQtCore.so.4
#21 0x0000003a2d388749 in QCoreApplication::exec() () from /lib64/libQtCore.so.4
#22 0x000000000049232d in main ()

Reported using DrKonqi
Comment 1 Benjamin Girault 2014-05-11 11:37:59 UTC
Can you send me your temporary files? On my system, they are located in /tmp/kde-<username>/kipi-panorama-tmp-<something>/. Use your JPEG files for generating the temporary files.

(You can send them to me in a private email if you want, or attach them to this report.
Comment 2 aa.ivanov 2014-05-11 14:08:00 UTC
Created attachment 86580 [details]
kipi-panorama-tmp-*/* files

Attaching tarbal of my temp files.
Comment 3 caulier.gilles 2014-05-16 07:34:17 UTC
digiKam 4.0.0 is out :

http://www.digikam.org/node/713

Please check if this entry still valid with this new version.

Thanks in advance

Gilles Caulier
Comment 4 Benjamin Girault 2014-05-24 08:26:10 UTC
It seems that you are using one of the 2014.0 RC version of Hugin.

The problem is most probably that the hugin project file parser of the panorama plugin is not handling the "Tpy" and "Tpp" parameters of input files ("i" lines of a pto). Those were introduced in Hugin 2014.0beta1 as translation variables of the picture.

Can you downgrade Hugin to at least 2013.0 to confirm the bug?
Comment 5 Benjamin Girault 2014-05-24 08:28:28 UTC
Also, and prior to downgrading, if you can include in the bug report the console (debug) output of the plugin, that help me confirm the bug also.
Comment 6 aa.ivanov 2014-06-14 22:11:57 UTC
I apologize for the late reply. Here are my updates:

@ Gilles Caulier:
I'm sorry but I haven't really tried this with digikam 4.0.0. From what I see, I'm convinced this is related to a kipi plugin and its interaction with hugin as Benjamin has suggested.

@Benjamin Girault:
I did downgrade hugin to 2013.0.0 using the package from fedora's official update repository. It did work out just fine - I was able to complete the wizard and create a panorama file with several different settings and input files. Actually I was completely unable to crash the thing.

As you've requested in your last comment, I've run digikam from console and collected the output. I also went ahead and ran the panoramagui command which seems to be what digikam calls. It did not produce any more or any different output. So I'm pasting the digikam output:
[andrew@karupin ~]$ digikam 
Object::connect: No such signal org::freedesktop::UPower::DeviceAdded(QDBusObjectPath)
Object::connect: No such signal org::freedesktop::UPower::DeviceRemoved(QDBusObjectPath)
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown starting action  1 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown starting action  1 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown starting action  1 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown starting action  1 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown action  1 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown action  1 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown action  1 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown action  1 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown starting action  2 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown action  2 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown starting action  3 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown action  3 
digikam(6496)/KIPI (general) KIPIPanoramaPlugin::PreviewPage::slotAction: Unknown starting action  4 
KCrash: Application 'digikam' crashing...
KCrash: Attempting to start /usr/libexec/kde4/drkonqi from kdeinit
QSocketNotifier: Invalid socket 15 and type 'Read', disabling...
QSocketNotifier: Invalid socket 18 and type 'Read', disabling...
QSocketNotifier: Invalid socket 22 and type 'Read', disabling...
QSocketNotifier: Invalid socket 26 and type 'Read', disabling...
QSocketNotifier: Invalid socket 71 and type 'Read', disabling...
QSocketNotifier: Invalid socket 77 and type 'Read', disabling...
QSocketNotifier: Invalid socket 73 and type 'Read', disabling...
QSocketNotifier: Invalid socket 70 and type 'Read', disabling...
digikam: Fatal IO error: client killed
[andrew@karupin ~]$ 


Please note both programs rejected '--debug' parameter and their help messages did not mention a way of raising the debug level for these messages. If such a way exists, I'm not familiar with it and I'd need further advise.
Comment 7 caulier.gilles 2014-06-15 07:56:25 UTC
To debug, follow instructions here :

http://www.digikam.org/contrib

Gilles Caulier
Comment 8 Benjamin Girault 2014-06-15 16:57:57 UTC
*** Bug 336268 has been marked as a duplicate of this bug. ***
Comment 9 aa.ivanov 2014-06-15 23:18:39 UTC
Created attachment 87209 [details]
gdb session

Installed debug info packages and ran the gdb commands suggested on the web pages pointed.
Please take a look if any of this is of some use to you.
Hope I didn't miss some step somewhere.
Comment 10 Benjamin Girault 2014-06-16 08:34:39 UTC
Thank you for the gdb trace.

That confirms the reason of the bug, which should be fixed in the git repository.