Re: Searching mail crashes Blackbox and X.

2001-11-29 Thread Henrik Kinnunen

There is a quick fix for it.
The crash is caused due to a window that doesn't set focus to another window
when it dies and thus makes the Blackbox::focused_window point to a dead
BlackboxWindow.
This is fixed by adding these lines in the Window.cc in
BlackboxWindow::~BlackboxWindow row 446 :

if (client.transient_for)
   blackbox-setFocusedWindow(client.transient_for);

and for Fluxbox 0.1.4 in Window.cc in FluxboxWindow::~FluxboxWindow row 506 :

if (client.transient_for)
  fluxbox-setFocusedWindow(client.transient_for);

This is a quickfix for it and these lines should later be in
Workspace::removeWindow(...)


 I am using Sylpheed Claws 0.6.5. for e-mail. When I search for mail
 with this program Blackbox often crashes and takes down X with it,
 especially when I search in folders with a lot of mail. I have tried
 other WM's (icewm, xfce, kde, fvwm) on my computer, but it is only
 Blackbox that has this problem. It does not happen every time I do a
 search, but often. What could be the problem?



Re: Searching mail crashes Blackbox and X.

2001-11-29 Thread Sean 'Shaleh' Perry

On 29-Nov-2001 Henrik Kinnunen wrote:
 There is a quick fix for it.
 The crash is caused due to a window that doesn't set focus to another window
 when it dies and thus makes the Blackbox::focused_window point to a dead
 BlackboxWindow.
 This is fixed by adding these lines in the Window.cc in
 BlackboxWindow::~BlackboxWindow row 446 :
 
 if (client.transient_for)
blackbox-setFocusedWindow(client.transient_for);
 
 and for Fluxbox 0.1.4 in Window.cc in FluxboxWindow::~FluxboxWindow row 506 :
 
 if (client.transient_for)
   fluxbox-setFocusedWindow(client.transient_for);
 
 This is a quickfix for it and these lines should later be in
 Workspace::removeWindow(...)
 

if (w-isFocused()) {
if (screen-isSloppyFocus())
  screen-getBlackbox()-setFocusedWindow((BlackboxWindow *) 0);
else if (w-isTransient()  w-getTransientFor() 
 w-getTransientFor()-isVisible())
  w-getTransientFor()-setInputFocus();
else {
  BlackboxWindow *top = stackingList-first();
  if (! top || ! top-setInputFocus()) {
screen-getBlackbox()-setFocusedWindow((BlackboxWindow *) 0);
XSetInputFocus(screen-getBlackbox()-getXDisplay(),
   screen-getToolbar()-getWindowID(),
   RevertToParent, CurrentTime);
  }
}
  }

That is the core of removeWindow().  Which seems to handle the issue you are
saying exists.  Is this a race condition somewhere?  What brought you to the
conclusion that this is the problem?



Re: Searching mail crashes Blackbox and X.

2001-11-29 Thread Sean 'Shaleh' Perry

 
 
 if (w-isFocused()) {
 if (screen-isSloppyFocus())
   screen-getBlackbox()-setFocusedWindow((BlackboxWindow *) 0);
 else if (w-isTransient()  w-getTransientFor() 
  w-getTransientFor()-isVisible())
   w-getTransientFor()-setInputFocus();
 else {
   BlackboxWindow *top = stackingList-first();
   if (! top || ! top-setInputFocus()) {
 screen-getBlackbox()-setFocusedWindow((BlackboxWindow *) 0);
 XSetInputFocus(screen-getBlackbox()-getXDisplay(),
screen-getToolbar()-getWindowID(),
RevertToParent, CurrentTime);
   }
 }
   }
 
 That is the core of removeWindow().  Which seems to handle the issue you are
 saying exists.  Is this a race condition somewhere?  What brought you to the
 conclusion that this is the problem?

