Bug 307831 - Crash when deleting a cookie
Summary: Crash when deleting a cookie
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: 4.9.80
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 310224 310828 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-04 12:00 UTC by Christoph Feck
Modified: 2012-11-28 18:27 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.4


Attachments
proposed patch for 4.9 branch (4.99 KB, patch)
2012-10-13 15:40 UTC, Dawit Alemayehu
Details
proposed patch for 4.9 branch v2 (5.14 KB, patch)
2012-10-13 21:21 UTC, Dawit Alemayehu
Details
New crash information added by DrKonqi (7.66 KB, text/plain)
2012-10-31 17:21 UTC, Graeme Hewson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Feck 2012-10-04 12:00:43 UTC
Application: konqueror (4.9.80)
KDE Platform Version: 4.9.80 (Compiled from sources)
Qt Version: 4.8.3
Operating System: Linux 3.4.11-7-desktop i686
Distribution: "openSUSE 12.2 (i586)"

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

- open Konqueror Settings
- delete a cookie
- click Apply

=> crash

The crash can be reproduced every time.

-- Backtrace:
Application: Konqueror (kdeinit4), signal: Segmentation fault
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0xb54109c0 (LWP 30268))]

Thread 2 (Thread 0xae76eb40 (LWP 30350)):
#0  0xb770a424 in __kernel_vsyscall ()
#1  0xb5d1790b in poll () from /lib/libc.so.6
#2  0xb565b23b in g_poll () from /usr/lib/libglib-2.0.so.0
#3  0xb564caf0 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb564cc51 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0xb6c1b32f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0xb6be804c in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0xb6be8341 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0xb6ad3a5c in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0xb6bc659d in ?? () from /usr/lib/libQtCore.so.4
#10 0xb6ad6e68 in ?? () from /usr/lib/libQtCore.so.4
#11 0xb6a54e32 in start_thread () from /lib/libpthread.so.0
#12 0xb5d228ee in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb54109c0 (LWP 30268)):
[KCrash Handler]
#7  0xae92f4d6 in QTreeWidgetItem::text (this=0xa561da0, column=0) at /usr/include/QtGui/qtreewidget.h:110
#8  0xae92e131 in KCookiesPolicies::save (this=0xa4e4400) at /local/git/KDE/base/kde-baseapps/konqueror/settings/kio/kcookiespolicies.cpp:363
#9  0xae92bc44 in KCookiesMain::save (this=0xa49be18) at /local/git/KDE/base/kde-baseapps/konqueror/settings/kio/kcookiesmain.cpp:70
#10 0xb23d4bd6 in KCModuleProxy::save (this=0xa4e2200) at /local/git/KDE/libs/kdelibs/kutils/kcmoduleproxy.cpp:279
#11 0xb23d05e0 in KCMultiDialogPrivate::apply (this=0xa2a1310) at /local/git/KDE/libs/kdelibs/kutils/kcmultidialog.cpp:300
#12 0xb23d0872 in KCMultiDialog::slotApplyClicked (this=0xa28b850) at /local/git/KDE/libs/kdelibs/kutils/kcmultidialog.cpp:326
#13 0xb23d1fde in KCMultiDialog::qt_static_metacall (_o=0xa28b850, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbfc3214c) at /local/build/KDE/libs/kdelibs/kutils/kcmultidialog.moc:72
#14 0xb6c01872 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#15 0xb738b9f5 in KDialog::applyClicked (this=0xa28b850) at /local/build/KDE/libs/kdelibs/kdeui/kdialog.moc:260
#16 0xb738a44d in KDialog::slotButtonClicked (this=0xa28b850, button=8) at /local/git/KDE/libs/kdelibs/kdeui/dialogs/kdialog.cpp:888
#17 0xb738b6bf in KDialog::qt_static_metacall (_o=0xa28b850, _c=QMetaObject::InvokeMetaMethod, _id=33, _a=0xbfc322f8) at /local/build/KDE/libs/kdelibs/kdeui/kdialog.moc:167
#18 0xb6c01872 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#19 0xb6c06a55 in QSignalMapper::mapped(int) () from /usr/lib/libQtCore.so.4
#20 0xb6c06c9d in QSignalMapper::map(QObject*) () from /usr/lib/libQtCore.so.4
#21 0xb6c06dae in QSignalMapper::map() () from /usr/lib/libQtCore.so.4
#22 0xb6c07204 in ?? () from /usr/lib/libQtCore.so.4
#23 0xb6c01872 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#24 0xb67d3e6d in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4
#25 0xb64d84ed in ?? () from /usr/lib/libQtGui.so.4
#26 0xb64d8d3b in ?? () from /usr/lib/libQtGui.so.4
#27 0xb64d8ff6 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#28 0xb6113172 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#29 0xb64d83b2 in QAbstractButton::event(QEvent*) () from /usr/lib/libQtGui.so.4
#30 0xb6579d58 in QPushButton::event(QEvent*) () from /usr/lib/libQtGui.so.4
#31 0xb60b9adc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#32 0xb60befc9 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#33 0xb7440d66 in KApplication::notify (this=0xbfc333d0, receiver=0xa2ac8b0, event=0xbfc32ba4) at /local/git/KDE/libs/kdelibs/kdeui/kernel/kapplication.cpp:311
#34 0xb6be957e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#35 0xb60ba93f in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#36 0xb6143045 in ?? () from /usr/lib/libQtGui.so.4
#37 0xb6141b09 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#38 0xb616b754 in ?? () from /usr/lib/libQtGui.so.4
#39 0xb564c7d3 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#40 0xb564cb70 in ?? () from /usr/lib/libglib-2.0.so.0
#41 0xb564cc51 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#42 0xb6c1b311 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#43 0xb616b33a in ?? () from /usr/lib/libQtGui.so.4
#44 0xb6be804c in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#45 0xb6be8341 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#46 0xb6bed5fa in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#47 0xb60b7954 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#48 0xb1a6586a in kdemain (argc=2, argv=0x9ac4e78) at /local/git/KDE/base/kde-baseapps/konqueror/src/konqmain.cpp:227
#49 0x0804debc in launch (argc=2, _name=0x9ae4ab4 "/local/kde4/bin/konqueror", args=0x9ae4ad7 "", cwd=0x0, envc=0, envs=0x9ae4adb "", reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x9ae4adf "duo;1349351655;161834;30144_TIME7574344") at /local/git/KDE/libs/kdelibs/kinit/kinit.cpp:734
#50 0x0804ef23 in handle_launcher_request (sock=8, who=0x80539d4 "launcher") at /local/git/KDE/libs/kdelibs/kinit/kinit.cpp:1226
#51 0x0804f69d in handle_requests (waitForPid=0) at /local/git/KDE/libs/kdelibs/kinit/kinit.cpp:1419
#52 0x08051063 in main (argc=4, argv=0xbfc33be4, envp=0xbfc33bf8) at /local/git/KDE/libs/kdelibs/kinit/kinit.cpp:1907

Reported using DrKonqi
Comment 1 Dawit Alemayehu 2012-10-04 15:22:04 UTC
Cannot reproduce this crash. Tried multiple times and I cannot get it to crash.
Comment 2 Christoph Feck 2012-10-04 19:51:04 UTC
After having erased all cookies, I can no longer reproduce. It happened while I deleted existing cookies from KDE 4.9, which is maybe another indication that they are handled/saved differently now.
Comment 3 Dawit Alemayehu 2012-10-04 20:25:10 UTC
(In reply to comment #2)
> After having erased all cookies, I can no longer reproduce. It happened
> while I deleted existing cookies from KDE 4.9, which is maybe another
> indication that they are handled/saved differently now.

Nope. They are not. Only a new policy was added and unless you have kdelibs-4.10 branch, you will not get those necessary changes. IOW, kde-baseapps master needs to start requiring the kdelibs-4.10 branch to work properly. There is no way around it.
Comment 4 Dawit Alemayehu 2012-10-04 20:32:05 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > After having erased all cookies, I can no longer reproduce. It happened
> > while I deleted existing cookies from KDE 4.9, which is maybe another
> > indication that they are handled/saved differently now.
> 
> Nope. They are not. Only a new policy was added and unless you have
> kdelibs-4.10 branch, you will not get those necessary changes. IOW,
> kde-baseapps master needs to start requiring the kdelibs-4.10 branch to work
> properly. There is no way around it.

Hmm... but it says here that you are using 4.9.80 which means you are using kdelibs 4.10. Oh well... Can you please send me your kcookiejarrc file if you have not manually deleted that already ? I did this update and it did not seem to have affected my setup, but my global cookies policy was to accept all cookies as if they are session cookies. Perhaps different global policies and settings would cause the issues you reported here.
Comment 5 Christoph Feck 2012-10-04 21:27:11 UTC
I just got the same crash by just changing

Cookies > Policy > Default Policy

to "Reject all cookies", then hit Apply.

This at least confirms that the crash is not dependend on old files, the current "cookies" file has been entirely "collected" today.

(yes, running kdelibs 4.10 branch, master for everything else)
Comment 6 Dawit Alemayehu 2012-10-04 23:46:45 UTC
(In reply to comment #5)
> I just got the same crash by just changing
> 
> Cookies > Policy > Default Policy
> 
> to "Reject all cookies", then hit Apply.
> 
> This at least confirms that the crash is not dependend on old files, the
> current "cookies" file has been entirely "collected" today.
> 
> (yes, running kdelibs 4.10 branch, master for everything else)

OK, I can duplicate that. I will fix it.
Comment 7 Dawit Alemayehu 2012-10-05 00:20:13 UTC
Git commit a791edd3d42a9b40c2d64b39048e0260d5632891 by Dawit Alemayehu.
Committed on 05/10/2012 at 01:51.
Pushed by adawit into branch 'master'.

Do not crash when global policy is changed and the Apply button is pressed.
FIXED-IN: 4.10

M  +24   -29   konqueror/settings/kio/kcookiespolicies.cpp
M  +1    -1    konqueror/settings/kio/kcookiespolicies.h

http://commits.kde.org/kde-baseapps/a791edd3d42a9b40c2d64b39048e0260d5632891
Comment 8 Christoph Feck 2012-10-05 00:33:00 UTC
Hmmm, don't rush it, doesn't compile :)
Comment 9 Graeme Hewson 2012-10-10 19:35:07 UTC
The same problems happen in Rekonq. Could the patch be backported to 4.9.3? I think it's too long to wait, over three months, till 4.10 is released.
Comment 10 Guido Winkelmann 2012-10-13 14:23:19 UTC
The same things happens to me, but I'm NOT using 4.10 kdelibs, everything is just 4.9.2 here.

I second the request to have this fix backported for 4.9.3.
Comment 11 Dawit Alemayehu 2012-10-13 15:07:44 UTC
It is not a simple matter to port this patch back to the 4.9 branch because many changes were made in the master branch prior to committing this fix. Moreover, are you both sure the back trace generated by the crash in your system the same as the one posted here ?
Comment 12 Guido Winkelmann 2012-10-13 15:16:35 UTC
(In reply to comment #11)
> Moreover, are you both sure the back trace generated by the crash in your
> system the same as the one posted here ?

I'm reasonably certain it is. It also happens in 
KCookiesPolicies::save (and ultimately qtreewdigdet).

This is what the backtrace looks like for me:


Application: Konqueror (kdeinit4), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fda8ffdc780 (LWP 4902))]

