Summary: | crash when opening settings | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | nucleo <nucleo> |
Component: | Setup-Collections | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | amantia, caulier.gilles, cfeck, demm, kristian.hermann.karl, rdieter, tpr |
Priority: | NOR | ||
Version: | 3.5.0 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.0.0 | |
Sentry Crash Report: |
Description
nucleo
2013-12-09 15:14:34 UTC
Sound like a problem with widget style. It crash in Qt (QFont class)... It's not a digiKam problem. Perhaps a binary compatibility issue on your computer due to recent update. Check your system... (In reply to comment #1) > It's not a digiKam problem. Perhaps a binary compatibility issue on your > computer due to recent update. > > Check your system... This is impossible, all components have exact version dependencies on qt and kde libs. All libs used at build time are actually installed. [17:11:14] <@Kevin_Kofler> nucleo: Infinite recursion… I think the model for that tree view is wrong. [17:11:43] <@Kevin_Kofler> nucleo: I don't know where it comes from, if it's a stock model (like KDirItemModel or how it's called) or something from Digikam. yes, but here it do not crash. Some it's not a the real problem. Check your Qt/KDE widget style... Gilles Caulier Maybe this problem specific to KDE 4.11.97? I downgraded digiKam to 3.5.0 that also built against 4.11.97 and it also crashes. Yes, probably KDELibs bugs : /usr/src/debug/kdelibs-4.11.97/kdeui/itemviews/kwidgetitemdelegate.cpp:166 Gilles Caulier Then reassign bug to kdelibs? Re-assigned to kdelibs The problem is caused by KWidgetItemDelegatePrivate::initializeModel(const QModelIndex &parent) calling itself again when the model returns ok for hasChildren. if (index.isValid() && model->hasChildren(index)) { initializeModel(index); } In this case Digikam::SetupCollectionModel doesn't reimplement hasChildren, it will fall back to call this: bool QAbstractItemModel::hasChildren(const QModelIndex &parent) const { return (rowCount(parent) > 0) && (columnCount(parent) > 0); } And while parent.row() == 0 and it's checking against Item::parentId, which most likely is zero for your collection and then the same thing again. I would say that this sounds more like a bug in digikam's model than in kdelibs. Or should initializeModel() check that the index is not completely the same before calling itself again? Here's some printf-debugging output I was using: digikam(6267)/digikam (core) Digikam::SetupCollectionModel::rowCount: QModelIndex(0,0,0xffffffffffffffff,Digikam::SetupCollectionModel(0x51f2540) ) digikam(6267)/digikam (core) Digikam::SetupCollectionModel::rowCount: internalId: -1 digikam(6267)/digikam (core) Digikam::SetupCollectionModel::rowCount: parentId: 0 digikam(6267)/digikam (core) Digikam::SetupCollectionModel::rowCount: QModelIndex(0,0,0xffffffffffffffff,Digikam::SetupCollectionModel(0x51f2540) ) digikam(6267)/digikam (core) Digikam::SetupCollectionModel::rowCount: internalId: -1 digikam(6267)/digikam (core) Digikam::SetupCollectionModel::rowCount: parentId: 0 digikam(6267)/digikam (core) Digikam::SetupCollectionModel::rowCount: QModelIndex(0,0,0xffffffffffffffff,Digikam::SetupCollectionModel(0x51f2540) ) digikam(6267)/digikam (core) Digikam::SetupCollectionModel::rowCount: internalId: -1 digikam(6267)/digikam (core) Digikam::SetupCollectionModel::rowCount: parentId: 0 parentId is just index.row() here. And in my collection (due to because it's a local one) the parentId inside of Item is set to 0. foreach(const Item& item, m_collections) { if (!item.deleted && item.parentId == parentId) { ++rowCount; } } As requested on IRC by teprrr, I can confirm this bug with digikam 3.5.0 and kdelibs 4.11.97. http://pastebin.kde.org/pkrglow9p This segfault/crash does NOT happen on a system with the same distro, same Qt4, gcc, and digikam, only that system runs 4.11.4. Digikam build for that version (just to be clear, digikam was rebuild for 4.11 beta1). Issue is fixed here with kdelibs 4.12.0 build. Thanks for your feedback Gilles Caulier *** Bug 328835 has been marked as a duplicate of this bug. *** I confirm that no crash with kdelibs-4.12.0. |