Bug 200092 - Gwenview crashes when "Save All" is clicked
Summary: Gwenview crashes when "Save All" is clicked
Status: RESOLVED DUPLICATE of bug 189992
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-13 22:54 UTC by Andrea
Modified: 2012-10-19 13:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea 2009-07-13 22:54:33 UTC
Version:           2.2.3 (using KDE 4.2.4)
OS:                Linux
Installed from:    Fedora RPMs

Gwenview often (but not always) crashes when clicking Save All after some pictures have been rotated.

The more pictures are rotated the easier for it to crash.
So far I have not been able to crash it with a single picture rotated.

The same used to happen with Gwenview shipped with Fedora 9 (can't remember the version), but now I've spent some time debugging.

I've noticed that the backtrace con be of 2/3 different types and the error is not always in the same place.

This is the most frequent type

#0  0x075968e8 in ?? () from /usr/lib/libQtCore.so.4
#1  0x0759c710 in QUrl::isValid() const () from /usr/lib/libQtCore.so.4
#2  0x02d9f638 in Gwenview::SortedDirModel::indexForUrl (this=0x8172cb8, url=@0x858b2dc)
    at /usr/src/debug/kdegraphics-4.2.4/gwenview/lib/semanticinfo/sorteddirmodel.cpp:152
#3  0x0807c8eb in Gwenview::MainWindow::generateThumbnailForUrl (this=0x81719e0, url=@0x858b2dc) at /usr/src/debug/kdegraphics-4.2.4/gwenview/app/mainwindow.cpp:1153
#4  0x08082183 in Gwenview::MainWindow::qt_metacall (this=0x81719e0, _c=QMetaObject::InvokeMetaMethod, _id=76, _a=0xbfffe5c8)
    at /usr/src/debug/kdegraphics-4.2.4/i586-redhat-linux-gnu/gwenview/app/mainwindow.moc:154
---Type <return> to continue, or q <return> to quit---
#5  0x075f2fc3 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#6  0x075f3c12 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#7  0x02d708b3 in Gwenview::DocumentFactory::documentChanged (this=0x2dec5a8, _t1=@0x858b2dc)
    at /usr/src/debug/kdegraphics-4.2.4/i586-redhat-linux-gnu/gwenview/lib/documentfactory.moc:97
#8  0x02d712e5 in Gwenview::DocumentFactory::slotSaved (this=0x2dec5a8, url=@0x858b2dc) at /usr/src/debug/kdegraphics-4.2.4/gwenview/lib/document/documentfactory.cpp:200
#9  0x02d71395 in Gwenview::DocumentFactory::qt_metacall (this=0x2dec5a8, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfffe718)
    at /usr/src/debug/kdegraphics-4.2.4/i586-redhat-linux-gnu/gwenview/lib/documentfactory.moc:78
#10 0x075f2fc3 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4
#11 0x075f3c12 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#12 0x02d6ed83 in Gwenview::Document::saved (this=0x85b58e8, _t1=@0x858b2dc) at /usr/src/debug/kdegraphics-4.2.4/i586-redhat-linux-gnu/gwenview/lib/document.moc:156
#13 0x02d6edda in Gwenview::Document::slotCleanChanged (this=0x5650000, clean=true) at /usr/src/debug/kdegraphics-4.2.4/gwenview/lib/document/document.cpp:392
#14 0x02d6f170 in Gwenview::Document::qt_metacall (this=0x85b58e8, _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0xb5010560)
    at /usr/src/debug/kdegraphics-4.2.4/i586-redhat-linux-gnu/gwenview/lib/document.moc:103
#15 0x075ebb7b in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/libQtCore.so.4
#16 0x075ed26e in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#17 0x02127444 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#18 0x0212eabe in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#19 0x07bfa3ca in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#20 0x075dcfdb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#21 0x075ddad8 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#22 0x075ddcad in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#23 0x076080af in ?? () from /usr/lib/libQtCore.so.4
#24 0x0057cd78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#25 0x00580310 in ?? () from /lib/libglib-2.0.so.0
#26 0x00580443 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#27 0x07607cdc in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#28 0x021c6305 in ?? () from /usr/lib/libQtGui.so.4
---Type <return> to continue, or q <return> to quit---
#29 0x075db5c9 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#30 0x075dba12 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#31 0x075ddd6f in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#32 0x021272c7 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#33 0x0807c41f in main (argc=1, argv=0xbffff0b4) at /usr/src/debug/kdegraphics-4.2.4/gwenview/app/main.cpp:95

I have as well tried to debug it. I've recompiled gwenview without optimization and with debug info and my best guess so far is around stack #8 in the function slotSaved:

void DocumentFactory::slotSaved(const KUrl& url) {
	d->mModifiedDocumentList.removeAll(url);
	d->garbageCollect(d->mDocumentMap);
	emit modifiedDocumentListChanged();
	emit documentChanged(url);
}

basically the "url" is bad after the line with "garbageCollect()" (I've found that adding some print commands after each line).
And when finally the url is used in #2 it crashes.

Something must go wrong inside garbageCollect(), but I have not yet figured out what.
Comment 1 Dario Andres 2009-07-14 15:09:25 UTC
This was reported and fixed already in KDE4.3 code. Thanks for your analysis.

*** This bug has been marked as a duplicate of bug 189992 ***