[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: kasbar crashes X !
From:       Richard Moore <rich () ipso-facto ! freeserve ! co ! uk>
Date:       2001-07-16 18:21:51
[Download RAW message or body]



David Faure wrote:
> 
> On Monday 16 July 2001 18:19, Richard Moore wrote:
> > David Faure wrote:
> > >
> > > After many days of investigation about why X crashed on me regularly, I have
> > > come to the conclusion that it's kasbar that is responsible for it.
> > > Reason:
> > > * X crashes in XAAPolyFillRect - so, trying to fill a rectangle
> > > * Playing with emulating return values in gdb led to X errors being displayed
> > > by the kicker process
> >
> > AFAIK kasbar doesn't run in the kicker process - it's run by the
> > extension proxy.
> 
> I think this is configurable. In kicker, any applet can run in the same process
> or in another one. My config is actually "load startup config applets internal",
> so kasbar was in the same process.

That should only affected applets AFAIK, but maybe it applies to
extensions too.

> 
> > > * From the beginning, I always say strange background colors in kasbar's items
> > > (like, the same item being sometimes blue, sometimes red, etc.)
> > >
> > > So it looks like kasbar is using an uninitialized brush (or pixmap), which is the
> > > reason for the strange colors and for the occasional X crash.
> >
> > This is down to the crappiness of KRootPixmap - I'll see what I can
> > do. Are you using Xinerama or anything like that? What settings are
> > you using for the kasbar extension (auto hide etc.)?
> 
> I'm not using Xinerama or anything like that (and the default settings for kasbar).
> I keep seeing errors from KRootPixmap though.
> Actually I'm running my KDesktop-TNG so I might have broken KRootPixmap...
> But, hmm, I remember seeing the strange colors even when I was running
> the normal KDesktop. Ok, so this is a KRootPixmap problem. I know nothing
> about it - how does it work ? Why is it crappy ?

It installs an event filter to catch the movements of the QWidget
and tries to keep the widget background pixmap set to the correct
area of the desktop background pixmap. The background pixmap is
determined using KSharedPixmap (though this mechanism is broken
when Xinerama is in use because there is no consideration of
which screen is in use). Unfortunately it seems that there is
something in the KRootPixmap initialisation code that is time
sensitive which can cause hard to find errors. In Kasbar this
shows up as occaisional junk when it is first shown, but I thought
I had solved this.

I was hoping to extend the code so that it also provided an API for
apps to query the background pixmap themselves. This allow apps
more control over the background (eg. I want to add support for
alpha-blending the icons to Kasbar but I can't currently). The
current API is very limited and offers little help to anyone who
wants to go beyond the pre-defined features. I put this on hold
because of the code freeze, but I'll see if I can do something
seeing as it is now a bug fix.

> 
> > I use kasbar all the time (as do quite a few people here I believe)
> > but this is the only such report I've heard.
> Someone confirmed already, on this list :}
> Also, it's very hard to find the reason for a X crash. Anyone who experiences
> X crashes, and doesn't do the long investigation I did (including running X in
> gdb, from a remote machine), will have no way to track it down to the guilty application.

True, but it's tricky for me to debug when I am having no such
problems myself. :-(

Rich.

> 
> --
> David FAURE, david@mandrakesoft.com, faure@kde.org
> http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
> KDE, Making The Future of Computing Available Today

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic