[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Bug#30475: crash when typing f while kmail starts
From: Don Sanders <sanders () kde ! org>
Date: 2001-08-18 13:34:04
[Download RAW message or body]
On Friday 17 August 2001 01:08, Ingo Klöcker wrote:
> On Sonntag, 12. August 2001 23:12, Don Sanders wrote:
> > On Friday 10 August 2001 20:32, Ingo Klöcker wrote:
> > > On Friday, 10. August 2001 12:29, Don Sanders wrote:
> > > > I can't reproduce this bug.
>
> [snip]
>
> > I can't reproduce the crash even with sign message by
> > default turned on.
> >
> > It might be help for if you type 'frame 4' and then
> > 'list' in gdb after the crash.
> >
> > 3 <signal handler called>
> > #4 0x80cd195 in KMHeaders::forwardMsg (this=0x82bf810)
> > at
> > /home/ingo/programme/cvs/kde2.1/kdenetwork/kmail/kmhead
> >ers.cpp:1328
>
> Running KMail from gdb I get the following:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x80cd2b5 in KMHeaders::forwardMsg (this=0x82c3080)
> at
> /home/ingo/programme/cvs/kde2.1/kdenetwork/kmail/kmheader
>s.cpp:1328 warning: Source file is more recent than
> executable.
>
> 1328 win->setCharset("");
> (gdb) list
> 1323 fwdMsg->setAutomaticFields(true);
> 1324 fwdMsg->setCharset("utf-8");
> 1325 fwdMsg->setBody(msgText.utf8());
> 1326 kernel->kbp()->busy();
> 1327 win = new KMComposeWin(fwdMsg, id);
> 1328 win->setCharset("");
> 1329 win->show();
> 1330 kernel->kbp()->idle();
> 1331 return;
> 1332 }
> (gdb)
>
>
> Because of the warning this might of course be the wrong
> line. But maybe win==0 for some reason. This would
> explain the crash in line 1328. I'll insert an assert or
> a kdDebug. But first I'll have to compile kdelibs
> (because of Carsten's case-insensitive auto-completion
> patch). So don't hold your breath. ;-)
I see. I suspect your line numbers are wrong, that code
should only get hit if multiple messages are forwarded.
Just a guess but the construction of the KMComposeWin might
cause events to be processed, which might cause an 'f' key
press to be interpreted which might cause
KMHeaders::forwardMsg() to be re-entered (since it is
already on the stack). This could be a problem if
forwardMsg() hasn't been designed to handle this.
Could you try something, try changing forwardMsg() so that
it can't be re-entered. Something like:
void KMHeaders::forwardMsg ()
{
+ static bool onStack = false;
+ if (onStack) return;
+ onStack = true;
... s/"return"/"onStack = false; return;" everywhere
onStack = false;
return;
... and put one at the end
onStack = false;
}
Hopefully that works, if not hopefully you know what I mean.
Does that change fix/avoid the bug?
> Another a related effect is the following:
> 1.) Enable "Focus follows mouse".
> 2.) Move the mouse over another application so that this
> application gets the focus (I always use xosview for
> this) and hold down the 'f' key for some time. Still
> holding down the 'f' key move the mouse cursor over the
> KMail window so that KMail gets the focus. Now 3-4
> composer windows open. All are forwards of the currently
> selected message. I guess the same also works for all
> other message related actions like "reply", etc.
Which indicates events are getting processed after the
pressing of the first "f" key and before the new composer
window gets focus.
Don.
_______________________________________________
Kmail Developers mailing list
Kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic