[haiku-appserver] Re: investigating some bugs

  • From: Adi Oanca <adioanca@xxxxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Mon, 28 Mar 2005 09:02:50 +0300

Hi Stephan,

Stephan Assmus wrote:
> 1.) My ViewHWInterface is very similar to the ViewDriver. The BWindow 
> it uses, which is almost identical to the one used in ViewDriver 
> emulates the input_server. Sometimes the window locks up, and it is 
> blocking on a semaphore called "OBinputserverlink" or something to the 
> like. This window can only lock up calling some BView hook function 
> which in turn uses a BPortLink to send mouse down/moved/up messages to 
> the app_server.

        Sounds like a message length issue. Maybe the window is expecting 
something from app_server and that never comes? Maybe the other way 
around? I suggest you re-check the messages sent between the two and be 
sure all PortLink 'read' methods return.

> 2.) Sometimes the RootLayer1 thread starts to suck up all CPU and when 
> I manage to debug it via Process controller, it involves 
> Layer::StartRebuildRegions() or RebuildRegions(). Is there the 
> possibility of StartRebuildRegions() being caught in an endless loop? I 
> don't follow everything that's happening there, but the only thing 
> which caught my attention was
> 
>       for(Layer *lay = VirtualBottomChild(); lay; lay = 
> VirtualUpperSibling())
> 
> which would loop for ever if the layer tree was somehow screwed up.

        Yup, that is very much possible. I know about this, and I will fix 
that, but you have to have a little more patience. :-) What you 
described above never happened to me, but I would expected it to be a 
seg fault not an endless loop :-P.
        This is because ATM Layers are removed from the tree from 
ServerWindow's thread and our had working thread, RootLayer's one, does 
not "know" about this. The solution is to lock the RootLayer thread 
before doing that or (add/)remove Layers from with RootLayer's thread. 
I'll see which method I chose...
        Please change nothing related to Layer tree, or if you want to change 
tell me about it, as I'm arranging the final pieces of the puzzle 
regarding Layer management and I need to be in sync with all the 
changes. :-)

        If you really want this problem fixed in your working copy, you can try 
to lock RootLayer's thread just before removing/adding a layer from the 
tree. (In ServerWindow's DispatchMessage) Don't forget to tell me if it 
worked. :-)

> 3.) The clipping of the windows themself seems to work alright,

        I have seen that. Nice work.

> but the 
> clipping of the views they contain seems to be wrong. At least I don't 
> see these views draw correctly, with the result being pretty much the 
> same wether my Painter driver is used or the ViewDriver. See src/tests/
> servers/app/windows. After I added more stuff there, I started to see 
> bits of drawing way outside the windows too.

        I think this is your fault. :-P
        I don't know if I can help with this one...

> I'm hoping for some assistance in fixing these problems. I would very 
> much like to show something at BeGeistert and it looks like it could 
> well be possible.

        Yes. We really do have something here. :-)

        I'll write you guys what I have accomplished in a few days. Yes, before 
BeGeistert. :-)


Bye,
Adi.

Other related posts: