Xvfb ?
The best way to debug a window manager is to run it inside of Xnest.
Xnest is an X server that appears to be a window on your desktop.
In the ordinary X session, start
1. Xnest
2. gdb mwm
then work inside the Xnest session until the mwm dies.
Then you can look outside the Xnest window; you'll find the mwm is trapped
in the debugger and you should be able to look at what caused it to die.
Danny
[EMAIL PROTECTED] on 08/30/2000 02:17:00 PM
To: [EMAIL PROTECTED]@Internet
cc: (bcc: Danny Backx/U27113/KB/KredAlm)
Subject: Re: mwm [debugging](was "Changing focus")
Bolan Meek wrote:
> > From: "Alexander Mai" <[EMAIL PROTECTED]>
> > To: "Jens-Peter Konrath" <[EMAIL PROTECTED]>
> > CC: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> >
> > On Sat, 26 Aug 2000 14:41:36 +0200, Jens-Peter Konrath wrote:
> >
> > >Well,
> > >I'd like to help out debugging mwm if I knew where to start.
> > > I also have little to no knowledge about what a windowmanager
> > > actally does...
> > > Jens
>
> Jens, I recommend OReilly's "Xlib Programming Manual". It
> has a significant section on programming window managers, but
> it is getting dated: it covers X11R4. However, everything
> in it that I've encountered applies to X11R6, so it is a
> good starting point, and changelogs, newer headers files,
> etc., can be sources for grokking the delta.
>
> I vaguely remember something about OReilly opening up
> the X series... it may actually be available in .pdf or .ps
> on their website. It has a companion volume "Xlib Reference
> Manual", but having the Debian xbooks package, I feel less
> need for that. "Programming", however, gives such a well
> graded tutorial, that it is a "must have" for us beginners,
> as is "X Toolkit Intrinsics Programming Manual", which also
> has a companion "Reference", about which I also feel less
> need, for the above reason.
>
> > Well, even neglecting the kind of app (a WM) it is usually
> > harder to debug an app which just ends up in a strange/locked
> > state. I prefer the hard crashs ... ;-)
> >
> > One thing you could try is looking for a simple way to
> > reproduce the problem. As an alternative one might also
> > attempt a check for general problems, e.g. memory handling.
> > I tried running mwm inside Xvfb when I got my crash
> > yesterday (and an "unaligned access" on an alpha/DU system.
> > Usually I only see those from my Fortran code ;-)
>
> Other checkpoints might be swap usage, RAM size, source of
> package -or, if you built it yourself, what warnings came
> up in the compile-, X server & version.
Bolan,
thanks for your hints to some X books. Unfortunately, I couldn't find them on the
O'Reilly homepage or their ftp-server. Maybe someone else can remember where to find
the online books (if O'Reilly has made them available for download).
Mwm does compile without any errors (I'm using gcc-2.95.2), and the behaviour I
described earlier can't be reproduced on purpose, it just happens. But I only get it
when Netscape and/or Wipeout (a C/C++/Java IDE) has been started. Maybe it's their
fault...
Jens