> > Do you have any other test case where this bug appears?
> 
> Not quite sure, but I believe the cxchromium (google chrome) app
> lead to the same problems. You can get the code for free from
> codeweawers. I cannot now verify it since the WM version I am

Nope, chromium does not crash here:

http://www.aei.mpg.de/~crmafra/chromium_wmaker.png

It seems that you found a very rare crash using safari, and maybe
including that check for NULL is the way to go.

Yesterday I tried to study the source to get a feeling where
things could go wrong with wwin->frame, but I still don't know
why (I am not a pro debugger I think, and my time was limited).

But the sequence of events is probably this:

DispatchEvent()
  event->type is PropertyNotify
  
    handlePropertyNotify() 
    [  this is where wwin is set, either via wWindowFor() -- which
       I think is more probable -- or via wApplicationOf()  ]
       
      wClientCheckProperty()
      [ it enters a switch() statement and goes all the way down
        to default: and the last 'else' where it calls 
        wNETWMCheckClientHintChange ]
        
        wNETWMCheckClientHintChange()
          updateWindowType() --> bang!
          
So I am not sure (and I can be wrong!) that this particular
code you quoted 

  if (XGetWindowProperty(dpy, wwin->client_win, net_wm_window_type, 0, 1,
                 False, XA_ATOM, &type_ret, &fmt_ret, &nitems_ret,
                 &bytes_after_ret, (unsigned char **)&data)==Success && data) {

has something to do with wwin->frame being NULL. Maybe wwin->frame
is being NULL when wwin is created with wWindowFor() in src/window.c
where its return defines wwin in one of those two cases

if (desc->parent_type==WCLASS_WINDOW)
        return desc->parent;
    else if (desc->parent_type==WCLASS_FRAME) {
        WFrameWindow *frame = (WFrameWindow*)desc->parent;
        if (frame->flags.is_client_window_frame)
            return frame->child;
    }
    
So if my analysis is correct, one has to investigate why
desc->parent (or desc->parent->child) has a broken ->frame
pointer..

I hope this will help somebody else thinking about your bug too,
because I can do it only on my (rare) spare time (and mostly
to learn things!).

But if you could put some debug printk's in a few places in that
call chain that would help a lot too. But maybe somebody with
a lot of experience in wmaker debugging will immediately see
where the problem is (let's hope so).

Regards,
Carlos


-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to