[comp.windows.x] Help with awm and Xlib

brossard%litsun.epfl.ch@MITVMA.MIT.EDU (Alain Brossard) (11/01/89)

                [Sent: Wed. 01/Nov./89  Time: 09:45]
        I have been tracing a bug with awm or Xlib and it is taking a
lot more time than I have.  I hope somebody else has fixed it:

        I have the following in my .Xressource file:
awm.icon.labels: off

        Which basically says to use text icons rather than bitmap icons.
Except that it doesn't always work.  I finally established the following:
        1- start awm and icons are ok
        2- create xterm window: icon ok
        3- kill xterm window
        4- create xterm window: icon are bitmaps from now on.

        I decided to pursue point 4 and find what had changed rather than
follow point 3 and try to find what it did wrong.
        In file awm.c, in function RegisterWindow(), there is the following
call:

          if (cp = (XGetDefault(dpy, clh.res_class, "wm_option.icon.labels")))
               tmp->attrs = SetOptFlag(tmp->attrs, AT_ICONLABEL, Pred(cp));

        After having killed one xterm window, XGetDefault suddenly
returns true with cp pointing to "on" while before it always returned
false.  A check on dpy and clh.res_class revealed no changes so I traced
XGetDefault and we find the following:

XrmGetResource(dpy->db, temp, "Program.Name", &type, &result);

        None of the variables of XGetDefault have changed so I tried to
use dbx on XrmGetResource, again no change on any of the variable so
I followed the call to:
    result = XrmQGetResource(db, names, classes, &fromType, pValue);

        Which is suddenly true, XrmQGetResource() calls GetEntry
which is recursive with a big macro inside.  I traced the first 3 levels
of recursion without seeing any changes and ran out of time.
        Has somebody seen this problem before?  And hopefully is there
a fix?

        I'm using X11R3, patch level 10 on SunOS 3.5 on a SUN 3/60.

        At this point I can only advance two guesses:
1- memory corruption or
2- some kind of pointer screwup on the kill window.

        I don't know whether the problem is in Xlib or in awm, but I
would guess it is in awm since it is XGetDefault which returns the
wrong result.

                                        Alain Brossard
                                        brossard@litsun.epfl.ch

brossard%litsun.epfl.ch@MITVMA.MIT.EDU (Alain Brossard) (11/01/89)

                [Sent: Wed. 01/Nov./89  Time: 10:31]
       I have been tracing a bug with awm or Xlib and it is taking a
lot more time than I have.  I hope somebody else has fixed it:

        I have the following in my .Xressource file:
awm.icon.labels: off

        Which basically says to use text icons rather than bitmap icons.
Except that it doesn't always work.  I finally established the following:
        1- start awm and icons are ok
        2- create xterm window: icon ok
        3- kill xterm window
        4- create xterm window: icon are bitmaps from now on.

        I decided to pursue point 4 and find what had changed rather than
follow point 3 and try to find what it did wrong.
        In file awm.c, in function RegisterWindow(), there is the following
call:

          if (cp = (XGetDefault(dpy, clh.res_class, "wm_option.icon.labels")))
               tmp->attrs = SetOptFlag(tmp->attrs, AT_ICONLABEL, Pred(cp));

        After having killed one xterm window, XGetDefault suddenly
returns true with cp pointing to "on" while before it always returned
false.  A check on dpy and clh.res_class revealed no changes so I traced
XGetDefault and we find the following:

XrmGetResource(dpy->db, temp, "Program.Name", &type, &result);

        None of the variables of XGetDefault have changed so I tried to
use dbx on XrmGetResource, again no change on any of the variable so
I followed the call to:
    result = XrmQGetResource(db, names, classes, &fromType, pValue);

        Which is suddenly true, XrmQGetResource() calls GetEntry
which is recursive with a big macro inside.  I traced the first 3 levels
of recursion without seeing any changes and ran out of time.
        Has somebody seen this problem before?  And hopefully is there
a fix?

        I'm using X11R3, patch level 10 on SunOS 3.5 on a SUN 3/60.

        At this point I can only advance two guesses:
1- memory corruption or
2- some kind of pointer screwup on the kill window.

        I don't know whether the problem is in Xlib or in awm, but I
would guess it is in awm since it is XGetDefault which returns the
wrong result.

                                        Alain Brossard
                                        brossard@litsun.epfl.ch

brossard%litsun2.epfl.ch@MITVMA.MIT.EDU (Alain Brossard) (11/08/89)

                [Sent: Wed. 08/Nov./89  Time: 10:48]
>           I have been tracing a bug with awm or Xlib and it is taking a
>    lot more time than I have.

   Since I haven't had any replies to my earlier posting,
(am I the only who has this problem?)
does anybody know where I can get the newest copy of awm, keeping
in mind that in Europe we don't have access to ftp to the states.
I don't mind going through an archive server, but then half the times
if not more bitnet munches uuencoded files so...

                                        Alain Brossard

PS      Here is a reposting of my original query just in case:
        I have the following in my .Xressource file:
awm.icon.labels: off

        Which basically says to use text icons rather than bitmap icons.
Except that it doesn't always work.  I finally established the following:
        1- start awm and icons are ok
        2- create xterm window: icon ok
        3- kill xterm window
        4- create xterm window: icon are bitmaps from now on.

        I decided to pursue point 4 and find what had changed rather than
follow point 3 and try to find what it did wrong.
        In file awm.c, in function RegisterWindow(), there is the following
call:

          if (cp = (XGetDefault(dpy, clh.res_class, "wm_option.icon.labels")))
               tmp->attrs = SetOptFlag(tmp->attrs, AT_ICONLABEL, Pred(cp));

        After having killed one xterm window, XGetDefault suddenly
returns true with cp pointing to "on" while before it always returned
false.  A check on dpy and clh.res_class revealed no changes so I traced
XGetDefault and we find the following:

XrmGetResource(dpy->db, temp, "Program.Name", &type, &result);

        None of the variables of XGetDefault have changed so I tried to
use dbx on XrmGetResource, again no change on any of the variable so
I followed the call to:
    result = XrmQGetResource(db, names, classes, &fromType, pValue);

        Which is suddenly true, XrmQGetResource() calls GetEntry
which is recursive with a big macro inside.  I traced the first 3 levels
of recursion without seeing any changes and ran out of time.
        Has somebody seen this problem before?  And hopefully is there
a fix?

        I'm using X11R3, patch level 10 on SunOS 3.5 on a SUN 3/60.

        At this point I can only advance two guesses:
1- memory corruption or
2- some kind of pointer screwup on the kill window.

        I don't know whether the problem is in Xlib or in awm, but I
would guess it is in awm since it is XGetDefault which returns the
wrong result.

                                        Alain Brossard
                                        brossard@litsun.epfl.ch