Summary: | Dolphin crashes with certain image files in "Details" view mode if "Preview" is enabled (assertion "!icon.isNull()" failed) | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | R Muench <r.muench> |
Component: | general | Assignee: | Peter Penz <peter.penz19> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | adamoki, bernhard.posselt, diendien, emmanuel.surleau, faure, frank78ac, gbotha, jacobsm, kde4, marcus, mpartap, nickcousyn01, per.angstrom, pjcdawkins, protomank, r.muench, Regnaron, rl6, saulotoledo |
Priority: | NOR | ||
Version: | 16.12.2 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
one the files which cause the crash
on of the files which cause the crash Killer PNG Good boy PNG fix the crash in dolphin kpart better fix |
Description
R Muench
2008-09-06 16:45:26 UTC
Created attachment 27280 [details]
one the files which cause the crash
Created attachment 27281 [details]
on of the files which cause the crash
Confirming on KDE-4.1.1 with the backtrace below. However, I need to preview the files in dolphin in order to make it crash. Eiter selecting Preview as view or hovering over the file to show the preview in the right sidebar is enough to make dolphin crash. Backtrace: Application: Dolphin (dolphin), signal SIGABRT [Thread debugging using libthread_db enabled] [New Thread 0xb6167700 (LWP 2405)] [KCrash handler] #6 0xffffe424 in __kernel_vsyscall () #7 0xb6455690 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #8 0xb6456ed8 in *__GI_abort () at abort.c:88 #9 0xb74a236f in qt_message_output (msgType=QtFatalMsg, buf=0xbfcb8620 "ASSERT: \"!icon.isNull()\" in file /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kio/kio/kdirmodel.cpp, line 558") at global/qglobal.cpp:2061 #10 0xb74a242e in qFatal (msg=0xb75ebafc "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2263 #11 0xb74a276f in qt_assert (assertion=0xb7e745c0 "!icon.isNull()", file=0xb7e74328 "/var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kio/kio/kdirmodel.cpp", line=558) at global/qglobal.cpp:1831 #12 0xb7d70262 in KDirModel::setData (this=0x81a3b18, index=@0xbfcba6f4, value=@0xbfcba704, role=1) at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kio/kio/kdirmodel.cpp:558 #13 0xb7f7e081 in IconManager::dispatchPreviewQueue (this=0x8485158) at /var/tmp/portage/kde-base/dolphin-4.1.1/work/dolphin-4.1.1/apps/dolphin/src/iconmanager.cpp:317 #14 0xb7f7eb25 in IconManager::qt_metacall (this=0x8485158, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbfcba7d8) at /var/tmp/portage/kde-base/dolphin-4.1.1/work/dolphin_build/apps/dolphin/src/iconmanager.moc:79 #15 0xb75b2131 in QMetaObject::activate (sender=0x847ae90, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3007 #16 0xb75b4028 in QMetaObject::activate (sender=0x847ae90, m=0xb76809c4, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3077 #17 0xb75eaf2d in QTimer::timeout (this=0x847ae90) at .moc/debug-shared/moc_qtimer.cpp:126 #18 0xb75b81be in QTimer::timerEvent (this=0x847ae90, e=0xbfcbac8c) at kernel/qtimer.cpp:263 #19 0xb75ab5b9 in QObject::event (this=0x847ae90, e=0xbfcbac8c) at kernel/qobject.cpp:1096 #20 0xb68e2f1b in QApplicationPrivate::notify_helper (this=0x80affb0, receiver=0x847ae90, e=0xbfcbac8c) at kernel/qapplication.cpp:3800 #21 0xb68e9a55 in QApplication::notify (this=0xbfcbb04c, receiver=0x847ae90, e=0xbfcbac8c) at kernel/qapplication.cpp:3392 #22 0xb7b39ce9 in KApplication::notify (this=0xbfcbb04c, receiver=0x847ae90, event=0xbfcbac8c) at /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kdeui/kernel/kapplication.cpp:311 #23 0xb759b771 in QCoreApplication::notifyInternal (this=0xbfcbb04c, receiver=0x847ae90, event=0xbfcbac8c) at kernel/qcoreapplication.cpp:591 #24 0xb75c7ffe in QTimerInfoList::activateTimers (this=0x80b070c) at kernel/qcoreapplication.h:215 #25 0xb75c81c2 in QEventDispatcherUNIX::processEvents (this=0x80b0068, flags= {i = -1077170388}) at kernel/qeventdispatcher_unix.cpp:899 #26 0xb697803f in QEventDispatcherX11::processEvents (this=0x80b0068, flags= {i = -1077170328}) at kernel/qeventdispatcher_x11.cpp:154 #27 0xb759a300 in QEventLoop::processEvents (this=0xbfcbafe0, flags= {i = -1077170264}) at kernel/qeventloop.cpp:149 #28 0xb759a4a2 in QEventLoop::exec (this=0xbfcbafe0, flags={i = -1077170200}) at kernel/qeventloop.cpp:200 #29 0xb759c8bf in QCoreApplication::exec () at kernel/qcoreapplication.cpp:849 #30 0xb68e2cb3 in QApplication::exec () at kernel/qapplication.cpp:3330 #31 0x0807f218 in main (argc=6, argv=0xbfcbb204) at /var/tmp/portage/kde-base/dolphin-4.1.1/work/dolphin-4.1.1/apps/dolphin/src/main.cpp:94 #0 0xffffe424 in __kernel_vsyscall () *** Bug 170618 has been marked as a duplicate of this bug. *** I can confirm this with Dolphin and Konqueror in KDE 4.1.1 in "Details" View mode when "Preview" is enabled. The failed assertion ASSERT: "!icon.isNull()" in file /build/buildd/kde4libs-4.1.1+really4.1.1/kio/kio/kdirmodel.cpp, line 558 is reported. Probably a problem in kdelibs? SVN trunk rev. 857909 does not crash for me. Note that the duplicate bug 170618 contains more test images. *** Bug 168375 has been marked as a duplicate of this bug. *** *** Bug 169816 has been marked as a duplicate of this bug. *** I did a bit of research and got the impression that this was probably fixed in trunk by http://websvn.kde.org/?view=rev&revision=848955 (848954 crashes for me with a similar backtrace, 848955 works fine). I suppose the fix is not in the 4.1 branch because this commit was on August 18, a few weeks before 4.1.1 was tagged. Maybe this can be backported, Peter? *** Bug 170750 has been marked as a duplicate of this bug. *** I can confirm this with dolphin in kde 4.1.1 gdb says the following: (gdb) dolphin(4579) MetaDataWidget::setFile: KUrl("file:///home/bernhard") dolphin(4579) MetaDataWidget::setFile: KUrl("file:///home/bernhard") ASSERT: "!icon.isNull()" in file /build/buildd/kde4libs-4.1.1+really4.1.1/kio/kio/kdirmodel.cpp, line 558 KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = dolphin path = <unknown> pid = 4579 sock_file=/home/bernhard/.kde4/socket-bernhard-laptop/kdeinit4__0 I can confirm this with dolphin in kde 4.1.1 gdb says the following: (gdb) dolphin(4579) MetaDataWidget::setFile: KUrl("file:///home/bernhard") dolphin(4579) MetaDataWidget::setFile: KUrl("file:///home/bernhard") ASSERT: "!icon.isNull()" in file /build/buildd/kde4libs-4.1.1+really4.1.1/kio/kio/kdirmodel.cpp, line 558 KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = dolphin path = <unknown> pid = 4579 sock_file=/home/bernhard/.kde4/socket-bernhard-laptop/kdeinit4__0 *** Bug 171327 has been marked as a duplicate of this bug. *** *** Bug 171471 has been marked as a duplicate of this bug. *** Bug confirmed in KDE 4.1.2 on Debian No crash here. Is your Qt compiled without GIF support, maybe? That would explain why the image can't be loaded, and the preview empty. (Of course the real fix is to avoid calling setData with a null icon in that case) Created attachment 27662 [details]
Killer PNG
This PNG makes Dolphin crash
It's not a GIF in my case, it's a PNG. It made dolphin crash when trying to display my home directory (annoying). Putting it all alone in an empty directory also makes dolphin crash - see attachment "Killer PNG". I'll add that my Dolphin can display JPEGs just fine. GIFs are OK too. Some PNGs seem to work (see attachment "Good Boy PNG"). Dolphin's view mode is set as 'Details' (I can attach the rc file if useful). Created attachment 27663 [details]
Good boy PNG
This PNG does NOT make Dolphin crash
Comment 15: Have you tried to reproduce in trunk or 4.1.x, David? It works for me in trunk, but not in 4.1.1 (see my comment 8), I think I even found the commit that fixes it (although it might be that the bug is still there and only hidden now). It's got nothing to do with .gif support, we have .jpg and .png test cases as well. All the problematic images seem to have in common that they are either very broad or very high, i.e., quite far away from the square-shape that would be better suited to preview icons. I can confirm that the .gif that was causing me troubles had unsquare-y dimensions, as well (1x119). Emmanuel's .png also crashed Dolphin. It did not crash while I was in icon mode, but did crash when I turned it back to details mode. I am using 4.1.1. I tried "killer png" with dolphin from 4.1.x branch, no crash. Tried hovering, previews, details mode, no crash. I think this means the bug has been fixed after the 4.1.1 release. I'm still getting the crash (with all 3 files attached to this report) after the update to 4.1.2 (Kubuntu, using Qt 4.4.1). I got a crash in 4.1.2 (on OpenSUSE 11.0) when Dolphin tried to render a PGN image that was simultaneously being written by another another application. So I think one way to recreate the problem is to have a small app that progressively writes a PGN image while having Dolphin open in the same directory. *** Bug 172146 has been marked as a duplicate of this bug. *** (note to developers about importance of this bug: you know that each (duplicate) report probably counts for 500 crashes, right?) It seems the code that produces thumbnails breaks, especially on corrupt files or producing small thumbnails from giant images. anyways while i do not see the assertion in xsession-errors file, konqueror does crash after a few seconds browsing my home dir so i continue using konq3 until someone has solved this. *** Bug 171345 has been marked as a duplicate of this bug. *** *** Bug 172370 has been marked as a duplicate of this bug. *** SVN commit 871813 by ppenz: Workaround for a crash when converting valid QPixmaps having a huge width to a QIcon (-> QIcon::isNull() will return true). I did not have the time for a more detailed analyzes, but this issue does not occur on trunk with a recent Qt/KDE version; so no forward port to trunk is done. BUG: 170547 M +4 -1 iconmanager.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=871813 *** Bug 162886 has been marked as a duplicate of this bug. *** *** Bug 172822 has been marked as a duplicate of this bug. *** With KDE 4.1.3 (Debian), this issue seems solved. The 'killer' PNG doesn't crash Dolphin anymore - Dolphin seems to detect the odd dimensions and displays an icon instead of a preview, which is a desirable behaviour, since the preview would be barely or not at all visible anyway. *** Bug 174969 has been marked as a duplicate of this bug. *** It's back again! Folder views crash with smallest icon size. Here's backtraces from columns and details view, occurs when reducing the icon size to minimum (16²). I should say this occurs with most recent checkouts from linux kernel, XOrg, QT4.5 and KDE4 svn/git (bleeeding edge ;) Application: Konqueror (konqueror), signal SIGABRT 0x00007fd0f6866d91 in nanosleep () from /lib64/libc.so.6 Thread 1 (Thread 0x7fd0fbe89750 (LWP 31710)): [KCrash Handler] #5 0x00007fd0f67f91f5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #6 0x00007fd0f67fa713 in *__GI_abort () at abort.c:88 #7 0x00007fd0f923252d in qt_message_output () from /usr/lib64/qt4/libQtCore.so.4 #8 0x00007fd0f9232640 in qFatal () from /usr/lib64/qt4/libQtCore.so.4 #9 0x00007fd0fab480d9 in KDirModel::setData () from /usr/kde/svn/lib64/libkio.so.5 #10 0x00007fd0eade758d in KFilePreviewGenerator::Private::dispatchPreviewQueue () from /usr/kde/svn/lib64/libkfile.so.4 #11 0x00007fd0eade7f81 in KFilePreviewGenerator::qt_metacall () from /usr/kde/svn/lib64/libkfile.so.4 #12 0x00007fd0f932a9d6 in QObject::event () from /usr/lib64/qt4/libQtCore.so.4 #13 0x00007fd0f860815d in QApplicationPrivate::notify_helper () from /usr/lib64/qt4/libQtGui.so.4 #14 0x00007fd0f861095e in QApplication::notify () from /usr/lib64/qt4/libQtGui.so.4 #15 0x00007fd0fa0e47ae in KApplication::notify () from /usr/kde/svn/lib64/libkdeui.so.5 #16 0x00007fd0f931a723 in QCoreApplication::notifyInternal () from /usr/lib64/qt4/libQtCore.so.4 #17 0x00007fd0f931de5d in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib64/qt4/libQtCore.so.4 #18 0x00007fd0f93424b3 in ?? () from /usr/lib64/qt4/libQtCore.so.4 #19 0x00007fd0f53ccfc1 in IA__g_main_context_dispatch (context=0x626d90) at gmain.c:2144 #20 0x00007fd0f53d069d in g_main_context_iterate (context=0x626d90, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2778 #21 0x00007fd0f53d085b in IA__g_main_context_iteration (context=0x626d90, may_block=1) at gmain.c:2841 #22 0x00007fd0f934220f in QEventDispatcherGlib::processEvents () from /usr/lib64/qt4/libQtCore.so.4 #23 0x00007fd0f86920af in ?? () from /usr/lib64/qt4/libQtGui.so.4 #24 0x00007fd0f93193c2 in QEventLoop::processEvents () from /usr/lib64/qt4/libQtCore.so.4 #25 0x00007fd0f9319555 in QEventLoop::exec () from /usr/lib64/qt4/libQtCore.so.4 #26 0x00007fd0f931e116 in QCoreApplication::exec () from /usr/lib64/qt4/libQtCore.so.4 #27 0x00007fd0fba9b917 in kdemain () from /usr/kde/svn/lib64/libkdeinit4_konqueror.so #28 0x00007fd0f67e55b6 in __libc_start_main (main=0x4009a0 <_start+240>, argc=2, ubp_av=0x7fff03ee2308, init=0x4009d0 <__libc_csu_init>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff03ee22f8) at libc-start.c:226 #29 0x00000000004008d9 in _start () ---------------------------------------- Application: Konqueror (konqueror), signal SIGABRT 0x00007ffa13799d60 in __nanosleep_nocancel () from /lib64/libc.so.6 Thread 1 (Thread 0x7ffa18dbc750 (LWP 6298)): [KCrash Handler] #5 0x00007ffa1372c1f5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #6 0x00007ffa1372d713 in *__GI_abort () at abort.c:88 #7 0x00007ffa1616552d in qt_message_output () from /usr/lib64/qt4/libQtCore.so.4 #8 0x00007ffa16165640 in qFatal () from /usr/lib64/qt4/libQtCore.so.4 #9 0x00007ffa17a7b0d9 in KDirModel::setData () from /usr/kde/svn/lib64/libkio.so.5 #10 0x00007ffa07ba458d in KFilePreviewGenerator::Private::dispatchPreviewQueue () from /usr/kde/svn/lib64/libkfile.so.4 #11 0x00007ffa07ba47dc in KFilePreviewGenerator::Private::resumePreviews () from /usr/kde/svn/lib64/libkfile.so.4 #12 0x00007ffa07ba4fb1 in KFilePreviewGenerator::qt_metacall () from /usr/kde/svn/lib64/libkfile.so.4 #13 0x00007ffa16262d16 in QMetaObject::activate () from /usr/lib64/qt4/libQtCore.so.4 #14 0x00007ffa1625d6e3 in QObject::event () from /usr/lib64/qt4/libQtCore.so.4 #15 0x00007ffa1553b15d in QApplicationPrivate::notify_helper () from /usr/lib64/qt4/libQtGui.so.4 #16 0x00007ffa1554395e in QApplication::notify () from /usr/lib64/qt4/libQtGui.so.4 #17 0x00007ffa170177ae in KApplication::notify () from /usr/kde/svn/lib64/libkdeui.so.5 #18 0x00007ffa1624d723 in QCoreApplication::notifyInternal () from /usr/lib64/qt4/libQtCore.so.4 #19 0x00007ffa1627861e in ?? () from /usr/lib64/qt4/libQtCore.so.4 #20 0x00007ffa1627529d in ?? () from /usr/lib64/qt4/libQtCore.so.4 #21 0x00007ffa122fffc1 in IA__g_main_context_dispatch (context=0x626d90) at gmain.c:2144 #22 0x00007ffa1230369d in g_main_context_iterate (context=0x626d90, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2778 #23 0x00007ffa1230385b in IA__g_main_context_iteration (context=0x626d90, may_block=1) at gmain.c:2841 #24 0x00007ffa1627520f in QEventDispatcherGlib::processEvents () from /usr/lib64/qt4/libQtCore.so.4 #25 0x00007ffa155c50af in ?? () from /usr/lib64/qt4/libQtGui.so.4 #26 0x00007ffa1624c3c2 in QEventLoop::processEvents () from /usr/lib64/qt4/libQtCore.so.4 #27 0x00007ffa1624c555 in QEventLoop::exec () from /usr/lib64/qt4/libQtCore.so.4 #28 0x00007ffa16251116 in QCoreApplication::exec () from /usr/lib64/qt4/libQtCore.so.4 #29 0x00007ffa189ce917 in kdemain () from /usr/kde/svn/lib64/libkdeinit4_konqueror.so #30 0x00007ffa137185b6 in __libc_start_main (main=0x4009a0 <_start+240>, argc=2, ubp_av=0x7fff20e13238, init=0x4009d0 <__libc_csu_init>, fini=<value optimized out>, rtld_fini=<value optimized out>, stack_end=0x7fff20e13228) at libc-start.c:226 #31 0x00000000004008d9 in _start () (In reply to comment #33) > It's back again! Marcel, your backtrace is a bit different from the one of the original crash, it looks pretty much like the one Darío posted in http://bugs.kde.org/show_bug.cgi?id=175396#c3, maybe it's the same issue (I couldn't reproduce that in trunk so far though). Created attachment 29567 [details]
fix the crash in dolphin kpart
Ok well the workaround in #28 only removes the problem in dolphin, not in the kpart embedded in konqueror. Also that file went away in 4.2... So here's a fix that sets the icon to the default filetype icon if the scaled thumbnail has a null dimension (else there might occur visual glitch).
Created attachment 29568 [details]
better fix
Thinking about that other bug mentioned, this is a better fix.
Thanks Marcel for the patch. The patch in comment #28 also works for Konqueror, but it has not been applied on trunk as it was not reproducible there (at least with a recent Qt 4.4 version). I'm not sure whether the correct fix should be done in KDirModel or whether the patch in comment #28 should be applied to kdelibs/kfile/kfilepreviewgenerator.cpp (= kdebase/apps/dolphin/src/iconmanager.cpp in KDE 4.1). I think your patch for KDirModel should be applied, as setting a null-icon with setData() should be possible IMO. @David: do you have any objections to apply the "better fix" patch? SVN commit 900875 by dfaure: Allow to revert from preview to normal-icon using setData(DecorationRole, QIcon()). I don't think the setPreview(KIcon(node->item().iconName())) is needed; this KIcon is exactly what data(DecorationRole) returns when the preview is null, so no need to store it explicitely, right? CCBUG: 170547 M +0 -1 kdirmodel.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=900875 |