Subject: core file with latest CVS

From: Dan Espen <[email-masked]>
Date: Tue, 26 Dec 2000 13:18:19 -0500

I seem to be able to produce this at will:

#0  0x476b4 in get_transientfor_fvwmwindow (t=0x109698)
    at ../../version-2_3_27/fvwm/stack.c:221
221         if (s->w == t->transientfor)
(gdb) print s
$1 = (FvwmWindow *) 0x0
(gdb) print t
$2 = (FvwmWindow *) 0x109698
(gdb) print Scr.FvwmRoot.next
$3 = (struct FvwmWindow *) 0x1021a0
(gdb) where
#0  0x476b4 in get_transientfor_fvwmwindow (t=0x109698)
    at ../../version-2_3_27/fvwm/stack.c:221
#1  0x7c14c in setup_layer (tmp_win=0x109698, pstyle=0xffbeb7f8)
    at ../../version-2_3_27/fvwm/add_window.c:481
#2  0x7e900 in AddWindow (w=71475020, ReuseWin=0x0)
    at ../../version-2_3_27/fvwm/add_window.c:1337
#3  0x4d2b0 in HandleMapRequestKeepRaised (KeepRaised=0, ReuseWin=0x0)
    at ../../version-2_3_27/fvwm/events.c:883
#4  0x4d170 in HandleMapRequest () at ../../version-2_3_27/fvwm/events.c:852
#5  0x51b24 in DispatchEvent (preserve_Tmp_win=0)
    at ../../version-2_3_27/fvwm/events.c:2532
#6  0x51c70 in HandleEvents () at ../../version-2_3_27/fvwm/events.c:2585
#7  0x89450 in main (argc=1, argv=0xffbebfbc)
    at ../../version-2_3_27/fvwm/fvwm.c:736
(gdb)

The logic in the loop in  stack.c seems to  expect the window pointers
to be in  a  circular list  but  it looks to  me  like this is  a null
terminated list, here are the next pointers:

(gdb) p Scr.FvwmRoot.next
$6 = (struct FvwmWindow *) 0x1021a0
(gdb) p Scr.FvwmRoot.next->next
$7 = (struct FvwmWindow *) 0xf6428
(gdb) p Scr.FvwmRoot.next->next->next
$8 = (struct FvwmWindow *) 0xe9c90
(gdb) p Scr.FvwmRoot.next->next->next->next
$9 = (struct FvwmWindow *) 0xf1780
(gdb) p Scr.FvwmRoot.next->next->next->next->next
$10 = (struct FvwmWindow *) 0xf4b60
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next
$11 = (struct FvwmWindow *) 0x100bb8
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next->next
$12 = (struct FvwmWindow *) 0xf2cc8
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next->next->next 
$13 = (struct FvwmWindow *) 0xf8398
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next->next->next->next
$14 = (struct FvwmWindow *) 0xf9fa0
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next->next->next->next->next
$15 = (struct FvwmWindow *) 0xfbd68
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next->next->next->next->next->next
$16 = (struct FvwmWindow *) 0xfd4a0
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next->next->next->next->next->next->next 
$17 = (struct FvwmWindow *) 0xff250
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next->next->next->next->next->next->next->next
$18 = (struct FvwmWindow *) 0x103ef8
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next->next->next->next->next->next->next->next->next
$19 = (struct FvwmWindow *) 0x109698
(gdb) p Scr.FvwmRoot.next->next->next->next->next->next->next->next->next->next->next->next->next->next->next
$20 = (struct FvwmWindow *) 0x0

And this is what it compares to to find the end of the list:

(gdb) print &Scr.FvwmRoot
$21 = (FvwmWindow *) 0xb9d20
(gdb)

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214             E-mail: [email-masked]
Piscataway, NJ 08854                       Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 27 Dec 2000 03:36:07 +0100

>     at ../../version-2_3_27/fvwm/stack.c:221
...
> terminated list, here are the next pointers:

Yes, of course.  The window list is NULL terminated while the
stack ring is circular.  Unfortunately this is a bit confusing and
to make things even worse, both lists are used in stack.c.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]