Subject: Re: FVWM: crash on menus

From: TG <[email-masked]>
Date: Mon, 07 Dec 1998 19:35:46 +0100

Dominik Vogt wrote:
> 
> On Sat, Dec 05, 1998 at 06:32:05PM +0100, [email-masked] wrote:
> >
> > i'm using fvwm-2.1.4 and when i hit the up or down cursor key after a menu
> > popped up, fvwm suddenly dies without any message. it does not matter wether
> > the menu is calles by a hotkey or mouseclick. when the mouse pointer is
> > outside of the menu area the two keys will just cause the menu to disappear.
> >
> > running on rh5.1, linux kernel 2.0.34, xfree 3.3.2.
> 
> Please try to fetch a stack trace for me. Enable full core files if
> necessary and on the command line type

Here are the stacktrace and the last line of fvwm2's debug info. I'm not
sure what you're intending with "full core files", though. I also
discarded to load any modules at startup.

Feel free to ask more if you need it.

Wing Tung

*** STACKTRACE ***

GNU gdb 4.17
This GDB was configured as "i386-redhat-linux"...
Core was generated by `fvwm2 -debug'.
Program terminated with signal 11, Segmentation fault.
#0  0x805e414 in menuShortcuts (menu=0x8083660, Event=0x8073be4,
    pmiCurrent=0xbffff7f4) at menus.c:493
493           if (isgraph(keysym))
(gdb) where
#0  0x805e414 in menuShortcuts (menu=0x8083660, Event=0x8073be4,
    pmiCurrent=0xbffff7f4) at menus.c:493
#1  0x805e79b in MenuInteraction (menu=0x8083660, menuPrior=0x0,
    pmiExecuteAction=0xbffff89c, cmenuDeep=1, fSticks=1) at menus.c:693
#2  0x805de12 in do_menu (menu=0x8083660, menuPrior=0x0,
    pmiExecuteAction=0xbffff89c, cmenuDeep=0, fStick=1, eventp=0x1,
    pops=0xbffff8a8) at menus.c:233
#3  0x8051395 in staysup_func (eventp=0x8073be4, w=37, tmp_win=0x0,
context=8,
    action=0x8086b45 "Window_Ops", Module=0xbffff934) at builtins.c:1100
#4  0x805a178 in ExecuteFunction (Action=0x8082c00 "Menu Window_Ops",
    tmp_win=0x0, eventp=0x8073be4, context=8, Module=-1) at
functions.c:260
#5  0x805835d in HandleKeyPress () at events.c:373
#6  0x8057fc6 in DispatchEvent () at events.c:155
#7  0x8057ff6 in HandleEvents () at events.c:176
#8  0x805ac45 in main (argc=2, argv=0xbffffcd4) at fvwm.c:483
(gdb) quit

*** FVWM DEBUG (last line) ***

[FVWM][ReadFile]: <<DEBUG>> about to call startup functions

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Brad Giaccio <[email-masked]>
Date: Mon, 7 Dec 1998 15:23:54 -0500 (EST)

> [FVWM][ReadFile]: <<DEBUG>> about to call startup functions

I think we are going to need to see your rc file could you send it as an
attachment to preserve white space?

Brad

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous

---

From: Danius Michaelides <[email-masked]>
Date: Mon, 7 Dec 1998 23:28:51 +0000 (GMT)

>     pmiCurrent=0xbffff7f4) at menus.c:493

(gdb) print keysym
$1 = 65364

I remember this problem from before. The fix was to protect the
isgraph() with an isascii():
    if (isascii(keysym) && isgraph(keysym))
(on lines 493 and 525).

Cant recall where i remember this from, possibly the scwm mailing list.

Danius

---

From: TG <[email-masked]>
Date: Mon, 07 Dec 1998 19:35:46 +0100

Wing Tung

*** STACKTRACE ***

GNU gdb 4.17

---

From: TG <[email-masked]>
Date: Tue, 08 Dec 1998 03:13:49 +0100

> attachment to preserve white space?

Here it is. It is split up into different files, but I think it quite
readeable. Except for files in the styles dir. If you want it I can
always try to clear it up and test again.

Wing Tung

---

From: TG <[email-masked]>
Date: Tue, 08 Dec 1998 17:22:27 +0100

Dominik Vogt wrote:
> I can't reproduce this with any menu style. Can you send me your
> .fvwm2rc file? What exactly do you do to get the coredump? I need
> a step-by-step description for idiots ;-)

I recompiled the fvwm2 binary (named it fvwm2.debug for convenience)
with debug messages on. Give you the new stacktrace and the full debug
output. And I also have cut down the rc file enormously.

How I produce the fault: I wait till fvwm2 has started up. Press
<Ctrl>+<Alt>+w to pop up the Window_Ops menu. Press cursor up and watch
the fvwm2 and the xserver die.

Three small remarks I want to make, but I don't know if they are
important.

1 - I start fvwm with "exec fvwm2" in my .xinitrc and not "fvwm &"
2 - Dunno what system libs fvwm2 uses, but I do know that
communicator(4.5, 4.06, 4.5b, 4.5) often crashes on my system and I find
that very strange. On the other hand, all other apps I run don't have
that striking amount of crashes.
3 - On my system, gcc is just a link to the egcs. Might this fool the
configure script? I haven't touched g++.

Regards,

Wing Tung

[FVWM][ReadFile]: <<DEBUG>> about to attempt '.fvwm2rc'
[FVWM][ReadSubFunc]: <<DEBUG>> about to exec: ''
[FVWM][ReadSubFunc]: <<DEBUG>> about to exec: 'Key w		A	CM	Menu Window_Ops
'
[FVWM][ReadSubFunc]: <<DEBUG>> about to exec: ''
[FVWM][ReadSubFunc]: <<DEBUG>> about to exec: 'AddToMenu Window_Ops "Window Ops" Title
'
[FVWM][ReadSubFunc]: <<DEBUG>> about to exec: '+	&Move		Move
'
[FVWM][ReadSubFunc]: <<DEBUG>> about to exec: ''
[FVWM][ReadSubFunc]: <<DEBUG>> about to exec: ''
[FVWM][ReadFile]: <<DEBUG>> about to call startup functions
[FVWM][HandleEvents]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][HandleMapNotify]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][HandleFocusIn]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][HandleMapNotify]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][HandleMapNotify]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> no X events waiting - about to reap children
[FVWM][My_XNextEvent]: <<DEBUG>> waiting for module input/output
[FVWM][My_XNextEvent]: <<DEBUG>> leaving My_XNextEvent
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][HandleKeyPress]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> no X events waiting - about to reap children
[FVWM][My_XNextEvent]: <<DEBUG>> waiting for module input/output
[FVWM][My_XNextEvent]: <<DEBUG>> leaving My_XNextEvent
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][HandleKeyPress]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> no X events waiting - about to reap children
[FVWM][My_XNextEvent]: <<DEBUG>> waiting for module input/output
[FVWM][My_XNextEvent]: <<DEBUG>> leaving My_XNextEvent
[FVWM][My_XNextEvent]: <<DEBUG>> Routine Entered
[FVWM][My_XNextEvent]: <<DEBUG>> taking care of queued up events & returning
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][HandleKeyPress]: <<DEBUG>> Routine Entered
[FVWM][do_menu]: <<DEBUG>> called
[FVWM][FPopupMenu]: <<DEBUG>> called
[FVWM][FPopupMenu]: <<DEBUG>> Warping to item
[FVWM][DispatchEvent]: <<DEBUG>> Routine Entered
[FVWM][HandleExpose]: <<DEBUG>> Routine Entered
[FVWM][DispatchEvent]: <<DEBUG>> Leaving Routine
[FVWM][MenuInteraction]: <<DEBUG>> Faking motion

Key w		A	CM	Menu Window_Ops

AddToMenu Window_Ops "Window Ops" Title
+	&Move		Move

GNU gdb 4.17
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"...
Core was generated by `fvwm2.debug -debug'.
Program terminated with signal 11, Segmentation fault.
#0  0x805e684 in menuShortcuts (menu=0x8081c60, Event=0x80742a4, 
    pmiCurrent=0xbffff7e4) at menus.c:493
