Bug 228119

Summary: Font manager crashed when deleting a font
Product: [Applications] systemsettings Reporter: benpro <benpro82>
Component: kcm_fontinstAssignee: Craig Drummond <craig>
Status: RESOLVED FIXED    
Severity: crash CC: rein.vande.velde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: New crash information added by DrKonqi

Description benpro 2010-02-22 23:03:50 UTC
Application: systemsettings (1.0)
KDE Platform Version: 4.4.00 (KDE 4.4.0)
Qt Version: 4.6.2
Operating System: Linux 2.6.32-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
All is in the title. I've deleted a font and the font manager crashed. I've deleted many fonts in the past so the bug is not recurrent.

 -- Backtrace:
Application: Configuration du système (systemsettings), signal: Segmentation fault
[KCrash Handler]
#5  QHash<QModelIndex, QPersistentModelIndexData*>::isEmpty (this=0x98, akey=...) at ../../include/QtCore/../../src/corelib/tools/qhash.h:293
#6  QHash<QModelIndex, QPersistentModelIndexData*>::remove (this=0x98, akey=...) at ../../include/QtCore/../../src/corelib/tools/qhash.h:779
#7  0x00007f2a339d6468 in QAbstractItemModelPrivate::removePersistentIndexData (this=0x0, data=0x1ee7e00) at kernel/qabstractitemmodel.cpp:542
#8  0x00007f2a339d67f9 in QPersistentModelIndexData::destroy (data=0x1ee7e00) at kernel/qabstractitemmodel.cpp:83
#9  0x00007f2a339d693f in ~QPersistentModelIndex (this=0x1bd6140, __in_chrg=<value optimized out>) at kernel/qabstractitemmodel.cpp:155
#10 0x00007f2a3390924d in QHashData::free_helper (this=0x1ee79a0, node_delete=0x7f2a34b3e2c0 <QHash<QPersistentModelIndex, QHashDummyValue>::deleteNode2(QHashData::Node*)>) at tools/qhash.cpp:275
#11 0x00007f2a34b3f573 in QTreeViewPrivate::~QTreeViewPrivate() () from /usr/lib/libQtGui.so.4
#12 0x00007f2a339f7636 in QScopedPointerDeleter<QObjectData>::cleanup (this=<value optimized out>, __in_chrg=<value optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:62
#13 ~QScopedPointer (this=<value optimized out>, __in_chrg=<value optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:100
#14 ~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:992
#15 0x00007f2a3462cabe in ~QWidget (this=0x16b9ba0, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1485
#16 0x00007f2a247bb99e in ?? () from /usr/lib/kde4/kcm_fontinst.so
#17 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1bdbc80) at kernel/qobject.cpp:1986
#18 0x00007f2a3462ca35 in ~QWidget (this=0x1be7220, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#19 0x00007f2a34a2a3d0 in ~QSplitter (this=0x1be7220, __in_chrg=<value optimized out>) at widgets/qsplitter.cpp:1029
#20 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1be8250) at kernel/qobject.cpp:1986
#21 0x00007f2a3462bf45 in ~QWidget (this=0x1bebaf0, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#22 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1be2690) at kernel/qobject.cpp:1986
#23 0x00007f2a3462ca35 in ~QWidget (this=0x1beab40, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#24 0x00007f2a34a2a3d0 in ~QSplitter (this=0x1beab40, __in_chrg=<value optimized out>) at widgets/qsplitter.cpp:1029
#25 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1c031c0) at kernel/qobject.cpp:1986
#26 0x00007f2a3462ca35 in ~QWidget (this=0x1c03090, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#27 0x00007f2a247c7577 in ?? () from /usr/lib/kde4/kcm_fontinst.so
#28 0x00007f2a3592c4d4 in KCModuleProxy::deleteClient() () from /usr/lib/libkutils.so.4
#29 0x00007f2a3592c696 in KCModuleProxy::~KCModuleProxy() () from /usr/lib/libkutils.so.4
#30 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1b369e0) at kernel/qobject.cpp:1986
#31 0x00007f2a3462bf45 in ~QWidget (this=0x1b5baf0, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#32 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1c03660) at kernel/qobject.cpp:1986
#33 0x00007f2a3462ca35 in ~QWidget (this=0x1b34da0, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#34 0x00007f2a34a5ade1 in ~QScrollArea (this=0x98, __in_chrg=<value optimized out>) at widgets/qscrollarea.cpp:176
#35 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1a63e80) at kernel/qobject.cpp:1986
#36 0x00007f2a3462ca35 in ~QWidget (this=0x1a63e40, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#37 0x00007f2a35310ffe in ?? () from /usr/lib/libkdeui.so.5
#38 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1a63880) at kernel/qobject.cpp:1986
#39 0x00007f2a3462ca35 in ~QWidget (this=0x1a63840, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#40 0x00007f2a35314881 in KPageWidget::~KPageWidget() () from /usr/lib/libkdeui.so.5
#41 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1a633a0) at kernel/qobject.cpp:1986
#42 0x00007f2a3462ca35 in ~QWidget (this=0x1a63360, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#43 0x00007f2a356f9cb3 in ModuleView::~ModuleView() () from /usr/lib/libsystemsettingsview.so.1
#44 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1a62f30) at kernel/qobject.cpp:1986
#45 0x00007f2a3462ca35 in ~QWidget (this=0x1a56cb0, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#46 0x00007f2a34a2c041 in ~QStackedWidget (this=0x98, __in_chrg=<value optimized out>) at widgets/qstackedwidget.cpp:151
#47 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x177d0c0) at kernel/qobject.cpp:1986
#48 0x00007f2a3462ca35 in ~QWidget (this=0x1784080, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#49 0x00007f2a34a2c041 in ~QStackedWidget (this=0x98, __in_chrg=<value optimized out>) at widgets/qstackedwidget.cpp:151
#50 0x00007f2a339f054c in QObjectPrivate::deleteChildren (this=0x1794a80) at kernel/qobject.cpp:1986
#51 0x00007f2a3462ca35 in ~QWidget (this=0x1783880, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1469
#52 0x00007f2a353af825 in KMainWindow::~KMainWindow() () from /usr/lib/libkdeui.so.5
#53 0x000000000040b7a6 in _start ()

