[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: [PATCH] remove crashing kdebug in kshortcutseditoritem.cpp
From:       Benoît_Jacob <jacob () math ! jussieu ! fr>
Date:       2008-05-12 7:45:02
Message-ID: 200805120945.08299.jacob () math ! jussieu ! fr
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


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@math.jussieu.fr>:
> > 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 <<



["diff" (text/x-diff)]

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
 }
 
 

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic