Subject: coredump from "FvwmCommand Current RecaptureWindow"

From: Tim Phipps <[email-masked]>
Date: Mon, 05 Nov 2001 15:54:12 +0000

Configuration Information [Automatically generated, do not change]:
uname output: SunOS silver 5.5.1 Generic_103640-37 sun4u sparc SUNW,Ultra-5_10
Compiler: gcc
Compilation CFLAGS: -g -O2
prefix: /u/phippst/sunos

FVWM Version:	2.5.0
FVWM_MODULEDIR:	/u/phippst/sunos/libexec/fvwm/2.5.0
FVWM_DATADIR:	/u/phippst/sunos/share/fvwm
FVWM_USERDIR:	/u/phippst/.fvwm

Description:
	fvwm-snap-20011105

Repeat-By:
	typed "FvwmCommand Current RecaptureWindow" and bang
(gdb) where
#0  0x3b778 in remove_window_from_stack_ring (t=0x98bb0) at stack.c:171
#1  0x3c040 in RaiseOrLowerWindow (t=0x98bb0, do_lower=0, 
    allow_recursion=1, is_new_window=0) at stack.c:588
#2  0x3c300 in RaiseWindow (t=0x98bb0) at stack.c:737
#3  0x326ac in warp_to_fvwm_window (eventp=0x8c45c, t=0x98bb0, 
    warp_x=356, x_unit=100, warp_y=524, y_unit=100) at focus.c:527
#4  0x32870 in CMD_WarpToWindow (eventp=0x8c45c, w=0, tmp_win=0x98bb0, 
    context=1, 
    action=0xb81c5 "35p 40p # default to file button on menu bar", 
    Module=0xefffd2ec) at focus.c:570
#5  0x4e50c in execute_function (efa=0xefffd2d8) at functions.c:1103
#6  0x4e6a4 in old_execute_function (
    action=0xa5ba8 "WarpToWindow 35p 40p # default to file button on menu bar", tmp_win=0x98bb0, eventp=0x8c45c, context=1, Module=-1, 
    exec_flags=0 '\000', args=0x8ac00) at functions.c:1172
#7  0x4f128 in execute_complex_function (eventp=0x8c45c, w=50331885, 
    tmp_win=0x98bb0, context=1, action=0x8ac00 "", Module=0xefffd54c, 
    desperate=0xa5748) at functions.c:1666
#8  0x4e564 in execute_function (efa=0xefffd538) at functions.c:1120
#9  0x4e6a4 in old_execute_function (
    action=0xd12cd " my_conditional_cursorwarp", tmp_win=0x98bb0, 
    eventp=0x8c45c, context=1, Module=-1, exec_flags=0 '\000', 
    args=0x8ac00) at functions.c:1172
#10 0x45ee4 in CMD_Current (eventp=0x8c45c, w=54, tmp_win=0x0, 
    context=8, 
    action=0xd12b8 "(CurrentDesk !Iconic) my_conditional_cursorwarp", 
    Module=0xefffd70c) at conditional.c:543
#11 0x4e50c in execute_function (efa=0xefffd6f8) at functions.c:1103
#12 0x4e6a4 in old_execute_function (
    action=0xa5d08 "Current (CurrentDesk !Iconic) my_conditional_cursorwarp", tmp_win=0x0, eventp=0x8c45c, context=8, Module=-1, 
    exec_flags=0 '\000', args=0x8ac00) at functions.c:1172
#13 0x4f128 in execute_complex_function (eventp=0x8c45c, w=0, 
    tmp_win=0x0, context=8, action=0x8ac00 "", Module=0xefffd96c, 
    desperate=0xa5848) at functions.c:1666
#14 0x4e564 in execute_function (efa=0xefffd958) at functions.c:1120
#15 0x4e6a4 in old_execute_function (action=0xa6d28 "my_cursorwarp", 
    tmp_win=0x0, eventp=0x8c45c, context=8, Module=-1, 
    exec_flags=0 '\000', args=0x8ac00) at functions.c:1172
#16 0x4f128 in execute_complex_function (eventp=0x8c45c, w=0, 
    tmp_win=0x0, context=8, action=0x8ac00 "", Module=0xefffdbcc, 
    desperate=0xa9390) at functions.c:1666
#17 0x4e564 in execute_function (efa=0xefffdbb8) at functions.c:1120
#18 0x4e6a4 in old_execute_function (
    action=0xefffdcd8 " my_destroy_event 0x8c00003", tmp_win=0x0, 
    eventp=0x8c45c, context=8, Module=8, exec_flags=0 '\000', 
    args=0x8ac00) at functions.c:1172
#19 0x39830 in ExecuteModuleCommand (w=0, module=8, 
    text=0xefffdcd8 " my_destroy_event 0x8c00003")
    at module_interface.c:643