493	      if (isgraph(keysym))
(gdb) where
#0  0x805e684 in menuShortcuts (menu=0x8081c60, Event=0x80742a4, 
    pmiCurrent=0xbffff7e4) at menus.c:493
#1  0x805ea1b in MenuInteraction (menu=0x8081c60, menuPrior=0x0, 
    pmiExecuteAction=0xbffff88c, cmenuDeep=1, fSticks=1) at menus.c:693
#2  0x805e082 in do_menu (menu=0x8081c60, menuPrior=0x0, 
    pmiExecuteAction=0xbffff88c, cmenuDeep=0, fStick=1, eventp=0x1, 
    pops=0xbffff898) at menus.c:233
#3  0x80513f1 in staysup_func (eventp=0x80742a4, w=37, tmp_win=0x0, context=8, 
    action=0x807cf5d "Window_Ops", Module=0xbffff924) at builtins.c:1100
#4  0x805a3d4 in ExecuteFunction (Action=0x8081c38 "Menu Window_Ops", 
    tmp_win=0x0, eventp=0x80742a4, context=8, Module=-1) at functions.c:260
#5  0x805841d in HandleKeyPress () at events.c:373
#6  0x8058033 in DispatchEvent () at events.c:155
#7  0x805808a in HandleEvents () at events.c:176
#8  0x805aea1 in main (argc=2, argv=0xbffffcc4) at fvwm.c:483
(gdb) quit

