Bug 350632

Summary: Crashed while rotating the image
Product: [Applications] gwenview Reporter: K. S. Krishna Chandran <ks.krishnan1996>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: kde, myriam, nate, peca7, shlomif, stratiladimitrie, yasinzaehringer+kde, ztowfic
Priority: NOR Keywords: drkonqi
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: backtrace of a similar crash
picture for testing the bug
test photo

Description K. S. Krishna Chandran 2015-07-26 15:26:51 UTC
Application: gwenview (5.0.0 pre)
 (Compiled from sources)
Qt Version: 5.4.1
Operating System: Linux 3.19.0-15-generic x86_64
Distribution: Ubuntu 15.04

-- Information about the crash:
- What I was doing when the application crashed:
I opened a picture in the  application. I wanted to rotate the  picture and I clicked on the rotaing option. First I clicked the option 'rotate left', then the application crashed. Then again I opened the image and this time I chose  'rotate right' option, then also the application crashed.

The crash can be reproduced sometimes.

-- Backtrace:
Application: Gwenview (gwenview), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ff6628fc800 (LWP 4617))]

Thread 2 (Thread 0x7ff64eadf700 (LWP 4618)):
#0  0x00007ff65df9a8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007ff657e3ab72 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007ff657e3c64f in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007ff650a03099 in ?? () from /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
#4  0x00007ff65e61bb0e in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ff659cb06aa in start_thread (arg=0x7ff64eadf700) at pthread_create.c:333
#6  0x00007ff65dfa5eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7ff6628fc800 (LWP 4617)):
[KCrash Handler]
#6  0x00007ff65e861624 in QMetaObject::cast(QObject*) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007ff661d48493 in qobject_cast<Gwenview::DownSamplingJob*> (object=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:520
#8  Gwenview::DocumentPrivate::scheduleImageDownSampling (this=0x28cbf90, invertedZoom=4) at ../../lib/document/document.cpp:108
#9  0x00007ff661d4895a in Gwenview::Document::prepareDownSampledImageForZoom (this=0x27f3430, zoom=0.11709104938271606) at ../../lib/document/document.cpp:456
#10 0x00007ff661d83660 in Gwenview::ImageScaler::doScale (this=0x27705f0) at ../../lib/imagescaler.cpp:109
#11 0x00007ff661d838d5 in Gwenview::ImageScaler::setDestinationRegion (this=<optimized out>, region=...) at ../../lib/imagescaler.cpp:102
#12 0x00007ff661d60126 in setScalerRegionToVisibleRect (this=0x29308a0) at ../../lib/documentview/rasterimageview.cpp:144
#13 Gwenview::RasterImageView::updateBuffer (this=<optimized out>, region=...) at ../../lib/documentview/rasterimageview.cpp:436
#14 0x00007ff661d60293 in Gwenview::RasterImageView::onZoomChanged (this=0x24dc410) at ../../lib/documentview/rasterimageview.cpp:353
#15 0x00007ff661d51e3f in Gwenview::AbstractImageView::setZoom (this=this@entry=0x24dc410, zoom=<optimized out>, _center=..., updateType=updateType@entry=Gwenview::AbstractImageView::UpdateIfNecessary) at ../../lib/documentview/abstractimageview.cpp:220
#16 0x00007ff661d5fc19 in Gwenview::RasterImageView::updateImageRect (this=0x24dc410, imageRect=...) at ../../lib/documentview/rasterimageview.cpp:296
#17 0x00007ff661dc1ee9 in Gwenview::RasterImageView::qt_static_metacall (_o=0x24dc410, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at moc_rasterimageview.cpp:106
#18 0x00007ff65e88a9c9 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ff661dbf415 in Gwenview::Document::imageRectUpdated (this=<optimized out>, _t1=...) at moc_document.cpp:280
#20 0x00007ff65e88b73a in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ff65f163b2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ff65f169000 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ff65e859c2b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007ff65e85bc9b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007ff65e8b2843 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007ff659791c3d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007ff659791f20 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007ff659791fcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ff65e8b2c57 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007ff65e8573e2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007ff65e85f02c in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x000000000043822d in main (argc=2, argv=<optimized out>) at ../../app/main.cpp:166

Possible duplicates by query: bug 333834.

Reported using DrKonqi
Comment 1 Shlomi Fish 2015-09-12 20:34:20 UTC
Hi Mr. Chandran,