Duh, think about code before sending off emails (-:

What if we swap the nested if so that it first checks for transient, then
checks for sloppyfocus?



Re: Searching mail crashes Blackbox and X.

2001-11-29 Thread Sean 'Shaleh' Perry


On 27-Nov-2001 Christian Dysthe wrote:
 Hi,,
 
 I am using Sylpheed Claws 0.6.5. for e-mail. When I search for mail
 with this program Blackbox often crashes and takes down X with it,
 especially when I search in folders with a lot of mail. I have tried
 other WM's (icewm, xfce, kde, fvwm) on my computer, but it is only
 Blackbox that has this problem. It does not happen every time I do a
 search, but often. What could be the problem?
 

Try the attached patch.



transientfix.patch
Description: transientfix.patch


back trace provided Re: Searching mail crashes Blackbox and X.

2001-11-28 Thread Sean 'Shaleh' Perry

Ok friends, here is your chance to earn some karma.  I am a little busy and
have not been able to devote full attention to this.  here is his backtrace
from gdb on the core.

gdb blackbox core 


(gdb) where
#0  0x401d8971 in kill () from /lib/libc.so.6
#1  0x401d8775 in raise () from /lib/libc.so.6
#2  0x401d9da3 in abort () from /lib/libc.so.6
#3  0x0804b14e in signalhandler (sig=11) at BaseDisplay.cc:191
#4  0x401d87c8 in killpg () from /lib/libc.so.6
#5  0x08064b28 in BlackboxWindow::setInputFocus (this=0x80c2a40)
at Window.cc:1338
#6  0x08066404 in BlackboxWindow::mapNotifyEvent (this=0x80c2a40, 
ne=0xbfffe670) at Window.cc:2170
#7  0x0806b069 in Blackbox::process_event (this=0xbfffe710, e=0xbfffe670)
at blackbox.cc:470
#8  0x0804b93e in BaseDisplay::eventLoop (this=0xbfffe710)
at BaseDisplay.cc:431
#9  0x0806edee in main (argc=1, argv=0xb8b4) at main.cc:255
#10 0x401c65b0 in __libc_start_main () from /lib/libc.so.6

needless to say, that bb dies there is a bit odd.  If anyone else can recreate
this I would be most appreciative.  Of course looking through the code for a
bad path would also be helpful.

What I find most interesting is that the window sylpheed opens is not marked
transient and modal.  So either the authors mixed that up or bb is not reading
an atom right somewhere.  This is the only possible flaw I can see at the
moment.  Anyone able to understand the spaghetti code of sylpheed and track
down how the message is displayed would also be a boon.



Re: Searching mail crashes Blackbox and X.

2001-11-27 Thread Erik Jan Tromp

On Mon, 26 Nov 2001 21:06:11 -0600
Christian Dysthe [EMAIL PROTECTED] wrote:

 Hi,,
 
 I am using Sylpheed Claws 0.6.5. for e-mail. When I search for mail
 with this program Blackbox often crashes and takes down X with it,
 especially when I search in folders with a lot of mail. I have tried
 other WM's (icewm, xfce, kde, fvwm) on my computer, but it is only
 Blackbox that has this problem. It does not happen every time I do a
 search, but often. What could be the problem?

I've tried duplicating the above with Sylpheed 0.6.5 (stable, not claws)  have failed 
utterly. One possibility presents itself: claws itself.



Re: Searching mail crashes Blackbox and X.

2001-11-27 Thread Guido 'lenix' Boehm

On Tue, 27 Nov 2001 12:37:18 -0500
Erik Jan Tromp [EMAIL PROTECTED] wrote:

 On Mon, 26 Nov 2001 21:06:11 -0600
 Christian Dysthe [EMAIL PROTECTED] wrote:
 
  Hi,,
  
  I am using Sylpheed Claws 0.6.5. for e-mail. When I search for mail
  with this program Blackbox often crashes and takes down X with it,
  especially when I search in folders with a lot of mail. I have tried
  other WM's (icewm, xfce, kde, fvwm) on my computer, but it is only
  Blackbox that has this problem. It does not happen every time I do a
  search, but often. What could be the problem?
 
 I've tried duplicating the above with Sylpheed 0.6.5 (stable, not
 claws)  have failed utterly. One possibility presents itself: claws
 itself.

