Bug 348333 - Crashes if I click Cancel while resizing images.
Summary: Crashes if I click Cancel while resizing images.
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Albums-Plugins (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-27 21:12 UTC by Alexander Potashev
Modified: 2022-02-06 05:57 UTC (History)
1 user (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 Alexander Potashev 2015-05-27 21:12:35 UTC
See steps to reproduce below.

Reproducible: Always

Steps to Reproduce:
1. Run the "Email images" plugin, I use "./kipicmd -w -a "Email Images..." --selectedimages ~/testimages/test10*".
2. Add a few large JPEG images to the list for exporting.
3. Choose the PNG as the output format, select maximum resolution to make resizing even slower.
4. Start the exporting.
5. Click "Cancel" in the progress dialog while the images are being resized/encoded.

Actual Results:  
kipicmd crashes, GDB reports the following:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4ff418a in QWidgetPrivate::deleteTLSysExtra() () from /usr/lib64/qt4/libQtGui.so.4

See a full backtrace below.

Expected Results:  
Resize canceled and the dialog either not closed or closed gracefully without crashing the host application.

Full backtrace:

(gdb) thread apply all bt

Thread 8 (Thread 0x7fffc6140700 (LWP 25792)):
#0  0x00007ffff27a840f in png_write_find_filter () from /usr/lib64/libpng16.so.16
#1  0x00007ffff27a2eb8 in png_write_row () from /usr/lib64/libpng16.so.16
#2  0x00007ffff27a317f in png_write_rows () from /usr/lib64/libpng16.so.16
#3  0x00007ffff74a184f in KIPIPlugins::KPWriteImage::write2PNG (this=this@entry=0x7fffc613fc10, destPath=...)
    at /home/aspotashev/kde-git/kipi-plugins/common/libkipiplugins/tools/imageio/kpwriteimage.cpp:514
#4  0x00007fffc812b850 in KIPISendimagesPlugin::Task::imageResize (this=this@entry=0xd8bb40, settings=..., orgUrl=..., destName=..., err=...)
    at /home/aspotashev/kde-git/kipi-plugins/sendimages/imageresize.cpp:196
#5  0x00007fffc812bb64 in KIPISendimagesPlugin::Task::run (this=0xd8bb40) at /home/aspotashev/kde-git/kipi-plugins/sendimages/imageresize.cpp:83
#6  0x00007ffff2e8a9a2 in ThreadWeaver::JobRunHelper::runTheJob(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#7  0x00007ffff2e8ab5e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#8  0x00007ffff2e8c5fb in ThreadWeaver::JobCollectionJobRunner::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#9  0x00007ffff2e8a3ab in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#10 0x00007ffff49383bf in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007ffff46aa204 in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff3bd03dd in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fffc6941700 (LWP 25791)):
#0  0x00007ffff256d457 in longest_match () from /lib64/libz.so.1
#1  0x00007ffff256ddf0 in deflate_slow () from /lib64/libz.so.1
#2  0x00007ffff256eeaa in deflate () from /lib64/libz.so.1
#3  0x00007ffff27a798a in png_compress_IDAT () from /usr/lib64/libpng16.so.16
#4  0x00007ffff27a85ec in png_write_find_filter () from /usr/lib64/libpng16.so.16
#5  0x00007ffff27a2eb8 in png_write_row () from /usr/lib64/libpng16.so.16
#6  0x00007ffff27a317f in png_write_rows () from /usr/lib64/libpng16.so.16
#7  0x00007ffff74a184f in KIPIPlugins::KPWriteImage::write2PNG (this=this@entry=0x7fffc6940c10, destPath=...)
---Type <return> to continue, or q <return> to quit---
    at /home/aspotashev/kde-git/kipi-plugins/common/libkipiplugins/tools/imageio/kpwriteimage.cpp:514
#8  0x00007fffc812b850 in KIPISendimagesPlugin::Task::imageResize (this=this@entry=0xd82b50, settings=..., orgUrl=..., destName=..., err=...)
    at /home/aspotashev/kde-git/kipi-plugins/sendimages/imageresize.cpp:196
#9  0x00007fffc812bb64 in KIPISendimagesPlugin::Task::run (this=0xd82b50) at /home/aspotashev/kde-git/kipi-plugins/sendimages/imageresize.cpp:83
#10 0x00007ffff2e8a9a2 in ThreadWeaver::JobRunHelper::runTheJob(ThreadWeaver::Thread*, ThreadWeaver::Job*) () from /usr/lib64/libthreadweaver.so.4
#11 0x00007ffff2e8ab5e in ThreadWeaver::Job::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#12 0x00007ffff2e8c5fb in ThreadWeaver::JobCollectionJobRunner::execute(ThreadWeaver::Thread*) () from /usr/lib64/libthreadweaver.so.4
#13 0x00007ffff2e8a3ab in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4
#14 0x00007ffff49383bf in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#15 0x00007ffff46aa204 in start_thread () from /lib64/libpthread.so.0
#16 0x00007ffff3bd03dd in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fffc7142700 (LWP 25790)):
#0  0x00007ffff46ae54f in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007ffff49388a6 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007ffff235a5b1 in KDcrawIface::RActionThreadBase::run() () from /usr/lib64/libkdcraw.so.23
#3  0x00007ffff49383bf in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007ffff46aa204 in start_thread () from /lib64/libpthread.so.0
#5  0x00007ffff3bd03dd in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fffc8119700 (LWP 25784)):
#0  0x00007ffff46ae54f in pthread_cond_wait () from /lib64/libpthread.so.0
#1  0x00007ffff49388a6 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007ffff749db8d in KIPIPlugins::KPRawThumbThread::run (this=0xab5350) at /home/aspotashev/kde-git/kipi-plugins/common/libkipiplugins/tools/kprawthumbthread.cpp:108
#3  0x00007ffff49383bf in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007ffff46aa204 in start_thread () from /lib64/libpthread.so.0
#5  0x00007ffff3bd03dd in clone () from /lib64/libc.so.6
---Type <return> to continue, or q <return> to quit---

Thread 4 (Thread 0x7fffc917b700 (LWP 25783)):
#0  0x00007ffff3bc77ed in poll () from /lib64/libc.so.6
#1  0x00007fffd16adf28 in linux_udev_event_thread_main () from /lib64/libusb-1.0.so.0
#2  0x00007ffff46aa204 in start_thread () from /lib64/libpthread.so.0
#3  0x00007ffff3bd03dd in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fffe5b1c700 (LWP 25779)):
#0  0x00007ffff3bc77ed in poll () from /lib64/libc.so.6
#1  0x00007fffef87e944 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fffef87ea4c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007ffff4a6677e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007ffff4a386ff in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007ffff4a389f5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007ffff4935cdf in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007ffff4a19fc3 in QInotifyFileSystemWatcherEngine::run() () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007ffff49383bf in QThreadPrivate::start(void*) () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007ffff46aa204 in start_thread () from /lib64/libpthread.so.0
#10 0x00007ffff3bd03dd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7ffff7f83780 (LWP 25770)):
#0  0x00007ffff4ff418a in QWidgetPrivate::deleteTLSysExtra() () from /usr/lib64/qt4/libQtGui.so.4
#1  0x00007ffff4fab785 in QWidgetPrivate::deleteExtra() () from /usr/lib64/qt4/libQtGui.so.4
#2  0x00007ffff4fab9ad in QWidgetPrivate::~QWidgetPrivate() () from /usr/lib64/qt4/libQtGui.so.4
#3  0x00007ffff53d9ac7 in QDialogPrivate::~QDialogPrivate() () from /usr/lib64/qt4/libQtGui.so.4
#4  0x00007ffff4a52755 in QObject::~QObject() () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007ffff4fb43bc in QWidget::~QWidget() () from /usr/lib64/qt4/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#6  0x00007ffff74a3309 in KIPIPlugins::KPBatchProgressDialog::~KPBatchProgressDialog (this=0xd8bad0, __in_chrg=<optimized out>)
    at /home/aspotashev/kde-git/kipi-plugins/common/libkipiplugins/dialogs/kpbatchprogressdialog.cpp:237
#7  0x00007fffc812c006 in KIPISendimagesPlugin::SendImages::~SendImages (this=0xa81b80, __in_chrg=<optimized out>)
    at /home/aspotashev/kde-git/kipi-plugins/sendimages/sendimages.cpp:117
#8  0x00007fffc812c089 in KIPISendimagesPlugin::SendImages::~SendImages (this=0xa81b80, __in_chrg=<optimized out>)
    at /home/aspotashev/kde-git/kipi-plugins/sendimages/sendimages.cpp:119
#9  0x00007ffff4a50188 in QObjectPrivate::deleteChildren() () from /usr/lib64/qt4/libQtCore.so.4
#10 0x00007ffff4a5271f in QObject::~QObject() () from /usr/lib64/qt4/libQtCore.so.4
#11 0x00007fffc8125399 in KIPISendimagesPlugin::Plugin_SendImages::~Plugin_SendImages (this=0xa17400, __in_chrg=<optimized out>)
    at /home/aspotashev/kde-git/kipi-plugins/sendimages/plugin_sendimages.cpp:84
#12 0x00007ffff4a50188 in QObjectPrivate::deleteChildren() () from /usr/lib64/qt4/libQtCore.so.4
#13 0x00007ffff4a5271f in QObject::~QObject() () from /usr/lib64/qt4/libQtCore.so.4
#14 0x00000000004087d9 in KipiInterface::~KipiInterface (this=0x7dc470, __in_chrg=<optimized out>) at /home/aspotashev/kde-git/kipi-plugins/tests/kipiinterface.cpp:71
#15 0x00007ffff4a50188 in QObjectPrivate::deleteChildren() () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00007ffff4a5271f in QObject::~QObject() () from /usr/lib64/qt4/libQtCore.so.4
#17 0x00007ffff4f696e9 in QApplication::~QApplication() () from /usr/lib64/qt4/libQtGui.so.4
#18 0x0000000000407fb1 in main (argc=<optimized out>, argv=<optimized out>) at /home/aspotashev/kde-git/kipi-plugins/tests/main.cpp:477
(gdb)
Comment 1 Alexander Potashev 2015-05-27 22:29:22 UTC
This happens because the Cancel button in KDialog (ancestor of class KPBatchProgressDialog) trigger QDialog::reject() which then closes the dialog. The application terminates because this progress dialog was the only window in "kipicmd".
Comment 2 Justin Zobel 2020-12-17 05:29:55 UTC
Thank you for the crash report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 3 Bug Janitor Service 2021-01-01 04:35:09 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2021-01-16 04:34:25 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!