WARNING: KDE detected X Error

Lubos Lunak l.lunak at suse.cz
Tue Jan 13 10:03:45 GMT 2004


On Tuesday 13 of January 2004 09:55, David Faure wrote:
> On Monday 12 January 2004 20:14, Andy Brice wrote:
> > > > I get this error message output to the console when I start up my app
> >
> > which
> >
> > > > embeds a KHtmlPart browser:
> > > >
> > > > WARNING: KDE detected X Error: BadMatch (invalid parameter
> > > > attributes)
> >
> > \x08
> >
> > > >   Major opcode:  *
> > >
> > > Add a "<< kdBacktrace()" to this kdWarning in kapplication.cpp, to see
> >
> > what's causing it.
> >
> > > You might have to run your app with the -sync command-line option for a
> >
> > better result.
> >
> > There doesn't appear to be a kapplication.cpp installed with SuSe 9.
>
> Right, it's part of the source for kdelibs.
>
> > Although I am an experienced C++/Qt programmer I knowledge of KDE is
> > limited. Please can someone point me at an appropriate web page telling
> > me what I have to do to get a debug version of KApplication with source.
>
> Either recompile the kdelibs srpm after modifying it, or install kdelibs
> from sources (http://developer.kde.org/source - better get the same version
> as the one you have on suse, unless you plan to install two versions of KDE
> in parallel).
>
> Another way is to install your own X error handler:
>
> static int my_x_errhandler( Display *dpy, XErrorEvent *err )
> {
>     char errstr[256];
>     XGetErrorText( dpy, err->error_code, errstr, 256 );
>     if ( err->error_code != BadWindow )
>         kdWarning() << "Detected X Error: " << errstr << " " <<
> err->error_code << "\n  Major opcode:  " << err->request_code <<
> kdBacktrace() << endl; return 0;
> }
>
>  XSetErrorHandler( my_x_errhandler );

 If it's your own application, setting your own X11 error handler this way 
will be easier for you. Don't forget to run with the -sync argument, the 
backtrace will be useless without it (on the other hand, using -sync may 
actually avoid the cause of the problem, it will be difficult to find the 
problem then).

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kfm-devel mailing list