i'm using claws - 0.6.5cvs19 (and cvs14) and had no problems like this.
i tried to reproduce, too, but no luck on this.

regards, lenix
-- 
www: http://www.lenix.de
fon: +49 - 175 - 72 17 034
No, CTRL-ALT-DEL is not the proper way to end a programm. (RFC 1882)



Re: Searching mail crashes Blackbox and X.

2001-11-27 Thread Sean 'Shaleh' Perry

On 27-Nov-2001 Christian Dysthe wrote:
 Hi,,
 
 I am using Sylpheed Claws 0.6.5. for e-mail. When I search for mail
 with this program Blackbox often crashes and takes down X with it,
 especially when I search in folders with a lot of mail. I have tried
 other WM's (icewm, xfce, kde, fvwm) on my computer, but it is only
 Blackbox that has this problem. It does not happen every time I do a
 search, but often. What could be the problem?
 

h, nifty.  I presume this is bb 0.61.1.

Would it be possible for you to make a tarball of a few of these folders
available?  Perhaps some of them are mailing lists.  That way a few of us could
try to track it down.



Re: Searching mail crashes Blackbox and X.

2001-11-27 Thread Christian Dysthe

On Tue, 27 Nov 2001 12:37:18 -0500
Erik Jan Tromp [EMAIL PROTECTED] wrote:
 
 I've tried duplicating the above with Sylpheed 0.6.5 (stable, not
 claws)  have failed utterly. One possibility presents itself:
 claws itself

I got the 0.6.5 source, built it, installed it and ran it. I then
tried to do a search for mail in my inbox, *poof* back to login. So
it is not Claws. I also tried in Fluxbox, same thing happened.

This is weird since it doesn't happen in any other WM installed
here, and that is not just a couple! But BB is my first love,
Sylpheed my second. Do I really have to choose? ;)



-- 
Christian Dysthe
http://www.dysthe.net
ICQ: 3945810
Registered Linux User #228949

Cloning is bad.
Cloning is bad.



Re: Searching mail crashes Blackbox and X.

2001-11-27 Thread Christian Dysthe

On Tue, 27 Nov 2001 10:20:25 -0800 (PST)
Sean 'Shaleh' Perry [EMAIL PROTECTED] wrote:

 h, nifty.  I presume this is bb 0.61.1.
 
 Would it be possible for you to make a tarball of a few of these
 folders available?  Perhaps some of them are mailing lists.  That
 way a few of us could try to track it down.
 

Well, I could. But it seems to happen in all my mail folders, more
often in the ones with a lot of mail though.

Yes, it is bb 0.61.1 (and also in all fluxbox builds).

Since others posted to this list that they have this problem it
can't be oddities on my system alone. That is somewhat comforting to
know.. :)

P.S. I have been doing all kinds of searches on IceWM where I
currently have to live. No problems whatsoever. Went back to bb,
tried two versions of Sylpheed with the same problem immediately
apparent: crash trying to search mail folders.


-- 
Christian Dysthe
http://www.dysthe.net
ICQ: 3945810
Registered Linux User #228949

Cloning is bad.
Cloning is bad.



Re: Searching mail crashes Blackbox and X.

2001-11-27 Thread Christian Dysthe

On Tue, 27 Nov 2001 10:40:16 -0800 (PST)
Sean 'Shaleh' Perry [EMAIL PROTECTED] wrote:


 right.  I need a way to recreate this on my box so I can run bb in
 a debugger and see where it dies.  The easiest way (since I do not
 use sylpheed) would be for you to make a few folders of mail
 available so I can setup a sylphyeed like yours.
 
 Also are you using any gtk themes?  Any other tweaks?

I will pack up some folders of mail and send to you. I am using the
default Mandrake .gtkrc. No other tweaks other than having Sylpheed
compiled with spell checking enabled. 
 


-- 
Christian Dysthe
http://www.dysthe.net
ICQ: 3945810
Registered Linux User #228949

Cloning is bad.
Cloning is bad.



Re: Searching mail crashes Blackbox and X.