Thread 2 (Thread 0x7fda79b1f700 (LWP 4908)):
#0  0x00007fda962c8373 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fda92d516ae in g_main_context_poll (n_fds=2, fds=0x7fda74002bb0, timeout=-1, context=0x7fda740009a0, priority=<optimized out>) at gmain.c:3440
#2  g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x7fda740009a0, self=<optimized out>) at gmain.c:3141
#3  g_main_context_iterate (context=0x7fda740009a0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3083
#4  0x00007fda92d517cc in g_main_context_iteration (context=0x7fda740009a0, may_block=1) at gmain.c:3207
#5  0x00007fda9794fa2e in QEventDispatcherGlib::processEvents (this=0x7fda740008c0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007fda9791f692 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007fda9791f917 in QEventLoop::exec (this=0x7fda79b1edd0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007fda9781f67f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#9  0x00007fda978ff53f in QInotifyFileSystemWatcherEngine::run (this=0x2979540) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x00007fda9782265b in QThreadPrivate::start (arg=0x2979540) at thread/qthread_unix.cpp:307
#11 0x00007fda97589006 in start_thread (arg=0x7fda79b1f700) at pthread_create.c:305
#12 0x00007fda962d0f8d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7fda8ffdc780 (LWP 4902)):
[KCrash Handler]
#6  0x00007fda7afdc34c in text (column=0, this=0x20254b0) at /usr/include/qt4/QtGui/qtreewidget.h:110
#7  KCookiesPolicies::save (this=0x2c67db0) at /var/tmp/portage/kde-base/konqueror-4.9.2/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp:391
#8  0x00007fda7afda771 in KCookiesMain::save (this=0x2c2e790) at /var/tmp/portage/kde-base/konqueror-4.9.2/work/konqueror-4.9.2/konqueror/settings/kio/kcookiesmain.cpp:70
#9  0x00007fda87973dc7 in KCModuleProxy::save (this=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2/kutils/kcmoduleproxy.cpp:279
#10 0x00007fda87970c40 in KCMultiDialogPrivate::apply (this=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2/kutils/kcmultidialog.cpp:300
#11 0x00007fda97934971 in QMetaObject::activate (sender=0x1ab5180, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3547
#12 0x00007fda98677f3a in KDialog::slotButtonClicked (this=0x1ab5180, button=8) at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2/kdeui/dialogs/kdialog.cpp:888
#13 0x00007fda986783b4 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2_build/kdeui/kdialog.moc:167
#14 KDialog::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2_build/kdeui/kdialog.moc:127
#15 0x00007fda97934971 in QMetaObject::activate (sender=0x2025cc0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff2475fdc0) at kernel/qobject.cpp:3547
#16 0x00007fda9793c0ee in QSignalMapper::mapped (this=<optimized out>, _t1=8) at .moc/release-shared/moc_qsignalmapper.cpp:115
#17 0x00007fda9793c62b in QSignalMapper::map (this=0x2025cc0, sender=0x1fa8630) at kernel/qsignalmapper.cpp:266
#18 0x00007fda97934971 in QMetaObject::activate (sender=0x1fa8630, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff2475ff70) at kernel/qobject.cpp:3547
#19 0x00007fda970fa1b2 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:220
#20 0x00007fda96e35fce in QAbstractButtonPrivate::emitClicked (this=<optimized out>) at widgets/qabstractbutton.cpp:548
#21 0x00007fda96e37320 in QAbstractButtonPrivate::click (this=0x1fbe990) at widgets/qabstractbutton.cpp:541
#22 0x00007fda96e3754c in QAbstractButton::mouseReleaseEvent (this=0x1fa8630, e=0x7fff24760a60) at widgets/qabstractbutton.cpp:1123
#23 0x00007fda96ad3bce in QWidget::event (this=0x1fa8630, event=0x7fff24760a60) at kernel/qwidget.cpp:8371
#24 0x00007fda96a82ed4 in notify_helper (e=0x7fff24760a60, receiver=0x1fa8630, this=0x6e3ce0) at kernel/qapplication.cpp:4551
#25 QApplicationPrivate::notify_helper (this=0x6e3ce0, receiver=0x1fa8630, e=0x7fff24760a60) at kernel/qapplication.cpp:4523
#26 0x00007fda96a88591 in QApplication::notify (this=<optimized out>, receiver=0x1fa8630, e=0x7fff24760a60) at kernel/qapplication.cpp:4094
#27 0x00007fda98723628 in KApplication::notify (this=0x7fff247616e0, receiver=0x1fa8630, event=0x7fff24760a60) at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2/kdeui/kernel/kapplication.cpp:311
#28 0x00007fda97920bcb in QCoreApplication::notifyInternal (this=0x7fff247616e0, receiver=0x1fa8630, event=0x7fff24760a60) at kernel/qcoreapplication.cpp:915
#29 0x00007fda96a83e42 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#30 QApplicationPrivate::sendMouseEvent (receiver=0x1fa8630, event=0x7fff24760a60, alienWidget=0x1fa8630, nativeWidget=0x1ab5180, buttonDown=0x1fa8630, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3162
#31 0x00007fda96b006ff in QETWidget::translateMouseEvent (this=0x1ab5180, event=<optimized out>) at kernel/qapplication_x11.cpp:4502
#32 0x00007fda96aff512 in QApplication::x11ProcessEvent (this=0x7fff247616e0, event=0x7fff24761180) at kernel/qapplication_x11.cpp:3625
#33 0x00007fda96b26b92 in x11EventSourceDispatch (s=0x6e6610, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#34 0x00007fda92d513d2 in g_main_dispatch (context=0x6e5300) at gmain.c:2539
#35 g_main_context_dispatch (context=0x6e5300) at gmain.c:3075
#36 0x00007fda92d51710 in g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x6e5300, self=<optimized out>) at gmain.c:3146
#37 g_main_context_iterate (context=0x6e5300, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3083
#38 0x00007fda92d517cc in g_main_context_iteration (context=0x6e5300, may_block=1) at gmain.c:3207
#39 0x00007fda9794f9d6 in QEventDispatcherGlib::processEvents (this=0x612740, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#40 0x00007fda96b26866 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#41 0x00007fda9791f692 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#42 0x00007fda9791f917 in QEventLoop::exec (this=0x7fff24761510, flags=...) at kernel/qeventloop.cpp:204
#43 0x00007fda97924785 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#44 0x00007fda84b33a71 in kdemain (argc=<optimized out>, argv=<optimized out>) at /var/tmp/portage/kde-base/konqueror-4.9.2/work/konqueror-4.9.2/konqueror/src/konqmain.cpp:227
#45 0x0000000000408b9c in launch (argc=2, _name=0x6799e8 "/usr/bin/konqueror", args=<optimized out>, cwd=0x0, envc=<optimized out>, envs=<optimized out>, reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x679a14 "tolkien;1350141167;404814;3027_TIME6361105") at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2/kinit/kinit.cpp:734
#46 0x0000000000409c76 in handle_launcher_request (sock=7, who=<optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2/kinit/kinit.cpp:1226
#47 0x000000000040a1c3 in handle_requests (waitForPid=0) at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2/kinit/kinit.cpp:1419
#48 0x0000000000405b2d in main (argc=2, argv=0x7fff24762bc0, envp=0x7fff24762e90) at /var/tmp/portage/kde-base/kdelibs-4.9.2/work/kdelibs-4.9.2/kinit/kinit.cpp:1907
Comment 13 Dawit Alemayehu 2012-10-13 15:39:10 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Moreover, are you both sure the back trace generated by the crash in your
> > system the same as the one posted here ?

(In reply to comment #12)
> (In reply to comment #11)
> > Moreover, are you both sure the back trace generated by the crash in your
> > system the same as the one posted here ?
> 
> I'm reasonably certain it is. It also happens in 
> KCookiesPolicies::save (and ultimately qtreewdigdet).

Ok. Can either one of you test the attached patch to make sure it compiles. I am on the 4.10 branch and do not have the time to test this patch at the moment. If it works, then I can push it into the 4.9 branch.
Comment 14 Dawit Alemayehu 2012-10-13 15:40:07 UTC
Created attachment 74516 [details]
proposed patch for 4.9 branch
Comment 15 Guido Winkelmann 2012-10-13 17:31:40 UTC
Doesn't compile:

[ 92%] Building CXX object konqueror/settings/kio/CMakeFiles/kcm_kio.dir/kcookiespolicies.o
cd /var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2_build/konqueror/settings/kio && /usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++  -DMAKE_KCM_KIO_LIB -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=49 -DDISABLE_NEPOMUK_LEGACY -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -D_LARGEFILE64_SOURCE  -DQT_NO_DEBUG -DNDEBUG -O2 -pipe -fomit-frame-pointer -march=bdver1 -mtune=bdver1 -mcx16 -msahf -maes -mpclmul -mpopcnt -mabm -mlwp -mavx -ggdb  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -fPIC -I/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2_build/konqueror/settings/kio -I/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio -I/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2_build -I/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/lib/konq -I/usr/include/KDE -I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtMultimedia -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -I/usr/include/qt4/QtDBus -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4    -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -o CMakeFiles/kcm_kio.dir/kcookiespolicies.o -c /var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp
/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp: In member function ‘void KCookiesPolicies::addNewPolicy(const QString&)’:
/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp:189:30: warning: unused variable ‘item’ [-Wunused-variable]
/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp: In member function ‘virtual void KCookiesPolicies::save()’:
/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp:386:68: error: no matching function for call to ‘QMapIterator<QTreeWidgetItem*, const char*>::QMapIterator(QMap<QString, const char*>&)’
/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp:386:68: note: candidates are:
/usr/include/qt4/QtCore/qmap.h:1083:255: note: QMapIterator<Key, T>::QMapIterator(const QMap<Key, T>&) [with Key = QTreeWidgetItem*, T = const char*]
/usr/include/qt4/QtCore/qmap.h:1083:255: note:   no known conversion for argument 1 from ‘QMap<QString, const char*>’ to ‘const QMap<QTreeWidgetItem*, const char*>&’
/usr/include/qt4/QtCore/qmap.h:1083:37: note: QMapIterator<QTreeWidgetItem*, const char*>::QMapIterator(const QMapIterator<QTreeWidgetItem*, const char*>&)
/usr/include/qt4/QtCore/qmap.h:1083:37: note:   no known conversion for argument 1 from ‘QMap<QString, const char*>’ to ‘const QMapIterator<QTreeWidgetItem*, const char*>&’
/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp:389:33: error: conversion from ‘QTreeWidgetItem* const’ to non-scalar type ‘QString’ requested
In file included from /var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp:473:0:
/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp: At global scope:
/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2/konqueror/settings/kio/kcookiespolicies.cpp:66:19: warning: ‘QByteArray tolerantToAce(const QString&)’ defined but not used [-Wunused-function]
make[2]: *** [konqueror/settings/kio/CMakeFiles/kcm_kio.dir/kcookiespolicies.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2_build'
make[1]: *** [konqueror/settings/kio/CMakeFiles/kcm_kio.dir/all] Error 2
make[1]: Leaving directory `/var/tmp/portage/kde-base/konqueror-4.9.2-r1/work/konqueror-4.9.2_build'
make: *** [all] Error 2
Comment 16 Dawit Alemayehu 2012-10-13 21:21:17 UTC
Created attachment 74530 [details]
proposed patch for 4.9 branch v2
Comment 17 Guido Winkelmann 2012-10-13 21:30:45 UTC
This one fixes the bug.

Thank you.
Comment 18 Michael Palimaka 2012-10-31 13:32:06 UTC
Any chance of sneaking in the proposed 4.9 patch for 4.9.3?
Comment 19 Graeme Hewson 2012-10-31 17:21:18 UTC
Created attachment 74901 [details]
New crash information added by DrKonqi

kcmshell4 () on KDE Platform 4.9.2 using Qt 4.8.3

- What I was doing when the application crashed:

Crash happens in Rekonq as well (though not in the browser, as with Konqueror). Here I'm adding a new cookie policy.

-- Backtrace (Reduced):
#6  0x00007fe2a5be1404 in text (column=0, this=0xf10690) at /usr/include/qt4/QtGui/qtreewidget.h:110
#7  KCookiesPolicies::save (this=0xbfa670) at ../../../../konqueror/settings/kio/kcookiespolicies.cpp:391
#8  0x00007fe2a5bdf071 in KCookiesMain::save (this=0xceef30) at ../../../../konqueror/settings/kio/kcookiesmain.cpp:70
#9  0x00007fe2b66174a7 in KCModuleProxy::save (this=<optimized out>) at ../../kutils/kcmoduleproxy.cpp:279
#10 0x00007fe2b6614e20 in KCMultiDialogPrivate::apply (this=<optimized out>) at ../../kutils/kcmultidialog.cpp:300
Comment 20 Dawit Alemayehu 2012-11-10 21:38:18 UTC
Git commit 71f411a4ee7ba98843b9af81f327b67f8294087f by Dawit Alemayehu.
Committed on 10/11/2012 at 22:37.
Pushed by adawit into branch 'KDE/4.9'.

Do not crash when global policy is changed and the Apply button is pressed.
FIXED-IN: 4.9.4

M  +20   -23   konqueror/settings/kio/kcookiespolicies.cpp
M  +1    -1    konqueror/settings/kio/kcookiespolicies.h

http://commits.kde.org/kde-baseapps/71f411a4ee7ba98843b9af81f327b67f8294087f
Comment 21 Dawit Alemayehu 2012-11-17 19:15:41 UTC
*** Bug 310224 has been marked as a duplicate of this bug. ***
Comment 22 Christoph Feck 2012-11-28 18:27:52 UTC
*** Bug 310828 has been marked as a duplicate of this bug. ***