Reported using DrKonqi
Comment 1 Craig Drummond 2011-06-28 18:24:24 UTC
Git commit fa685cee73c50bde3b3782b2d849f814fb613ca2 by Craig Drummond.
Committed on 28/06/2011 at 20:11.
Pushed by craig into branch 'KDE/4.6'.

Use beginInsertRows/endInsertRows and beginRemoveRows/endRemoveRows as detailed in the QAbstractItemModel documentation. Should fix the crashes, which were probbably caused by the model not indicating properly when it changed.
BUG:191304
BUG:228119
BUG:260955

M  +27   -36   kcontrol/kfontinst/kcmfontinst/FontList.cpp     
M  +3    -1    kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp     

http://commits.kde.org/kde-workspace/fa685cee73c50bde3b3782b2d849f814fb613ca2
Comment 2 Craig Drummond 2011-06-28 18:24:24 UTC
Git commit c17cc70b6802740f18b7c1c8f468722d8423dcca by Craig Drummond.
Committed on 28/06/2011 at 20:14.
Pushed by craig into branch 'KDE/4.7'.

Use beginInsertRows/endInsertRows and beginRemoveRows/endRemoveRows as detailed in the QAbstractItemModel documentation. Should fix the crashes, which were probbably caused by the model not indicating properly when it changed.
BUG:191304
BUG:228119
BUG:260955

M  +27   -36   kcontrol/kfontinst/kcmfontinst/FontList.cpp     
M  +3    -1    kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp     

http://commits.kde.org/kde-workspace/c17cc70b6802740f18b7c1c8f468722d8423dcca
Comment 3 Craig Drummond 2011-06-28 18:24:27 UTC
Git commit ea1091a64c2c0891b5104c773a06944a5184d428 by Craig Drummond.
Committed on 28/06/2011 at 20:16.
Pushed by craig into branch 'master'.

Use beginInsertRows/endInsertRows and beginRemoveRows/endRemoveRows as detailed in the QAbstractItemModel documentation. Should fix the crashes, which were probbably caused by the model not indicating properly when it changed.
BUG:191304
BUG:228119
BUG:260955

M  +27   -36   kcontrol/kfontinst/kcmfontinst/FontList.cpp     
M  +3    -1    kcontrol/kfontinst/kcmfontinst/KCmFontInst.cpp     

http://commits.kde.org/kde-workspace/ea1091a64c2c0891b5104c773a06944a5184d428
Comment 4 reinvdvelde 2011-09-15 18:03:23 UTC
Created attachment 63672 [details]
New crash information added by DrKonqi

systemsettings (1.0) on KDE Platform 4.6.2 (4.6.2) using Qt 4.7.2

- What I was doing when the application crashed:
Using System Settings > Fonts Installation I removed the font Arial Black ttf.
Then I checked wether I had all the MS Windows Arial**.ttf fonts installed by trying
to copy them from the MS Windows system disk and skipped them one by one every
time the system reported that it was already present on my system.

-- Backtrace (Reduced):
#6  isEmpty (this=0x98, akey=...) at ../../include/QtCore/../../src/corelib/tools/qhash.h:293
#7  QHash<QModelIndex, QPersistentModelIndexData*>::remove (this=0x98, akey=...) at ../../include/QtCore/../../src/corelib/tools/qhash.h:784
#8  0x00007f4c756ac8ac in QAbstractItemModelPrivate::removePersistentIndexData (this=0x0, data=0x19e8c60) at kernel/qabstractitemmodel.cpp:542
#9  0x00007f4c756acaf9 in QPersistentModelIndexData::destroy (data=<value optimized out>) at kernel/qabstractitemmodel.cpp:83
#10 0x00007f4c756acc3f in QPersistentModelIndex::~QPersistentModelIndex (this=0x19d5808, __in_chrg=<value optimized out>) at kernel/qabstractitemmodel.cpp:155