Application: korganizer () Qt Version: 5.4.2 Operating System: Linux 4.2.0-18-generic x86_64 Distribution: Ubuntu 15.10 -- Information about the crash: - What I was doing when the application crashed: akonadictl restart Reproduce: * start korganizer * open a konsole window * run akonadictl restart -> korganizer crashes The crash can be reproduced every time. -- Backtrace: Application: korganizer (korganizer), signal: Segmentation fault Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [KCrash Handler] #6 0x00007f03b6936e40 in QVector<QSharedPointer<KCalCore::Incidence> >::reserve(int) (this=<optimized out>, asize=asize@entry=0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qvector.h:363 #7 0x00007f03b6932a0e in KCalCore::Calendar::setupRelations(QSharedPointer<KCalCore::Incidence> const&) (this=0x21da4b0, forincidence=...) at ../../src/calendar.cpp:1032 #8 0x00007f03b697107c in KCalCore::MemoryCalendar::addIncidence(QSharedPointer<KCalCore::Incidence> const&) (this=0x21da4b0, incidence=...) at ../../src/memorycalendar.cpp:305 #9 0x00007f03b21f764c in Akonadi::CalendarBasePrivate::internalInsert(Akonadi::Item const&) (this=this@entry=0x21da530, item=...) at ../../src/calendarbase.cpp:158 #10 0x00007f03b2205520 in Akonadi::ETMCalendarPrivate::itemsAdded(QVector<Akonadi::Item> const&) (this=this@entry=0x21da530, items=...) at ../../src/etmcalendar.cpp:290 #11 0x00007f03b2206822 in Akonadi::ETMCalendarPrivate::onRowsInsertedInFilteredModel(QModelIndex const&, int, int) (this=0x21da530, index=..., start=<optimized out>, end=<optimized out>) at ../../src/etmcalendar.cpp:445 #12 0x00007f03b2207de5 in Akonadi::ETMCalendarPrivate::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x21da530, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=22, _a=_a@entry=0x7ffea6794820) at ./moc_etmcalendar_p.cpp:281 #13 0x00007f03b4a7c78a in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x21e54d0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6794820) at kernel/qobject.cpp:3717 #14 0x00007f03b4a7cf87 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x21e54d0, m=m@entry=0x7f03b4c7ee40 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6794820) at kernel/qobject.cpp:3582 #15 0x00007f03b4af3874 in QAbstractItemModel::rowsInserted(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal) (this=this@entry=0x21e54d0, _t1=..., _t2=0, _t3=61) at .moc/moc_qabstractitemmodel.cpp:428 #16 0x00007f03b49f4f16 in QAbstractItemModel::endInsertRows() (this=this@entry=0x21e54d0) at itemmodels/qabstractitemmodel.cpp:2623 #17 0x00007f03b4a16693 in QSortFilterProxyModelPrivate::insert_source_items(QVector<int>&, QVector<int>&, QVector<int> const&, QModelIndex const&, Qt::Orientation, bool) (this=this@entry=0x21e6220, source_to_proxy=..., proxy_to_source=..., source_items=..., source_parent=..., emit_signal=emit_signal@entry=true, orient=Qt::Vertical) at itemmodels/qsortfilterproxymodel.cpp:713 #18 0x00007f03b4a19984 in QSortFilterProxyModelPrivate::_q_sourceRowsInserted(QModelIndex const&, int, int) (orient=Qt::Vertical, end=<optimized out>, start=<optimized out>, source_parent=..., this=0x21e6220) at itemmodels/qsortfilterproxymodel.cpp:824 #19 0x00007f03b4a19984 in QSortFilterProxyModelPrivate::_q_sourceRowsInserted(QModelIndex const&, int, int) (this=0x21e6220, source_parent=..., start=<optimized out>, end=<optimized out>) at itemmodels/qsortfilterproxymodel.cpp:1379 #20 0x00007f03b4a7c78a in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x21add40, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6794b70) at kernel/qobject.cpp:3717 #21 0x00007f03b4a7cf87 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x21add40, m=m@entry=0x7f03b4c7ee40 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6794b70) at kernel/qobject.cpp:3582 #22 0x00007f03b4af3874 in QAbstractItemModel::rowsInserted(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal) (this=this@entry=0x21add40, _t1=..., _t2=0, _t3=61) at .moc/moc_qabstractitemmodel.cpp:428 #23 0x00007f03b49f4f16 in QAbstractItemModel::endInsertRows() (this=this@entry=0x21add40) at itemmodels/qabstractitemmodel.cpp:2623 #24 0x00007f03b4a16693 in QSortFilterProxyModelPrivate::insert_source_items(QVector<int>&, QVector<int>&, QVector<int> const&, QModelIndex const&, Qt::Orientation, bool) (this=this@entry=0x21e39e0, source_to_proxy=..., proxy_to_source=..., source_items=..., source_parent=..., emit_signal=emit_signal@entry=true, orient=Qt::Vertical) at itemmodels/qsortfilterproxymodel.cpp:713 #25 0x00007f03b4a19984 in QSortFilterProxyModelPrivate::_q_sourceRowsInserted(QModelIndex const&, int, int) (orient=Qt::Vertical, end=<optimized out>, start=<optimized out>, source_parent=..., this=0x21e39e0) at itemmodels/qsortfilterproxymodel.cpp:824 #26 0x00007f03b4a19984 in QSortFilterProxyModelPrivate::_q_sourceRowsInserted(QModelIndex const&, int, int) (this=0x21e39e0, source_parent=..., start=<optimized out>, end=<optimized out>) at itemmodels/qsortfilterproxymodel.cpp:1379 #27 0x00007f03b4a7c78a in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x21ade20, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6794ec0) at kernel/qobject.cpp:3717 #28 0x00007f03b4a7cf87 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x21ade20, m=m@entry=0x7f03b4c7ee40 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6794ec0) at kernel/qobject.cpp:3582 #29 0x00007f03b4af3874 in QAbstractItemModel::rowsInserted(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal) (this=this@entry=0x21ade20, _t1=..., _t2=0, _t3=61) at .moc/moc_qabstractitemmodel.cpp:428 #30 0x00007f03b49f4f16 in QAbstractItemModel::endInsertRows() (this=this@entry=0x21ade20) at itemmodels/qabstractitemmodel.cpp:2623 #31 0x00007f03b4a16693 in QSortFilterProxyModelPrivate::insert_source_items(QVector<int>&, QVector<int>&, QVector<int> const&, QModelIndex const&, Qt::Orientation, bool) (this=this@entry=0x21e25e0, source_to_proxy=..., proxy_to_source=..., source_items=..., source_parent=..., emit_signal=emit_signal@entry=true, orient=Qt::Vertical) at itemmodels/qsortfilterproxymodel.cpp:713 #32 0x00007f03b4a19984 in QSortFilterProxyModelPrivate::_q_sourceRowsInserted(QModelIndex const&, int, int) (orient=Qt::Vertical, end=<optimized out>, start=<optimized out>, source_parent=..., this=0x21e25e0) at itemmodels/qsortfilterproxymodel.cpp:824 #33 0x00007f03b4a19984 in QSortFilterProxyModelPrivate::_q_sourceRowsInserted(QModelIndex const&, int, int) (this=0x21e25e0, source_parent=..., start=<optimized out>, end=<optimized out>) at itemmodels/qsortfilterproxymodel.cpp:1379 #34 0x00007f03b4a7c78a in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x21b5730, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6795210) at kernel/qobject.cpp:3717 #35 0x00007f03b4a7cf87 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x21b5730, m=m@entry=0x7f03b4c7ee40 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6795210) at kernel/qobject.cpp:3582 #36 0x00007f03b4af3874 in QAbstractItemModel::rowsInserted(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal) (this=this@entry=0x21b5730, _t1=..., _t2=6, _t3=67) at .moc/moc_qabstractitemmodel.cpp:428 #37 0x00007f03b49f4f16 in QAbstractItemModel::endInsertRows() (this=this@entry=0x21b5730) at itemmodels/qabstractitemmodel.cpp:2623 #38 0x00007f03b07dec90 in KDescendantsProxyModelPrivate::processPendingParents() (this=this@entry=0x21efa70) at ../../src/kdescendantsproxymodel.cpp:159 #39 0x00007f03b07df597 in KDescendantsProxyModelPrivate::sourceRowsInserted(QModelIndex const&, int, int) (this=0x21efa70) at ../../src/kdescendantsproxymodel.cpp:116 #40 0x00007f03b07df597 in KDescendantsProxyModelPrivate::sourceRowsInserted(QModelIndex const&, int, int) (this=0x21efa70, parent=..., start=<optimized out>, end=61) at ../../src/kdescendantsproxymodel.cpp:567 #41 0x00007f03b4a7c78a in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x2174e20, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6795610) at kernel/qobject.cpp:3717 #42 0x00007f03b4a7cf87 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x2174e20, m=m@entry=0x7f03b4c7ee40 <QAbstractItemModel::staticMetaObject>, local_signal_index=local_signal_index@entry=10, argv=argv@entry=0x7ffea6795610) at kernel/qobject.cpp:3582 #43 0x00007f03b4af3874 in QAbstractItemModel::rowsInserted(QModelIndex const&, int, int, QAbstractItemModel::QPrivateSignal) (this=this@entry=0x2174e20, _t1=..., _t2=0, _t3=61) at .moc/moc_qabstractitemmodel.cpp:428 #44 0x00007f03b49f4f16 in QAbstractItemModel::endInsertRows() (this=this@entry=0x2174e20) at itemmodels/qabstractitemmodel.cpp:2623 #45 0x00007f03b0b89d3a in Akonadi::EntityTreeModelPrivate::itemsFetched(long long, QVector<Akonadi::Item> const&) (this=this@entry=0x21dfc10, collectionId=collectionId@entry=121, items=...) at ../../../../akonadi/src/core/models/entitytreemodel_p.cpp:571 #46 0x00007f03b0b89e69 in Akonadi::EntityTreeModelPrivate::itemsFetched(QVector<Akonadi::Item> const&) (this=0x21dfc10, items=...) at ../../../../akonadi/src/core/models/entitytreemodel_p.cpp:488 #47 0x00007f03b4a7c78a in QMetaObject::activate(QObject*, int, int, void**) (sender=sender@entry=0x2980b50, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffea6795990) at kernel/qobject.cpp:3717 #48 0x00007f03b4a7cf87 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x2980b50, m=m@entry=0x7f03b0e1ccc0 <Akonadi::ItemFetchJob::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7ffea6795990) at kernel/qobject.cpp:3582 #49 0x00007f03b0b33c42 in Akonadi::ItemFetchJob::itemsReceived(QVector<Akonadi::Item> const&) (this=this@entry=0x2980b50, _t1=...) at ./moc_itemfetchjob.cpp:162 #50 0x00007f03b0b35abf in Akonadi::ItemFetchJobPrivate::aboutToFinish() (this=<optimized out>) at ../../../../akonadi/src/core/jobs/itemfetchjob.cpp:77 #51 0x00007f03b0b35abf in Akonadi::ItemFetchJobPrivate::aboutToFinish() (this=0x283d520) at ../../../../akonadi/src/core/jobs/itemfetchjob.cpp:67 #52 0x00007f03b0b3e3f2 in Akonadi::Job::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (this=<optimized out>) at ../../../../akonadi/src/core/jobs/job.cpp:152 #53 0x00007f03b0b3e3f2 in Akonadi::Job::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./moc_job.cpp:107 #54 0x00007f03b4a7d651 in QObject::event(QEvent*) (this=0x2980b50, e=<optimized out>) at kernel/qobject.cpp:1245 #55 0x00007f03b57d0b8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x2078c00, receiver=receiver@entry=0x2980b50, e=e@entry=0x29358c0) at kernel/qapplication.cpp:3720 #56 0x00007f03b57d6230 in QApplication::notify(QObject*, QEvent*) (this=0x7ffea6796070, receiver=0x2980b50, e=0x29358c0) at kernel/qapplication.cpp:3503 #57 0x00007f03b4a4bf1b in QCoreApplication::notifyInternal(QObject*, QEvent*) (this=0x7ffea6796070, receiver=0x2980b50, event=event@entry=0x29358c0) at kernel/qcoreapplication.cpp:935 #58 0x00007f03b4a4e057 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (event=0x29358c0, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:228 #59 0x00007f03b4a4e057 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x2055ed0) at kernel/qcoreapplication.cpp:1552 #60 0x00007f03b4a4e588 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1410 #61 0x00007f03b4aa2e73 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x20a92c0) at kernel/qeventdispatcher_glib.cpp:271 #62 0x00007f03aae70ff7 in g_main_context_dispatch (context=0x7f038c0016f0) at /build/glib2.0-ajuDY6/glib2.0-2.46.1/./glib/gmain.c:3154 #63 0x00007f03aae70ff7 in g_main_context_dispatch (context=context@entry=0x7f038c0016f0) at /build/glib2.0-ajuDY6/glib2.0-2.46.1/./glib/gmain.c:3769 #64 0x00007f03aae71250 in g_main_context_iterate (context=context@entry=0x7f038c0016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-ajuDY6/glib2.0-2.46.1/./glib/gmain.c:3840 #65 0x00007f03aae712fc in g_main_context_iteration (context=0x7f038c0016f0, may_block=may_block@entry=1) at /build/glib2.0-ajuDY6/glib2.0-2.46.1/./glib/gmain.c:3901 #66 0x00007f03b4aa327f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x20a92a0, flags=...) at kernel/qeventdispatcher_glib.cpp:418 #67 0x00007f03b4a4975a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffea6795f50, flags=..., flags@entry=...) at kernel/qeventloop.cpp:204 #68 0x00007f03b4a512cc in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1188 #69 0x00007f03b4d6600c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1510 #70 0x00007f03b57cd025 in QApplication::exec() () at kernel/qapplication.cpp:2956 #71 0x000000000040971a in main(int, char**) (argc=1, argv=0x7ffea6796208) at ../../korganizer/main.cpp:61 Reported using DrKonqi
More specific korganzier 15.08.2does crash after: * akonadictl start or * clicking on the 'Start' button in the center of grey area, that korganizer shows when akonadi is stopped. [kmail and kaddressbook survive a akonadi restart]
Also happens when disabling/re-enabling some calendars, same backtrace.
*** Bug 358152 has been marked as a duplicate of this bug. ***
*** Bug 362012 has been marked as a duplicate of this bug. ***
*** Bug 362183 has been marked as a duplicate of this bug. ***
*** Bug 362724 has been marked as a duplicate of this bug. ***
I have reduced the issue to this testcase, which crashes indeed. QVector<int> vec; vec.erase(std::remove(vec.begin(), vec.end(), 42), vec.end()); vec.reserve(0);
Found a Qt bug report about this, reopened it with more details, https://bugreports.qt.io/browse/QTBUG-51758. Meanwhile it's quite pointless to do all this for an empty container, I'll add an if() in kcalcore, good for performance, not just as a workaround.
Fixed by http://commits.kde.org/kcalcore/3023b48e9782ae047c3f9edf122e1cd4958f5e82
*** Bug 351421 has been marked as a duplicate of this bug. ***
*** Bug 355142 has been marked as a duplicate of this bug. ***
*** Bug 361938 has been marked as a duplicate of this bug. ***
*** Bug 362010 has been marked as a duplicate of this bug. ***
*** Bug 362602 has been marked as a duplicate of this bug. ***
*** Bug 363547 has been marked as a duplicate of this bug. ***
*** Bug 365674 has been marked as a duplicate of this bug. ***
*** Bug 366800 has been marked as a duplicate of this bug. ***
*** Bug 368141 has been marked as a duplicate of this bug. ***
*** Bug 368285 has been marked as a duplicate of this bug. ***
*** Bug 369452 has been marked as a duplicate of this bug. ***
*** Bug 369484 has been marked as a duplicate of this bug. ***
*** Bug 371242 has been marked as a duplicate of this bug. ***
*** Bug 375787 has been marked as a duplicate of this bug. ***