2001-11-27 Thread Kyle Donaldson

On Tue, 27 Nov 2001, Christian Dysthe wrote:

 I have done some more testing and come up with something iteresting:
 It seems the crashes ONLY happens if no mail matches the search
 criteria. As long as an e-mail is found matching the criteria
 Blackbox won't crash. In other WM's you get a Searched failed
 message when nothing is found. In Blackbox you will never get that
 message because a crash will have happened before you get this far.

Could it be that the 'Search Failed' message window is sending BB bad info
on creation, and BB not checking for it, causing a spectacular blowup?

Just a thought?

--gile



Searching mail crashes Blackbox and X.

2001-11-26 Thread Christian Dysthe

Hi,,

I am using Sylpheed Claws 0.6.5. for e-mail. When I search for mail
with this program Blackbox often crashes and takes down X with it,
especially when I search in folders with a lot of mail. I have tried
other WM's (icewm, xfce, kde, fvwm) on my computer, but it is only
Blackbox that has this problem. It does not happen every time I do a
search, but often. What could be the problem?

TIA

-- 
Christian Dysthe
http://www.dysthe.net
ICQ: 3945810
Registered Linux User #228949

Cloning is bad.
Cloning is bad.



Re: Searching mail crashes Blackbox and X.

2001-11-26 Thread Jamin W. Collins

On Mon, 2001-11-26 at 21:06, Christian Dysthe wrote:
 Hi,,
 
 I am using Sylpheed Claws 0.6.5. for e-mail. When I search for mail
 with this program Blackbox often crashes and takes down X with it,
 especially when I search in folders with a lot of mail. I have tried
 other WM's (icewm, xfce, kde, fvwm) on my computer, but it is only
 Blackbox that has this problem. It does not happen every time I do a
 search, but often. What could be the problem?

Have you tried another mail client?  

I've put X and Blackbox under quite a load on my systems (100% CPU
untilaztion with near 100% physical memory utilization along with ~50%
swapfile usage) for a prolonged period of time and had no problem (other
than performance hits) with Evolution or Mozilla Mail crashing either X
or Blackbox.

Jamin W. Collins

-- 
Life is the art of drawing without an eraser. - John Gardner



Re: Searching mail crashes Blackbox and X.

2001-11-26 Thread Christian Dysthe

On 26 Nov 2001 21:11:18 -0600
Jamin W. Collins [EMAIL PROTECTED] wrote:

 Have you tried another mail client? 

Well, yes, but Sylpheed is the one I like. The only problem with it
is that it takes down Blackbox for some reason when I try to search
for mail. Since this isn't a problem in any other WM I have tried I
thought it might be something in Blackbox causing this.  
 
 I've put X and Blackbox under quite a load on my systems (100% CPU
 untilaztion with near 100% physical memory utilization along with
 ~50% swapfile usage) for a prolonged period of time and had no
 problem (other than performance hits) with Evolution or Mozilla
 Mail crashing either X or Blackbox.

Blackbox is working perfectly for me in all respects except for ths
problems with mail search.
 
 Jamin W. Collins
 
 -- 
 Life is the art of drawing without an eraser. - John Gardner
 


-- 
Christian Dysthe
http://www.dysthe.net
ICQ: 3945810
Registered Linux User #228949

Cloning is bad.
Cloning is bad.



Re: Searching mail crashes Blackbox and X.

2001-11-26 Thread Jamin W. Collins

On Mon, 2001-11-26 at 21:30, Christian Dysthe wrote:
 On 26 Nov 2001 21:11:18 -0600
 Jamin W. Collins [EMAIL PROTECTED] wrote:
 
  Have you tried another mail client? 
 
 Well, yes, but Sylpheed is the one I like. The only problem with it
 is that it takes down Blackbox for some reason when I try to search
 for mail. Since this isn't a problem in any other WM I have tried I
 thought it might be something in Blackbox causing this.  

I'm not saying that it's not (as I really don't know), but the same
logic can be applied in reverse.  

Jamin W. Collins

-- 
Life is the art of drawing without an eraser. - John Gardner