---

From: Brad Giaccio <[email-masked]>
Date: Tue, 8 Dec 1998 15:53:49 -0500 (EST)

> that striking amount of crashes.

This makes bells go off in my head, I have had long standing problems with
Motif distributions and X11 distributions that contain duplicate but
incompatiible libraries, you should want the X11 libraries to go first,
then Motif.  So if you could do 
ldd <path>/netscape
and
ldd <path>/fvwm2
and inspect the output if you have libraries that MWM in the path then
your load path is putting Motif ahead of X11. So switch it around.

Just a thought,
Brad

---

From: TG <[email-masked]>
Date: Tue, 08 Dec 1998 23:49:04 +0100

> your load path is putting Motif ahead of X11. So switch it around.

I don't know much about libs for X11 and Motif so, I just hope you can
see it for me. I thought that Motif was something commercial and is no
longer available on RedHat 5.1 (my base system). Or does Netscape
installs Motif libs itselves?

insane:~$ ldd /usr/local/netscape/netscape
        libBrokenLocale.so.1 => /lib/libBrokenLocale.so.1 (0x40005000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x40007000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x4004a000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40054000)
        libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x40068000)
        libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40079000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40086000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40091000)
        libdl.so.2 => /lib/libdl.so.2 (0x40128000)
        libc.so.6 => /lib/libc.so.6 (0x4012b000)
        libg++.so.2.7.2 => /usr/lib/libg++.so.2.7.2 (0x401cf000)
        libstdc++.so.2.7.2 => /usr/lib/libstdc++.so.2.7.2 (0x40203000)
        libm.so.6 => /lib/libm.so.6 (0x4023d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
insane:~$ ldd /usr/local/bin/fvwm2
        libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40005000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40012000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x4001a000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40030000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4003b000)
        libc.so.6 => /lib/libc.so.6 (0x400d2000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)

Any Motif libs here? I'm really sorry I can't tell you myself since I
don't know what Motif exactly includes.

Regards,

Wing Tung

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 11 Dec 1998 19:35:40 +0100

> outside of the menu area the two keys will just cause the menu to disappear.

Did you verify if this is fixed? I've applied the suggested
patch but since it didn't crash on my system I can't tell.

Bye

Dominik
-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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].