Re: [dev] [dwm] Crash (possibly related to ru_bottomstack?)

From: TRS-80 <suckless.trs-80_AT_isnotmyreal.name>
Date: Tue, 25 Feb 2020 14:46:46 -0500

On 2020-02-25 07:17, Daniel Moch wrote:
> On Feb 24, 2020, at 4:49 PM, TRS-80 <suckless.trs-80_AT_isnotmyreal.name>
> wrote:
>> If I am recalling correctly, it seems this only started happening once
>> I incorporated the ru_bottomstack patch. I cannot right now swear that
>> is the problem, it just seems that way at the moment. I guess one
>> (easy) way to find out...
>
> And does it behave better if you back out the patch?

Yes.

I had time today to do further testing. So far, here are the results (OK
means no errors on compile and also can run and pull windows from Master
to Stack and vice-versa without problem):

       |-----------------------------+--------|
       | patch(es) | result |
       |-----------------------------+--------|
       | dwm-ru_gaps-6.2.diff | OK |
       |-----------------------------+--------|
       | dwm-ru_bottomstack-6.2.diff | 1 |
       |-----------------------------+--------|
       | dwm-ru_bottomstack-6.2.diff | 2 |
       | dwm-ru_gaps-6.2.diff | |
       |-----------------------------+--------|

     - results:

       1. lots of errors on make (I think this is to be expected, as it's
probably looking for dwm-ru_gaps-6.2.diff):
          #+BEGIN_SRC bash
               $ sudo make clean install

               [sudo] password for trs-80:
               rm -f dwm drw.o dwm.o util.o dwm-6.2.tar.gz
               dwm build options:
               CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations
-Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE
-D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.2" -DXINERAMA
               LDFLAGS = -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft
               CC = cc
               cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
-I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE
-D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"6.2\" -DXINERAMA drw.c
               cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
-I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE
-D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"6.2\" -DXINERAMA dwm.c
               dwm.c: In function ‘bstack’:
               dwm.c:2169:41: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                  mh = m->nmaster ? m->wh * m->mfact : m->gappx;
                                                        ^~
               dwm.c:2176:25: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                 for (i = 0, mx = tx = m->gappx, c = nexttiled(m->clients); c; c =
nexttiled(c->next), i++)
                                        ^~
               dwm.c:2176:32: warning: left-hand operand of comma expression
has no effect [-Wunused-value]
                 for (i = 0, mx = tx = m->gappx, c = nexttiled(m->clients); c; c =
nexttiled(c->next), i++)
                                               ^
               dwm.c:2178:51: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   w = (m->ww - mx) / (MIN(n, m->nmaster) - i) - m->gappx;
                                                                  ^~
               dwm.c:2179:35: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   resize(c, m->wx + mx, m->wy + m->gappx, w - 2*c->bw, mh - 2*c->bw -
m->gappx*(5-ns)/2, 0);
                                                  ^~
               dwm.c:2179:73: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   resize(c, m->wx + mx, m->wy + m->gappx, w - 2*c->bw, mh - 2*c->bw -
m->gappx*(5-ns)/2, 0);
                                                                                        ^~
               dwm.c:2180:22: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   mx += WIDTH(c) + m->gappx;
                                     ^~
               dwm.c:2182:34: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   w = (m->ww - tx) / (n - i) - m->gappx;
                                                 ^~
               dwm.c:2184:78: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                    resize(c, m->wx + tx, m->wy + mh, w - (2*c->bw), m->wh - mh -
2*c->bw - m->gappx, False);
                                                                                             ^~
               dwm.c:2186:41: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                    resize(c, m->wx + tx, m->wy + mh + m->gappx/ns, w - (2*c->bw),
m->wh - mh - 2*c->bw - m->gappx*(5-ns)/2, False);
                                                        ^~
               dwm.c:2186:92: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                    resize(c, m->wx + tx, m->wy + mh + m->gappx/ns, w - (2*c->bw),
m->wh - mh - 2*c->bw - m->gappx*(5-ns)/2, False);
                                                                                                           ^~
               dwm.c:2187:22: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   tx += WIDTH(c) + m->gappx;
                                     ^~
               dwm.c: In function ‘bstackhoriz’:
               dwm.c:2207:41: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                  mh = m->nmaster ? m->wh * m->mfact : m->gappx;
                                                        ^~
               dwm.c:2212:25: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                 for (i = ty = 0, my = m->gappx, c = nexttiled(m->clients); c; c =
nexttiled(c->next), i++)
                                        ^~
               dwm.c:2212:32: warning: left-hand operand of comma expression
has no effect [-Wunused-value]
                 for (i = ty = 0, my = m->gappx, c = nexttiled(m->clients); c; c =
nexttiled(c->next), i++)
                                               ^
               dwm.c:2214:48: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   h = (mh - my) / (MIN(n, m->nmaster) - i) - m->gappx;
                                                               ^~
               dwm.c:2215:23: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   resize(c, m->wx + m->gappx, m->wy + my, mw - 2*(c->bw + m->gappx),
h - (2*c->bw), 0);
                                      ^~
               dwm.c:2215:61: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   resize(c, m->wx + m->gappx, m->wy + my, mw - 2*(c->bw + m->gappx),
h - (2*c->bw), 0);
                                                                            ^~
               dwm.c:2216:23: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   my += HEIGHT(c) + m->gappx;
                                      ^~
               dwm.c:2218:39: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   h = (m->wh - mh - ty) / (n - i) - m->gappx;
                                                      ^~
               dwm.c:2219:23: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   resize(c, m->wx + m->gappx, m->wy + mh + ty, mw - 2*(c->bw +
m->gappx), h - (2*c->bw), 0);
                                      ^~
               dwm.c:2219:66: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   resize(c, m->wx + m->gappx, m->wy + mh + ty, mw - 2*(c->bw +
m->gappx), h - (2*c->bw), 0);
                                                                                 ^~
               dwm.c:2220:23: error: ‘Monitor’ {aka ‘struct Monitor’} has no
member named ‘gappx’
                   ty += HEIGHT(c) + m->gappx;
                                      ^~
               make: *** [Makefile:18: dwm.o] Error 1
          #+END_SRC

       2. some errors on make:
         #+BEGIN_SRC bash
           rm -f dwm drw.o dwm.o util.o dwm-6.2.tar.gz
           dwm build options:
           CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
-I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE
-D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.2" -DXINERAMA
           LDFLAGS = -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft
           CC = cc
           cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
-I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE
-D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"6.2\" -DXINERAMA drw.c
           cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
-I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE
-D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"6.2\" -DXINERAMA dwm.c
           dwm.c: In function ‘createmon’:
           dwm.c:645:13: error: ‘gappx’ undeclared (first use in this function)
             m->gappx = gappx;
                        ^~~~~
           dwm.c:645:13: note: each undeclared identifier is reported only once
for each function it appears in
           At top level:
           dwm.c:1513:1: warning: ‘setgaps’ defined but not used
[-Wunused-function]
            setgaps(const Arg *arg)
            ^~~~~~~
           make: *** [Makefile:18: dwm.o] Error 1

         #+END_SRC

Now, I am too low level C wizard to fully understand this, however it
appears perhaps dwm-ru_bottomstack-6.2.diff is in fact the problem?

I stopped my testing here to post results back to the mailing list in
hopes of confirmation by those more knowledgeable.
Received on Tue Feb 25 2020 - 20:46:46 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 25 2020 - 20:48:09 CET