Version: (using Devel) OS: Linux Installed from: Compiled sources Steps to reproduce: 1. In dolphin choose Details view 2. Go to options and make sure you have "Expanded Folders" selected Now that you have a tree view, select a folder, and press * a couple of times (* make all the nodes expand) until dolphin crashes. The problem is in kdelibs/kio/kio/kdirmodel.cpp inside KDirModel::rowCount This cast isn't safe: KDirModelDirNode* parentNode = static_cast<KDirModelDirNode *>(d->nodeForIndex(parent)) because we can't be sure if the node is a KDirModelDirNode, sometimes it isn't. Here's a patch, please review it since i'm still a newbie in this kde qt stuff :D
Created attachment 28952 [details] patch
Very good analysis of the problem. Your suggested patch calls nodeForIndex 3 times though, I'll change it to only call it once. Thanks.
SVN commit 891650 by dfaure: Fix crash when rowCount is called on a file, like when typing '*' in a treeview. BUG: 176555 M +5 -1 kio/kdirmodel.cpp M +4 -0 tests/kdirmodeltest.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=891650
*** Bug 34399 has been marked as a duplicate of this bug. ***