#20 0x39718 in HandleModuleInput (w=0, module=8, 
    expect=0x796d8 "NOP UNLOCK", queue=0) at module_interface.c:608
#21 0x3ac08 in PositiveWrite (module=8, ptr=0x0, size=-268443328)
    at module_interface.c:1388
#22 0x39bf8 in BroadcastPacket (event_type=8, num_datum=7)
    at module_interface.c:844
#23 0x5e3cc in destroy_window (tmp_win=0x98bb0) at add_window.c:2014
#24 0x5ea54 in CaptureOneWindow (fw=0x98bb0, window=0, 
    keep_on_top_win=0, parent_win=0, is_recapture=1)
    at add_window.c:2314
#25 0x5f0d0 in do_recapture (eventp=0x1, w=0, tmp_win=0x98bb0, 
    context=1, action=0xcf2df "", Module=0xefffe944, fSingle=1)
    at add_window.c:2555
#26 0x5f168 in CMD_RecaptureWindow (eventp=0x8c45c, w=0, 
    tmp_win=0x98bb0, context=1, action=0xcf2df "", Module=0xefffe944)
    at add_window.c:2578
#27 0x4e50c in execute_function (efa=0xefffe930) at functions.c:1103
#28 0x4e6a4 in old_execute_function (action=0xc53c0 "recapturewindow", 
    tmp_win=0x98bb0, eventp=0x8c45c, context=1, Module=1, 
    exec_flags=0 '\000', args=0x8ac00) at functions.c:1172
#29 0x45ee4 in CMD_Current (eventp=0x8c45c, w=54, tmp_win=0x0, 
    context=8, action=0xc53c0 "recapturewindow", Module=0xefffeb04)
    at conditional.c:543
#30 0x4e50c in execute_function (efa=0xefffeaf0) at functions.c:1103
#31 0x4e6a4 in old_execute_function (
    action=0xb7b48 "current recapturewindow", tmp_win=0x0, 
    eventp=0x8c45c, context=8, Module=1, exec_flags=0 '\000', 
    args=0x8ac00) at functions.c:1172
#32 0x39830 in ExecuteModuleCommand (w=0, module=1, 
    text=0xb7b48 "current recapturewindow") at module_interface.c:643
#33 0x3aedc in ExecuteCommandQueue () at module_interface.c:1547
#34 0x417d0 in My_XNextEvent (dpy=0x8f868, event=0x8c45c)
    at events.c:2685
#35 0x41b34 in HandleEvents () at events.c:2835
#36 0x641ec in main (argc=1, argv=0xeffff2e4) at fvwm.c:718
(gdb) print t->stack_next
$1 = (struct FvwmWindow *) 0x0
(gdb) print t->stack_prev
$2 = (struct FvwmWindow *) 0x0
(gdb) print t
$3 = (FvwmWindow *) 0x98bb0

I use FvwmEvent to warp the cursor to the focus window when a window dissapears,
and then raise the newly focussed window
--
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: Tue, 6 Nov 2001 16:05:48 +0100

> 	typed "FvwmCommand Current RecaptureWindow" and bang

BTW, you have to quote the command:

  FvwmCommand "Current RecaptureWindow"

Otherwise FvwmCommand interprets "Current" and "RecaptureWindow"
as separate commands.

> and then raise the newly focussed window

Can you reproduce this and send the relevant parts of your config?

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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: Tim Phipps <[email-masked]>
Date: Wed, 07 Nov 2001 15:17:24 +0000

> Can you reproduce this and send the relevant parts of your config?

fvwm2rc:
=====
AddToFunc my_destroy_event
+ I Current WarpToWindow

*FvwmEvent: destroy_window my_destroy_event

FvwmEvent
FvwmCommandS
=====
In an xterm run <FvwmCommand "Current RecaptureWindow">

I'm not sure what the best fix is, ideally RecaptureWindow would not 
send a destroy event but it may not be possible to change that without 
breaking a lot of modules.

Maybe Current should not operate during RecaptureWindow. If the function 
is just <+ I WarpTowindow> you get the selection cursor and you can't 
crash fvwm.

Cheers,
Tim.

(gdb) where
#0  0x3b778 in remove_window_from_stack_ring (t=0x9da90) at stack.c:171
#1  0x3c040 in RaiseOrLowerWindow (t=0x9da90, do_lower=0,
     allow_recursion=1, is_new_window=0) at stack.c:588
#2  0x3c300 in RaiseWindow (t=0x9da90) at stack.c:737
#3  0x326ac in warp_to_fvwm_window (eventp=0x8c45c, t=0x9da90,
     warp_x=321, x_unit=0, warp_y=484, y_unit=0) at focus.c:527
#4  0x3288c in CMD_WarpToWindow (eventp=0x8c45c, w=0, tmp_win=0x9da90,
     context=1, action=0x9a0ac "", Module=0xefffd7ac) at focus.c:572
#5  0x4e50c in execute_function (efa=0xefffd798) at functions.c:1103
#6  0x4e6a4 in old_execute_function (action=0xa2910 "WarpToWindow",
     tmp_win=0x9da90, eventp=0x8c45c, context=1, Module=-1,
     exec_flags=0 '\000', args=0x8ac00) at functions.c:1172
#7  0x45ee4 in CMD_Current (eventp=0x8c45c, w=54, tmp_win=0x0,
     context=8, action=0xa2910 "WarpToWindow", Module=0xefffd96c)
     at conditional.c:543
#8  0x4e50c in execute_function (efa=0xefffd958) at functions.c:1103
#9  0x4e6a4 in old_execute_function (
     action=0xa2748 "Current WarpToWindow", tmp_win=0x0,
     eventp=0x8c45c, context=8, Module=-1, exec_flags=0 '\000',
     args=0x8ac00) at functions.c:1172
#10 0x4f128 in execute_complex_function (eventp=0x8c45c, w=0,
     tmp_win=0x0, context=8, action=0x8ac00 "", Module=0xefffdbcc,
     desperate=0xa2708) at functions.c:1666
#11 0x4e564 in execute_function (efa=0xefffdbb8) at functions.c:1120
#12 0x4e6a4 in old_execute_function (
     action=0xefffdcd8 " my_destroy_event", tmp_win=0x0,
     eventp=0x8c45c, context=8, Module=1, exec_flags=0 '\000',
     args=0x8ac00) at functions.c:1172
#13 0x39830 in ExecuteModuleCommand (w=0, module=1,
     text=0xefffdcd8 " my_destroy_event") at module_interface.c:643
#14 0x39718 in HandleModuleInput (w=0, module=1,
     expect=0x796d8 "NOP UNLOCK", queue=0) at module_interface.c:608
#15 0x3ac08 in PositiveWrite (module=1, ptr=0x0, size=-268443328)
     at module_interface.c:1388
#16 0x39bf8 in BroadcastPacket (event_type=1, num_datum=7)
     at module_interface.c:844
#17 0x5e3cc in destroy_window (tmp_win=0x9da90) at add_window.c:2014
#18 0x5ea54 in CaptureOneWindow (fw=0x9da90, window=0,
     keep_on_top_win=0, parent_win=0, is_recapture=1)
     at add_window.c:2314
#19 0x5f0d0 in do_recapture (eventp=0x1, w=0, tmp_win=0x9da90,
     context=1, action=0x99f5f "", Module=0xefffe944, fSingle=1)
     at add_window.c:2555
#20 0x5f168 in CMD_RecaptureWindow (eventp=0x8c45c, w=0,
     tmp_win=0x9da90, context=1, action=0x99f5f "", Module=0xefffe944)
     at add_window.c:2578
#21 0x4e50c in execute_function (efa=0xefffe930) at functions.c:1103
#22 0x4e6a4 in old_execute_function (action=0xa28d0 "RecaptureWindow",
     tmp_win=0x9da90, eventp=0x8c45c, context=1, Module=2,
     exec_flags=0 '\000', args=0x8ac00) at functions.c:1172
#23 0x45ee4 in CMD_Current (eventp=0x8c45c, w=54, tmp_win=0x0,
     context=8, action=0xa28d0 "RecaptureWindow", Module=0xefffeb04)
     at conditional.c:543
#24 0x4e50c in execute_function (efa=0xefffeaf0) at functions.c:1103
#25 0x4e6a4 in old_execute_function (
     action=0x989f8 "Current RecaptureWindow", tmp_win=0x0,
     eventp=0x8c45c, context=8, Module=2, exec_flags=0 '\000',
     args=0x8ac00) at functions.c:1172
#26 0x39830 in ExecuteModuleCommand (w=0, module=2,
     text=0x989f8 "Current RecaptureWindow") at module_interface.c:643
#27 0x3aedc in ExecuteCommandQueue () at module_interface.c:1547
#28 0x417d0 in My_XNextEvent (dpy=0x8f868, event=0x8c45c)
     at events.c:2685
#29 0x41b34 in HandleEvents () at events.c:2835
#30 0x641ec in main (argc=1, argv=0xeffff2e4) at fvwm.c:718

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 10 Nov 2001 16:16:19 +0100

> is just <+ I WarpTowindow> you get the selection cursor and you can't 

The problem was that the window that was already half destroyed
still appeared in Scr.Focus et. al.  destroy_window() now wipes
out all traces of the window in fvwm internal structures,
including ste stack ring and the window list.  I hope this doesn't
break something in function execution.  To be safe,
remove_window_from_stack_ring() and the add_...() functions don't
touch any windows that are marked for destruction.

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]