Bug 281292 - Gwenview crash when browsing corrupted jpeg and png-files
Summary: Gwenview crash when browsing corrupted jpeg and png-files
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
: 299211 299253 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-03 21:56 UTC by kde
Modified: 2012-10-19 13:26 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 2.8.4
Sentry Crash Report:


Attachments
New crash information added by DrKonqi (7.18 KB, text/plain)
2011-09-20 07:27 UTC, kde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kde 2011-09-03 21:56:50 UTC
Application: gwenview (2.6.4)
KDE Platform Version: 4.6.5 (4.6.5)
Qt Version: 4.7.3
Operating System: Linux 2.6.40.3-0.fc15.x86_64 x86_64
Distribution (Platform): Fedora RPMs

-- Information about the crash:
- What I was doing when the application crashed:
I browsed quickly through ~20 very corrupted jpeg and png files. Almost immediately Gwenview crashed. I can reproduce this sometimes. Gwenview also seems to show very corrupted png images in a highly inconsistent way: sometimes it shows more of the picture, sometimes less even though the picture data has not changed.

The crash can be reproduced some of the time.

-- Backtrace:
Application: Gwenview (gwenview), signal: Segmentation fault
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[Current thread is 1 (Thread 0x7f1c1c345840 (LWP 16361))]

Thread 2 (Thread 0x7f1c0fa41700 (LWP 16367)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:165
#1  0x0000003986e745db in wait (time=18446744073709551615, this=0x2118d50) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x21550a8, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00000030104ba5f7 in Gwenview::SemanticInfoThread::run (this=0x2155090) at /usr/src/debug/kdegraphics-4.6.5/gwenview/lib/semanticinfo/nepomuksemanticinfobackend.cpp:135
#4  0x0000003986e74145 in QThreadPrivate::start (arg=0x2155090) at thread/qthread_unix.cpp:320
#5  0x000000397c207b31 in start_thread (arg=0x7f1c0fa41700) at pthread_create.c:305
#6  0x000000397badfd2d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7f1c1c345840 (LWP 16361)):
[KCrash Handler]
#6  Gwenview::LoadingDocumentImpl::loadImage (this=0x0, invertedZoom=2) at /usr/src/debug/kdegraphics-4.6.5/gwenview/lib/document/loadingdocumentimpl.cpp:323
#7  0x0000003010462774 in scheduleImageLoading (invertedZoom=2, this=<optimized out>) at /usr/src/debug/kdegraphics-4.6.5/gwenview/lib/document/document.cpp:68
#8  Gwenview::Document::prepareDownSampledImageForZoom (this=0x25854c0, zoom=<optimized out>) at /usr/src/debug/kdegraphics-4.6.5/gwenview/lib/document/document.cpp:385
#9  0x000000000044a7ac in doPreload (this=0x21736f0) at /usr/src/debug/kdegraphics-4.6.5/gwenview/app/preloader.cpp:91
#10 Gwenview::Preloader::doPreload (this=0x21736f0) at /usr/src/debug/kdegraphics-4.6.5/gwenview/app/preloader.cpp:78
#11 0x000000000044a8d3 in Gwenview::Preloader::preload (this=0x21736f0, url=<optimized out>, size=...) at /usr/src/debug/kdegraphics-4.6.5/gwenview/app/preloader.cpp:73
#12 0x0000000000445305 in Gwenview::MainWindow::preloadNextUrl (this=0x2116870) at /usr/src/debug/kdegraphics-4.6.5/gwenview/app/mainwindow.cpp:1474
#13 0x0000000000446143 in Gwenview::MainWindow::qt_metacall (this=0x2116870, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1e6d58b0) at /usr/src/debug/kdegraphics-4.6.5/x86_64-redhat-linux-gnu/gwenview/app/mainwindow.moc:166
#14 0x0000003986f6ceba in QMetaObject::activate (sender=0x25d0670, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3278
#15 0x0000003986f7501f in QSingleShotTimer::timerEvent (this=0x25d0670) at kernel/qtimer.cpp:308
#16 0x0000003986f707a9 in QObject::event (this=0x25d0670, e=<optimized out>) at kernel/qobject.cpp:1181
#17 0x000000300b9b7444 in notify_helper (e=0x7fff1e6d5fc0, receiver=0x25d0670, this=0x208b440) at kernel/qapplication.cpp:4462
#18 QApplicationPrivate::notify_helper (this=0x208b440, receiver=0x25d0670, e=0x7fff1e6d5fc0) at kernel/qapplication.cpp:4434
#19 0x000000300b9bc2d1 in QApplication::notify (this=0x7fff1e6d62f0, receiver=0x25d0670, e=0x7fff1e6d5fc0) at kernel/qapplication.cpp:4341
#20 0x000000300d041d56 in KApplication::notify (this=0x7fff1e6d62f0, receiver=0x25d0670, event=0x7fff1e6d5fc0) at /usr/src/debug/kdelibs-4.6.5/kdeui/kernel/kapplication.cpp:311
#21 0x0000003986f5a1ac in QCoreApplication::notifyInternal (this=0x7fff1e6d62f0, receiver=0x25d0670, event=0x7fff1e6d5fc0) at kernel/qcoreapplication.cpp:731
#22 0x0000003986f86b52 in sendEvent (event=0x7fff1e6d5fc0, receiver=<optimized out>) at kernel/qcoreapplication.h:215
#23 QTimerInfoList::activateTimers (this=0x2090bc0) at kernel/qeventdispatcher_unix.cpp:604
#24 0x0000003986f84384 in timerSourceDispatch (source=<optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#25 0x000000397e6427ed in g_main_dispatch (context=0x208fce0) at gmain.c:2441
#26 g_main_context_dispatch (context=0x208fce0) at gmain.c:3014
#27 0x000000397e642fc8 in g_main_context_iterate (context=0x208fce0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3092
#28 0x000000397e64325c in g_main_context_iteration (context=0x208fce0, may_block=1) at gmain.c:3155
#29 0x0000003986f84d0f in QEventDispatcherGlib::processEvents (this=0x2067ca0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#30 0x000000300ba59fde in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:207
#31 0x0000003986f596c2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#32 0x0000003986f598bf in QEventLoop::exec (this=0x7fff1e6d6250, flags=...) at kernel/qeventloop.cpp:201
#33 0x0000003986f5da07 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#34 0x0000000000422345 in main (argc=6, argv=0x7fff1e6d6618) at /usr/src/debug/kdegraphics-4.6.5/gwenview/app/main.cpp:139

Possible duplicates by query: bug 261309.

Reported using DrKonqi
Comment 1 Christoph Feck 2011-09-17 11:09:32 UTC
Please attach an image (or multiple) that reliable reproduces the crash.
Comment 2 kde 2011-09-20 07:27:45 UTC
Created attachment 63788 [details]
New crash information added by DrKonqi

gwenview (2.6.4) on KDE Platform 4.6.5 (4.6.5) using Qt 4.7.3

I made another set of jpeg files which cause gwenview to crash. With orrupted pngs it's harder to crash Gwenview but there are inconsistent rendering issues (files are rendered differently every time they are opened).  You just need to browse them randomly (back/forward). If you do this quickly, gwenview will crash/show rendering issues more quickly.

I have corrupted the files randomly with a short python script. Okular and Gimp refuse to open the png files, Gwenview opens them. 

I have transferred the test files here:  https://pi-xi.net/share/gwenview/

-- Backtrace (Reduced):
#6  Gwenview::LoadingDocumentImpl::loadImage (this=0x0, invertedZoom=4) at /usr/src/debug/kdegraphics-4.6.5/gwenview/lib/document/loadingdocumentimpl.cpp:323
#7  0x0000003f7e262774 in scheduleImageLoading (invertedZoom=4, this=<optimized out>) at /usr/src/debug/kdegraphics-4.6.5/gwenview/lib/document/document.cpp:68
#8  Gwenview::Document::prepareDownSampledImageForZoom (this=0x24fe8b0, zoom=<optimized out>) at /usr/src/debug/kdegraphics-4.6.5/gwenview/lib/document/document.cpp:385
#9  0x000000000044a7ac in doPreload (this=0x20a0780) at /usr/src/debug/kdegraphics-4.6.5/gwenview/app/preloader.cpp:91
#10 Gwenview::Preloader::doPreload (this=0x20a0780) at /usr/src/debug/kdegraphics-4.6.5/gwenview/app/preloader.cpp:78
Comment 3 Jekyll Wu 2011-12-09 06:08:02 UTC
(In reply to comment #2)

I just downloaded and browsed those files in gwenview  a few times. No crash. No idea about the rendering problem.

I'm using KDE SC 4.8 beta2 and Qt 4.8 rc1.
Comment 4 Jekyll Wu 2012-05-02 01:56:22 UTC
*** Bug 299211 has been marked as a duplicate of this bug. ***
Comment 5 Jekyll Wu 2012-05-02 19:51:11 UTC
*** Bug 299253 has been marked as a duplicate of this bug. ***
Comment 6 Aurelien Gateau 2012-06-06 13:49:31 UTC
Git commit 9dc3076fadd9e56124d1d00edf09316c8a20f6db by Aurélien Gâteau.
Committed on 06/06/2012 at 15:39.
Pushed by gateau into branch 'KDE/4.8'.

Do not crash when prepareDownSampledImageForZoom() is called on a broken image

M  +4    -1    lib/document/document.cpp
M  +2    -1    tests/auto/documenttest.cpp

http://commits.kde.org/gwenview/9dc3076fadd9e56124d1d00edf09316c8a20f6db
Comment 7 Christoph Feck 2012-06-06 19:24:39 UTC
Setting status correctly.