Web lists-archives.org

Re: [PATCH] remove crashing kdebug in kshortcutseditoritem.cpp




I haven't seen the original email yes as i'm a digest reader on kde-devel. So 
i haven't seen the patch or backtrace yet.

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.

I will have a look. But i'm pretty sure you fix the symptom and not the 
problem. That kDebug() in undo() only accesses member of KShortcutsEditorItem 
and and it's associated action. Are you able to reproduce? Steps?

My guess is you do/did something to invalide the action you want to configure. 
But i can say more when you're mail has reached me.

> >
> >  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 :/

It is. It only undo's changes not yet commited. Exactly wanted behavior for 
the KShortcutsEditor. If that code would be missing you would configure some 
shortcut and close the dialog without applying or saving and would have your 
change in effect as long as your session goes. Next login the old shortcut is 
active

> 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.

???? Just send me steps to reproduce and i will have a look.


-- 
Michael Jansen
Available for contract work ( Development / Configuration Management )
http://www.michael-jansen.biz
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<