Re: [PATCH] remove crashing kdebug in kshortcutseditoritem.cpp
- Date: Mon, 12 May 2008 09:45:02 +0200
- From: Benoît Jacob <jacob@xxxxxxxxxxxxxxx>
- Subject: Re: [PATCH] remove crashing kdebug in kshortcutseditoritem.cpp
Hi, In fact my first patch wasn't enough: it still crashed in undo() when calling setGlobalShortcut(). So, for my local setup I'm disabling this undo() call. Patch attached just to make sure we're talking of the same thing. I don't commit, as discussed with Andreas, as I don't know your plans and don't really understand that part of KDE myself. Cheers, Benoit On Thursday 08 May 2008 19:26:46 Andreas Hartmetz wrote: > 2008/5/8 Benoît Jacob <jacob@xxxxxxxxxxxxxxx>: > > Hi, > > > > I encountered a crash (backtrace attached) while configuring KWin > > shortcuts, which is caused by the destructor of KShortcutEditorItem > > calling undo() which does a kDebug() accessing some data that apparently > > is no longer alive. This kDebug() was added in r778112. > > > > Attached is a trivial patch removing that kDebug(), hence fixing that > > crash. > > > > Should I commit? I'm not too sure as that kDebug() in undo() seems quite > > useful. Only when undo() is called from the destructor, does that > > kDebug() cause a crash. Well, maybe I should just leave that to the > > persons who know better that code. > > Hmmm... mjansen refactored that code and made some modifications. An > unconditional undo() on close does not seem to be a good idea :/ > Most of all I wonder which problem it is supposed to solve. > I remember a recent bug, for example in KWin's effects configuration, > where your changes will always be discarded. Or at least it looks so > in the GUI. Well, we can probably sort this out quickly now. > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to > >> unsubscribe <<
Index: kdelibs/kdeui/dialogs/kshortcutseditoritem.cpp
===================================================================
--- kdelibs/kdeui/dialogs/kshortcutseditoritem.cpp (revision 806707)
+++ kdelibs/kdeui/dialogs/kshortcutseditoritem.cpp (working copy)
@@ -44,8 +44,10 @@
KShortcutsEditorItem::~KShortcutsEditorItem()
{
+#if 0 // calling undo() here was crashing e.g. when setting global shortcuts to kwin desktop effects
// Undo not yet commited changes. That will fre the m_old* members
undo();
+#endif
}
Attachment:
signature.asc
Description: This is a digitally signed message part.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
- References:
- [PATCH] remove crashing kdebug in kshortcutseditoritem.cpp
- From: Benoît Jacob
- Re: [PATCH] remove crashing kdebug in kshortcutseditoritem.cpp
- From: Andreas Hartmetz
- [PATCH] remove crashing kdebug in kshortcutseditoritem.cpp
- Prev by Date: Re: Problem compiling kdebase...
- Next by Date: Re: Problem compiling kdebase...
- Previous by thread: Re: [PATCH] remove crashing kdebug in kshortcutseditoritem.cpp
- Next by thread: Re: [PATCH] remove crashing kdebug in kshortcutseditoritem.cpp
- Index(es):