Re: FVWM: Re: FvwmEvent Core Dumps

From: Thomas A. Gardiner <gardiner_at_pas.rochester.edu>
Date: Mon, 14 Jun 1999 22:17:52 -0400 (EDT)

Dominik,

I have managed to keep FvwmEvent and FvwmTaskBar from core dumping by
"removing" the incorrect events, such as focus_change_window, defined in
the default "AnotherLevel" m4 files included in the RedHat 5.2 dist. and
as Jacques has reported the soounds are played correctly; i.e. no garbage
in, no garbage out. Nevertheless, I changed the RemoveButton function to
the one you sent me below, recompiled FvwmTaskBar, and installed it in the
appropriate directory. The result was however less than favorable. As
soon as my mouse touched the TaskBar, it was removed from the desktop, and
the sound played was that of killing or closing a window. Does this
behavior make sense to you? By the way, I'm using focus-follows-mouse.
I'm sorry I can't help more, but I do not as yet understand the code all
that well. Suggestions?

Tom

On Tue, 15 Jun 1999, Dominik Vogt wrote:

> On Fri, Jun 11, 1999 at 07:27:29PM -0400, Thomas A. Gardiner wrote:
> > only this time it is not FvwmEvent which core dumps, but FvwmTaskBar. The
> > output of running gdb over the core follows.
> >
> > [tom_at_d185fcdc5 tom]$ gdb
> > /home/tom/fvwm2.2.2/libexec/fvwm/2.2.2//FvwmTaskBar
> > GNU gdb 4.17.0.4 with Linux/x86 hardware watchpoint and FPU support
> > Copyright 1998 Free Software Foundation, Inc.
> > GDB is free software, covered by the GNU General Public License, and you
> > are
> > welcome to change it and/or distribute copies of it under certain
> > conditions.
> > Type "show copying" to see the conditions.
> > There is absolutely no warranty for GDB. Type "show warranty" for
> > details.
> > This GDB was configured as "i386-redhat-linux"...
> > (gdb) core core
> > Core was generated by `/home/tom/fvwm2.2.2/libexec/fvwm/2.2.2//FvwmTaskBar
> > 9 4 /tmp/fvwmrca28716 0 8'.
> > Program terminated with signal 11, Segmentation fault.
> > Reading symbols from /usr/X11R6/lib/libXpm.so.4...done.
> > Reading symbols from /usr/X11R6/lib/libSM.so.6...done.
> > Reading symbols from /usr/X11R6/lib/libICE.so.6...done.
> > Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
> > Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
> > Reading symbols from /lib/libc.so.6...done.
> > Reading symbols from /lib/ld-linux.so.2...done.
> > Reading symbols from /lib/libnss_files.so.1...done.
> > #0 RemoveButton (array=0x8051048, butnum=3) at ButtonArray.c:351
> > 351 temp->next = temp2->next;
> > (gdb) where
> > #0 RemoveButton (array=0x8051048, butnum=3) at ButtonArray.c:351
> > #1 0x804a089 in ProcessMessage (type=128, body=0x8056580) at
> > FvwmTaskBar.c:371
> > #2 0x8049e23 in ReadFvwmPipe () at FvwmTaskBar.c:309
> > #3 0x8049dec in EndLessLoop () at FvwmTaskBar.c:290
> > #4 0x8049c8f in main (argc=6, argv=0xbffffbd4) at FvwmTaskBar.c:231
> > (gdb)
>
> Try replacing the function RemoveButton in ButtonArray.c (FvwmTaskBar)
> with this version (I've checked in a bug fix for 2.3.4, but I think it
> works with 2.2.2 too):
>
> void RemoveButton(ButtonArray *array, int butnum)
> {
> Button *temp, *temp2;
>
> if (butnum == 0) {
> temp2 = array->head;
> } else {
> temp = find_n(array, butnum-1);
> if (temp == NULL) return;
> temp2 = temp->next;
> }
> if (temp2 == NULL) return;
> temp->next = temp2->next;
>
> if (array->tail == temp2) array->tail = temp;
>
> ButtonDelete(temp2);
> array->count--;
> if (temp != array->head)
> temp = temp->next;
> for (; temp!=NULL; temp=temp->next)
> temp->needsupdate = 1;
>
> ArrangeButtonArray(array);
> }
>
> The reason is that when the last button in the internal list was deleted,
> the code tried to access 'temp2->next' although temp2 might be NULL. I didn't
> check that fix myself, so it would be nice if you could verify it.
>
> Bye
>
> Dominik ^_^
>
> --
> Dominik Vogt, dominik.vogt_at_gmx.de
> Reply-To: dominik.vogt_at_gmx.de
> --
> Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
> To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
> message to majordomo_at_fvwm.org.
> To report problems, send mail to fvwm-owner_at_fvwm.org.
>

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Jun 14 1999 - 21:21:42 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:02 BST