I now tried to reproduce it with gwenview git master ( commit 53887db3ad6c63c784e410ea6c61d8d8943d7031 ) with a patch for the UI - with this image which is one of the largest I could find in a Google search for "fantasy art": (safe for work/child safe): http://sf.co.ua/13/08/wallpaper-2958231.jpg , and rotations is working fine. I'm using Mageia Linux x86-64 v6.

1. Can you still reproduce this problem with git master of gwenview?

2. Can you provide an offending image?
Comment 2 Benedikt Geißler 2015-09-18 21:11:35 UTC
Created attachment 94638 [details]
backtrace of a similar crash

Just as I wanted to rotate a picture gwenview crashed so that I can confirm this bug.
Comment 3 Shlomi Fish 2015-09-18 22:39:14 UTC
(In reply to Benedikt Geißler from comment #2)
> Created attachment 94638 [details]
> backtrace of a similar crash
> 
> Just as I wanted to rotate a picture gwenview crashed so that I can confirm
> this bug.

Please provide a problematic picture and details of your gwenview version and system.
Comment 4 Benedikt Geißler 2015-09-18 23:59:15 UTC
> Please provide a problematic picture and details of your gwenview version
> and system.

I am using Kubuntu 15.04 and it should be the version of gwenview from the Kubuntu backports PPA.
Comment 5 Shlomi Fish 2015-09-19 07:43:56 UTC
(In reply to Benedikt Geißler from comment #4)
> 
> > Please provide a problematic picture and details of your gwenview version
> > and system.
> 
> I am using Kubuntu 15.04 and it should be the version of gwenview from the
> Kubuntu backports PPA.

I see. Please provide a problematic image file.
Comment 6 Benedikt Geißler 2015-09-19 13:13:27 UTC
Created attachment 94645 [details]
picture for testing the bug

If you try to rotate the picture repeatedly, i. e. pressing Ctrl-R quite often, then there should certainly occur a crash.

Maybe this reveals something, too. When I started gwenview from the terminal, these messages where displayed on it:

kf5.kiconthemes: "Theme tree: (Breeze)"
Invalid pixmap specified.
QTimeLine::setDuration: cannot set duration <= 0
Invalid pixmap specified.
QTimeLine::setDuration: cannot set duration <= 0
Invalid pixmap specified.
QTimeLine::setDuration: cannot set duration <= 0
Invalid pixmap specified.
QTimeLine::setDuration: cannot set duration <= 0
kf5.kservice.sycoca: Trying to open ksycoca from "/home/kubuntu/.cache/ksycoca5"
Invalid pixmap specified.
QTimeLine::setDuration: cannot set duration <= 0
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
Could not create a temporary file.
org.kde.kactivities.lib.core: Creating ResourceInstance: empty for now
Invalid pixmap specified.
No frame loaded
No frame loaded
No frame loaded
No frame loaded
No frame loaded
Condition ' job == d->mCurrentJob.data() ' failed
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = gwenview path = /usr/bin pid = 12300
KCrash: Arguments: /usr/bin/gwenview 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0
zsh: suspended (signal)  gwenview
Comment 7 Shlomi Fish 2015-09-19 13:48:42 UTC
Hi Benedikt,

(In reply to Benedikt Geißler from comment #6)
> Created attachment 94645 [details]
> picture for testing the bug
> 
> If you try to rotate the picture repeatedly, i. e. pressing Ctrl-R quite
> often, then there should certainly occur a crash.
> 

I cannot reproduce it here (= Mageia Linux x86-64 version 6) with either gwenview-15.08.1-1.mga6 or with gwenview from git master ( 

commit 53887db3ad6c63c784e410ea6c61d8d8943d7031
Author: l10n daemon script <scripty@kde.org>
Date:   Thu Aug 13 09:43:20 2015 +0000

). I tried pressing Ctrl+R many times with that photo in gwenview, and even held ctrl+R and no crash was seen. Can you try it with the git master version?
Comment 8 Benedikt Geißler 2015-09-25 17:50:07 UTC
On Debian testing with Gwenview 15.08.1 (Frameworks 5.14.0, compiled against Qt 5.4.2) this issue does not occur, too.
Comment 9 Shlomi Fish 2015-09-26 07:59:40 UTC
(In reply to Benedikt Geißler from comment #8)
> On Debian testing with Gwenview 15.08.1 (Frameworks 5.14.0, compiled against
> Qt 5.4.2) this issue does not occur, too.

I see - thanks for the update.
Comment 10 Yasin Zähringer 2016-07-24 12:14:16 UTC
I see the crash consistently with at least one photo when I click the rotate button twice very quickly.

System:
Application: Version 15.12.3 (KDE Frameworks 5.23.0)
Qt Version: 5.5.1
Operating System: Linux 4.4.0-31-generic x86_64
Distribution: Ubuntu 16.04 + Backports PPA

Backtrace:
Application: Gwenview (gwenview), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f84caf909c0 (LWP 23206))]

Thread 2 (Thread 0x7f84bd236700 (LWP 23208)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:225
#1  0x00007f84ded9ba26 in QWaitConditionPrivate::wait_relative (time=30000, this=0x27993d0) at thread/qwaitcondition_unix.cpp:126
#2  QWaitConditionPrivate::wait (time=30000, this=0x27993d0) at thread/qwaitcondition_unix.cpp:134
#3  QWaitCondition::wait (this=this@entry=0x2797e00, mutex=mutex@entry=0x2799170, time=30000) at thread/qwaitcondition_unix.cpp:208
#4  0x00007f84ded974d3 in QThreadPoolThread::run (this=0x2797df0) at thread/qthreadpool.cpp:127
#5  0x00007f84ded9a84e in QThreadPrivate::start (arg=0x2797df0) at thread/qthread_unix.cpp:331
#6  0x00007f84d992b6fa in start_thread (arg=0x7f84bd236700) at pthread_create.c:333
#7  0x00007f84de6b0b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f84caf909c0 (LWP 23206)):
[KCrash Handler]
#6  0x00007f84def83257 in QMetaObject::cast(QObject*) const () at kernel/qmetaobject.cpp:312
#7  0x00007f84e2d9da0f in qobject_cast<Gwenview::DownSamplingJob*> (object=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:518
#8  Gwenview::DocumentPrivate::scheduleImageDownSampling (this=0x2796f10, invertedZoom=4) at /build/gwenview-iJ9mAT/gwenview-15.12.3/lib/document/document.cpp:108
#9  0x00007f84e2d9dd0e in Gwenview::Document::prepareDownSampledImageForZoom (this=0x2796e60, zoom=0.11426957831325302) at /build/gwenview-iJ9mAT/gwenview-15.12.3/lib/document/document.cpp:456
#10 0x00007f84e2dd8f30 in Gwenview::ImageScaler::doScale (this=0x211a8e0) at /build/gwenview-iJ9mAT/gwenview-15.12.3/lib/imagescaler.cpp:109
#11 0x00007f84e2dd91a5 in Gwenview::ImageScaler::setDestinationRegion (this=<optimized out>, region=...) at /build/gwenview-iJ9mAT/gwenview-15.12.3/lib/imagescaler.cpp:102
#12 0x00007f84e2db6474 in Gwenview::RasterImageViewPrivate::setScalerRegionToVisibleRect (this=0x20b6060) at /build/gwenview-iJ9mAT/gwenview-15.12.3/lib/documentview/rasterimageview.cpp:151
#13 Gwenview::RasterImageView::updateBuffer (this=<optimized out>, region=...) at /build/gwenview-iJ9mAT/gwenview-15.12.3/lib/documentview/rasterimageview.cpp:443
#14 0x00007f84e2db65e3 in Gwenview::RasterImageView::onZoomChanged (this=0x2b1cc50) at /build/gwenview-iJ9mAT/gwenview-15.12.3/lib/documentview/rasterimageview.cpp:434
#15 0x00007f84e2da86b5 in Gwenview::AbstractImageView::setZoom (this=this@entry=0x2b1cc50, zoom=<optimized out>, _center=..., updateType=updateType@entry=Gwenview::AbstractImageView::UpdateIfNecessary) at /build/gwenview-iJ9mAT/gwenview-15.12.3/lib/documentview/abstractimageview.cpp:220
#16 0x00007f84e2db5f79 in Gwenview::RasterImageView::updateImageRect (this=0x2b1cc50, imageRect=...) at /build/gwenview-iJ9mAT/gwenview-15.12.3/lib/documentview/rasterimageview.cpp:303
#17 0x00007f84e2e1df39 in Gwenview::RasterImageView::qt_static_metacall (_o=_o@entry=0x2b1cc50, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=5, _a=_a@entry=0x7ffdc3488f50) at /build/gwenview-iJ9mAT/gwenview-15.12.3/obj-x86_64-linux-gnu/lib/moc_rasterimageview.cpp:107
#18 0x00007f84defa9fca in QMetaObject::activate (sender=0x2796e60, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffdc3488f50) at kernel/qobject.cpp:3713
#19 0x00007f84defaa7d7 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7f84e3060040 <Gwenview::Document::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffdc3488f50) at kernel/qobject.cpp:3578
#20 0x00007f84e2e1a515 in Gwenview::Document::imageRectUpdated (this=<optimized out>, _t1=...) at /build/gwenview-iJ9mAT/gwenview-15.12.3/obj-x86_64-linux-gnu/lib/moc_document.cpp:281
#21 0x00007f84defaaea1 in QObject::event (this=0x2796e60, e=<optimized out>) at kernel/qobject.cpp:1239
#22 0x00007f84e024205c in QApplicationPrivate::notify_helper (this=this@entry=0x1efaf20, receiver=receiver@entry=0x2796e60, e=e@entry=0x7f84b8017be0) at kernel/qapplication.cpp:3716
#23 0x00007f84e0247516 in QApplication::notify (this=0x7ffdc34895b0, receiver=0x2796e60, e=0x7f84b8017be0) at kernel/qapplication.cpp:3499
#24 0x00007f84def7b62b in QCoreApplication::notifyInternal (this=0x7ffdc34895b0, receiver=0x2796e60, event=event@entry=0x7f84b8017be0) at kernel/qcoreapplication.cpp:965
#25 0x00007f84def7da26 in QCoreApplication::sendEvent (event=0x7f84b8017be0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:224
#26 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1eee560) at kernel/qcoreapplication.cpp:1593
#27 0x00007f84def7df08 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1451
#28 0x00007f84defd1673 in postEventSourceDispatch (s=0x1f352e0) at kernel/qeventdispatcher_glib.cpp:271
#29 0x00007f84d940a1a7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f84d940a400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f84d940a4ac in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f84defd1a7f in QEventDispatcherGlib::processEvents (this=0x1f2df80, flags=...) at kernel/qeventdispatcher_glib.cpp:418
#33 0x00007f84def78dea in QEventLoop::exec (this=this@entry=0x7ffdc34894a0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204
#34 0x00007f84def80e8c in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1229
#35 0x00007f84df2b4c3c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1542
#36 0x00007f84e023e495 in QApplication::exec () at kernel/qapplication.cpp:2976
#37 0x000000000044ba70 in main (argc=2, argv=<optimized out>) at /build/gwenview-iJ9mAT/gwenview-15.12.3/app/main.cpp:166
Comment 11 Shlomi Fish 2016-07-24 16:03:28 UTC
Hi Yasin,

(In reply to Yasin Zähringer from comment #10)
> I see the crash consistently with at least one photo when I click the rotate
> button twice very quickly.
> 

can you share a problematic photo? You can try attaching it here or use http://imgur.com/ .

> System:
> Application: Version 15.12.3 (KDE Frameworks 5.23.0)
> Qt Version: 5.5.1
> Operating System: Linux 4.4.0-31-generic x86_64
> Distribution: Ubuntu 16.04 + Backports PPA
>
Comment 12 Yasin Zähringer 2016-07-24 22:07:34 UTC
Created attachment 100278 [details]
test photo
Comment 13 Shlomi Fish 2016-07-25 11:20:45 UTC
Hi Yasin,

I tried rotating your photo rapidly in gwenview on both an Ubuntu 16.04+backports VirtualBox VM running JWM And on my Mageia Linux x86-64 v6 system running Xfce, and there were absolutely no crashes. Can you try to see if it is happening in a new UNIX user account on JWM or a similar lightweight window manager?
Comment 14 Christoph Feck 2017-07-30 10:02:35 UTC
*** Bug 382921 has been marked as a duplicate of this bug. ***
Comment 15 Christoph Feck 2017-07-30 10:17:55 UTC
*** Bug 333834 has been marked as a duplicate of this bug. ***
Comment 16 Nate Graham 2017-09-08 21:46:19 UTC
Looks fixed-ish now.
Comment 17 Nate Graham 2017-11-05 14:46:50 UTC
*** Bug 386535 has been marked as a duplicate of this bug. ***