Bug 285962 - Crash in korganizer when quitting with kquitapp
Summary: Crash in korganizer when quitting with kquitapp
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 279842 290486 292728 298073 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-07 07:50 UTC by David E. Narvaez
Modified: 2012-04-29 13:10 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7.4


Attachments
New crash information added by DrKonqi (2.40 KB, text/plain)
2011-11-16 16:36 UTC, GGG
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David E. Narvaez 2011-11-07 07:50:38 UTC
Application: korganizer (4.8 pre-git-719de66 (2011-11-06))
KDE Platform Version: 4.7.3 (4.7.3) (Compiled from sources)
Qt Version: 4.7.4
Operating System: Linux 3.0.3-gentoo-libre x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
- What I was doing when the application crashed:

Open KOrganizer, then from a terminal do kquitapp korganizer. This is also reproducible if you log out of your session while KOrganizer is open.

While debugging, I realized this has to do with the sModel variable declared at ktodoview.cpp:66, which is destroyed before it's last access. I tried reading through the documetation of K_GLOBAL_STATIC to see if there's any evident fix that can be applied, but couldn't make any progress.

The crash can be reproduced every time.

-- Backtrace:
Application: KOrganizer (korganizer), signal: Segmentation fault
[KCrash Handler]
#6  0x00007fade97c5368 in QSortFilterProxyModelPrivate::create_mapping(QModelIndex const&) const () from /usr/lib64/qt4/libQtGui.so.4
#7  0x00007fade97c6182 in QSortFilterProxyModel::index(int, int, QModelIndex const&) const () from /usr/lib64/qt4/libQtGui.so.4
#8  0x00007fade97c2f66 in QSortFilterProxyModelPrivate::update_source_sort_column() () from /usr/lib64/qt4/libQtGui.so.4
#9  0x00007fade97c6912 in QSortFilterProxyModelPrivate::_q_clearMapping() () from /usr/lib64/qt4/libQtGui.so.4
#10 0x00007fade97c0d02 in QAbstractProxyModel::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/qt4/libQtGui.so.4
#11 0x00007fade97c98c5 in QSortFilterProxyModel::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007fadec6c9470 in KOTodoViewSortFilterProxyModel::qt_metacall (this=0x865020, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff01b640e0) at /home/david/Projects/kdepim/build/korganizer/kotodoviewsortfilterproxymodel.moc:68
#13 0x00007fade80b8907 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#14 0x00007fade80b8dff in QObject::destroyed(QObject*) () from /usr/lib64/qt4/libQtCore.so.4
#15 0x00007fade80bb187 in QObject::~QObject() () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00007fadec6beeb9 in KOTodoModel::~KOTodoModel (this=0x889d90, __in_chrg=<value optimized out>) at /home/david/Projects/kdepim/korganizer/views/todoview/kotodomodel.cpp:205
#17 0x00007fade6fe59b5 in __run_exit_handlers () from /lib64/libc.so.6
#18 0x00007fade6fe5a05 in exit () from /lib64/libc.so.6
#19 0x00007fade6fcfd24 in __libc_start_main () from /lib64/libc.so.6
#20 0x00000000004082d9 in _start ()

Reported using DrKonqi
Comment 1 Sergio Martins 2011-11-09 21:15:12 UTC
Do you have any filters set? Like filtering by category or name.

Do you have sub-todos, and does it crash without sub-todos ?

Does it crash with an empty view ?

Do you have the sidebar mini-todo-view visible? Does it crash without it being visible ?
Comment 2 David E. Narvaez 2011-11-09 21:28:16 UTC
(In reply to comment #1)
> Do you have any filters set? Like filtering by category or name.

No.

> Do you have sub-todos, and does it crash without sub-todos ?

No.

> Does it crash with an empty view ?

Yes. I didn't even know about TODOs in KOrganizer until I started debugging this issues. It actually crashes even if I kquitapp while at the Calendar view without ever visiting the TODO view.

> Do you have the sidebar mini-todo-view visible? Does it crash without it being
> visible ?

Yes, I have that sidebar. I haven't tried replicating it without the sidebar. I'll try that in a couple of hours.
Comment 3 Sergio Martins 2011-11-09 21:55:38 UTC
Reproduced
Comment 4 Sergio Martins 2011-11-11 00:40:51 UTC
I opened https://bugreports.qt.nokia.com/browse/QTBUG-22667
Comment 5 Sergio Martins 2011-11-11 01:08:43 UTC
Git commit 055cd9f817a4a696121d1be55ceef68140014fae by Sergio Martins.
Committed on 11/11/2011 at 02:02.
Pushed by smartins into branch 'master'.

Workaround for Q_GLOBAL_STATIC vs K_GLOBAL_STATIC cleanup race.

QTBUG-22667
BUG: 285962

M  +3    -0    korganizer/views/todoview/kotodoview.cpp

http://commits.kde.org/kdepim/055cd9f817a4a696121d1be55ceef68140014fae
Comment 6 Sergio Martins 2011-11-11 01:10:08 UTC
Git commit bf0e259d1f5fd7ef6a423bcb33475664ddc46c38 by Sergio Martins.
Committed on 11/11/2011 at 02:02.
Pushed by smartins into branch 'KDE/4.7'.

Workaround for Q_GLOBAL_STATIC vs K_GLOBAL_STATIC cleanup race.

QTBUG-22667
BUG: 285962
(cherry picked from commit 055cd9f817a4a696121d1be55ceef68140014fae)

M  +3    -0    korganizer/views/todoview/kotodoview.cpp

http://commits.kde.org/kdepim/bf0e259d1f5fd7ef6a423bcb33475664ddc46c38
Comment 7 GGG 2011-11-16 16:36:14 UTC
Created attachment 65751 [details]
New crash information added by DrKonqi

korganizer (4.7.2- ()) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed:

Trying to exit the KDE session with korganizer active.

-- Backtrace (Reduced):
#6  0x00007fa595687898 in QSortFilterProxyModelPrivate::create_mapping (this=0x20b43a0, source_parent=...) at itemviews/qsortfilterproxymodel.cpp:324
#7  0x00007fa595688623 in QSortFilterProxyModel::index (this=<optimized out>, row=0, column=0, parent=<optimized out>) at itemviews/qsortfilterproxymodel.cpp:1640
#8  0x00007fa5956853a9 in QSortFilterProxyModelPrivate::update_source_sort_column (this=<optimized out>) at itemviews/qsortfilterproxymodel.cpp:445
#9  0x00007fa5956890e7 in QSortFilterProxyModelPrivate::_q_clearMapping (this=0x20b43a0) at itemviews/qsortfilterproxymodel.cpp:303
#10 0x00007fa595683172 in QAbstractProxyModel::qt_metacall (this=0x20b4370, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=<optimized out>) at .moc/release-shared/moc_qabstractproxymodel.cpp:72
Comment 8 Sergio Martins 2011-11-16 19:49:20 UTC
*** Bug 279842 has been marked as a duplicate of this bug. ***
Comment 9 Christophe Marin 2012-04-29 13:09:37 UTC
*** Bug 290486 has been marked as a duplicate of this bug. ***
Comment 10 Christophe Marin 2012-04-29 13:10:03 UTC
*** Bug 292728 has been marked as a duplicate of this bug. ***
Comment 11 Christophe Marin 2012-04-29 13:10:13 UTC
*** Bug 298073 has been marked as a duplicate of this bug. ***