Subject: simple .fvwm2rc that crashes fvwm on start

From: Alexander Kotelnikov <[email-masked]>
Date: Sun, 06 Jan 2002 22:20:39 +0300

He it is:

Style "default-style" HilightBack steelblue
Style "*" UseStyle "default-style"
Style "*" UseStyle "default-style"
Style "*" UseStyle "default-style"

-- 
Alexander Kotelnikov
Saint-Petersburg, Russia
--
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: Olivier Chapuis <[email-masked]>
Date: Tue, 8 Jan 2002 17:24:54 +0100

On Tue, Jan 08, 2002 at 11:24:10AM +0100, Dominik Vogt wrote:
> On Mon, Jan 07, 2002 at 10:13:15PM +0300, Alexander Kotelnikov wrote:
> > >>>>> On Mon, 7 Jan 2002 19:47:38 +0100
> > >>>>> "Dominik" == Dominik Vogt <[email-masked]> wrote:
> > Dominik> 
> > Dominik> On Sun, Jan 06, 2002 at 10:20:39PM +0300, Alexander Kotelnikov wrote:
> > >> He it is:
> > >> 
> > Dominik> 
> > Dominik> Doesn't crash for me.  Which version are you using?  Can you fetch
> > Dominik> a stack trace?
> > Dominik> 
> > Dominik>   $ gdb fvwm2 core
> > Dominik>   (gdb) where
> > 
> > I use fvwm-2.4.4, it crashed whan it was 2.4.0 also.
> > 
> > (gdb) where
> >[snip]
> 
> Funny, that doesn't look like an fvwm stack trace at all.  Did you
> compile fvwm with full debug info?  Does gdb say that the core
> file was generated by fvwm?  This really looks as if the libc
> started an X application on its own.  There must be some kind of
> reference to the program somewhere.
> 

It crash for me with the following output which is maybe more
consistant (I use "export MALLOC_CHECK_=2" before starting fvwm2
which gives a priori a better core dump with the glibc).
This is with the current cvs (2.4.4 gives the same output)

[olivier@snoopy olivier]$ gdb fvwm2 ~/core
GNU gdb 4.18
Core was generated by `fvwm2'.
Program terminated with signal 6, Abandon.
Reading symbols from /usr/X11R6/lib/libXpm.so.4...done.
Reading symbols from /usr/local/lib/libstroke.so.0...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/libm.so.6...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  0x4014b091 in kill () from /lib/libc.so.6
(gdb) where
#0  0x4014b091 in kill () from /lib/libc.so.6
#1  0x4014ad79 in raise () from /lib/libc.so.6
#2  0x4014c4f0 in abort () from /lib/libc.so.6
#3  0x40180416 in malloc_set_state () from /lib/libc.so.6
#4  0x4017e59f in free () from /lib/libc.so.6
#5  0x807776d in execute_function (efa=0xbffff02c) at functions.c:1192
#6  0x80777fb in old_execute_function (
    action=0xbffff08c "Style \"*\" UseStyle \"default-style\"", tmp_win=0x0, 
    eventp=0x80aa2a0, context=8, Module=1, exec_flags=0, args=0x0)
    at functions.c:1220
#7  0x805eb7c in run_command_stream (f=0x80c09c8, eventp=0x80aa2a0, 
    tmp_win=0x0, context=8, Module=1) at read.c:146
#8  0x805ecea in run_command_file (
    filename=0x80abe78 "/home/olivier/.fvwm-t/.fvwm2rc", eventp=0x80aa2a0, 
    tmp_win=0x0, context=8, Module=1) at read.c:220
#9  0x808c774 in main (argc=1, argv=0xbffff974) at fvwm.c:656

I take a fast look, I do not see the problem.
Olivier

---

From: Dan Espen <[email-masked]>
Date: Tue, 08 Jan 2002 13:14:59 -0500

> I take a fast look, I do not see the problem.

Me either, possibly the free is failing due to some other memory
corruption.

If I can get some time this evening, I'll try doing a Purify run.

-- 
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: Tue, 8 Jan 2002 19:42:21 +0100

> If I can get some time this evening, I'll try doing a Purify run.

Any help is welcome.  I ran it with --enable-efence, but I don't
get a core dump, no matter what I do.  Perhaps this is because I
don't have ConfigFvwmDefaults installed.

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: Alexander Kotelnikov <[email-masked]>
Date: Wed, 09 Jan 2002 00:10:57 +0300

Here are all the logs I got when configured fvwm as
        CFLAGS="-ggdb" ./configure  --prefix=/usr\
        --sysconfdir=/etc/X11/fvwm --bindir=/usr/X11R6/bin\
        --libexecdir=/usr/X11R6/lib/X11 --libdir=/usr/X11R6/lib/X11\
        --mandir=/usr/X11R6/man --without-gnome\
        --without-rplay-library --without-stroke-library\
        --enable-command-log --enable-debug-msgs
and run it with "-debug -debug_stack_ring"

0:05 pts/13 fvwm@pale:~ 8> gdb ~sacha/work/debian/packages/f/fvwm/2.4.4/tests/unibyte_dbg/fvwm-2.4.4/fvwm/fvwm2
GNU gdb 5.1
Copyright 2001 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-linux"...
(gdb) set args -display :0 -debug -debug_stack_ring
(gdb) run
Starting program: /home/sacha/work/debian/packages/f/fvwm/2.4.4/tests/unibyte_dbg/fvwm-2.4.4/fvwm/fvwm2 -display :0 -debug -debug_stack_ring
[FVWM][main]: 00:05:43      0 <<DEBUG>> Entered, about to parse args
[FVWM][main]: 00:05:43      2 <<DEBUG>> Done parsing args
[FVWM][main]: 00:05:43      1 <<DEBUG>> Installing signal handlers
[FVWM][initModules]: 00:05:43     37 <<DEBUG>> Zeroing init module array

[FVWM][main]: 00:05:43      1 <<DEBUG>> Setting up rc file defaults...
[FVWM][LOG]: 00:05:43      0  XORValue 0
[FVWM][LOG]: 00:05:43      2  DefaultFont fixed
[FVWM][LOG]: 00:05:43      1  DefaultColors black grey
[FVWM][LOG]: 00:05:43      1  MenuStyle * fvwm, Foreground black, Background grey, Greyed slategrey, MenuColorset, ActiveColorset, GreyedColorset
[FVWM][LOG]: 00:05:43      3  TitleStyle Centered -- Raised
[FVWM][LOG]: 00:05:43      0  Style * Color lightgrey/dimgrey
[FVWM][LOG]: 00:05:43      0  Style * HilightFore black, HilightBack grey
[FVWM][LOG]: 00:05:43      0  AddToMenu MenuFvwmRoot "Builtin Menu" Title
[FVWM][LOG]: 00:05:43      0  + "&1. XTerm" Exec xterm
[FVWM][LOG]: 00:05:43      0  + "&2. Setup Form" Module FvwmForm FvwmForm-Setup
[FVWM][LOG]: 00:05:43      0  + "&3. Setup 95 Script" Module FvwmScript FvwmScript-Setup95
[FVWM][LOG]: 00:05:43      0  + "&4. Issue FVWM commands" Module FvwmConsole
[FVWM][LOG]: 00:05:43      0  + "&R. Restart FVWM" Restart
[FVWM][LOG]: 00:05:43      0  + "&X. Exit FVWM" Quit
[FVWM][LOG]: 00:05:43      0  Mouse 0 R N Menu MenuFvwmRoot
[FVWM][LOG]: 00:05:43      0  Read /usr/share/fvwm/ConfigFvwmDefaults
[FVWM][ReadFile]: 00:05:43      0 <<DEBUG>> Module flag 1, about to attempt /usr/share/fvwm/ConfigFvwmDefaults
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '# This file gets installed in the "sysconfdir" during fvwm'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '# installation.  Do not remove or change this file.'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: ''
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '#  Modification History'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: ''
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '#  Created on 03/21/99 by DanEspen (dje):'
[FVWM][ReadSubFunc]: 00:05:43      1 <<DEBUG>> Module switch 1, about to exec: '#  - FvwmDefaults file.  Contains fvwm defaults, and enough to help out'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '#  the new user with no configuration file.'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '#  This picks up from where the builtin table in fvwm.c SetUpRCDefaults ends.'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: ''
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '# Set at least 2 root keys to bring up the builtin menu:'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Silent Key Help R A Popup MenuFvwmRoot'
[FVWM][LOG]: 00:05:43      0  Key Help R A Popup MenuFvwmRoot
[FVWM][ReadSubFunc]: 00:05:43      4 <<DEBUG>> Module switch 1, about to exec: 'Key F1 R A Popup MenuFvwmRoot'
[FVWM][LOG]: 00:05:43      0  Key F1 R A Popup MenuFvwmRoot
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '# Ctrl-Alt-Escape for aboring Wait pause and ModuleSynchronous command'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Key Escape A MC EscapeFunc'
[FVWM][LOG]: 00:05:43      0  Key Escape A MC EscapeFunc
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: ''
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '# Needed by the builtin WindowList command, this should match the manpage.'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'AddToFunc WindowListFunc I WindowId $0 Iconify off'
[FVWM][LOG]: 00:05:43      0  AddToFunc WindowListFunc I WindowId $0 Iconify off
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '+ I WindowId $0 FlipFocus'
[FVWM][LOG]: 00:05:43      0  + I WindowId $0 FlipFocus
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '+ I WindowId $0 Raise'
[FVWM][LOG]: 00:05:43      0  + I WindowId $0 Raise
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '+ I WindowId $0 WarpToWindow 5p 5p'
[FVWM][LOG]: 00:05:43      0  + I WindowId $0 WarpToWindow 5p 5p
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: ''
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '# Also in fvwm man page.'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'AddToFunc UrgencyFunc I Iconify off'
[FVWM][LOG]: 00:05:43      0  AddToFunc UrgencyFunc I Iconify off
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '+ I FlipFocus'
[FVWM][LOG]: 00:05:43      0  + I FlipFocus
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '+ I Raise'
[FVWM][LOG]: 00:05:43      0  + I Raise
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '+ I WarpToWindow 5p 5p'
[FVWM][LOG]: 00:05:43      0  + I WarpToWindow 5p 5p
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'AddToFunc UrgencyDoneFunc I Nop'
[FVWM][LOG]: 00:05:43      0  AddToFunc UrgencyDoneFunc I Nop
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: ''
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '# Alt-Tab:'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Key Tab A M WindowList Root c c NoDeskSort'
[FVWM][LOG]: 00:05:43      0  Key Tab A M WindowList Root c c NoDeskSort
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '# Default styles'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Style * GrabFocusTransient, LowerTransient, RaiseTransient, StackTransientParent'
[FVWM][LOG]: 00:05:43      0  Style * GrabFocusTransient, LowerTransient, RaiseTransient, StackTransientParent
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Style * TileCascadePlacement, Title, MouseFocus, GrabFocusOff'
[FVWM][LOG]: 00:05:43      0  Style * TileCascadePlacement, Title, MouseFocus, GrabFocusOff
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Style * UseIconPosition'
[FVWM][LOG]: 00:05:43      0  Style * UseIconPosition
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '# Basic Mouse controls:'
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Mouse 1 T  A FuncFvwmRaiseLowerX Move'
[FVWM][LOG]: 00:05:43      0  Mouse 1 T  A FuncFvwmRaiseLowerX Move
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Mouse 1 FS A FuncFvwmRaiseLowerX Resize'
[FVWM][LOG]: 00:05:43      0  Mouse 1 FS A FuncFvwmRaiseLowerX Resize
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'AddToFunc FuncFvwmRaiseLowerX I Raise'
[FVWM][LOG]: 00:05:43      1  AddToFunc FuncFvwmRaiseLowerX I Raise
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '+ M $0'
[FVWM][LOG]: 00:05:43      0  + M $0
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: '+ D Lower'
[FVWM][LOG]: 00:05:43      0  + D Lower
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: ''
[FVWM][main]: 00:05:43      5 <<DEBUG>> Running config_commands...
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Style "default-style" HilightBack steelblue'
[FVWM][LOG]: 00:05:43      0  Style "default-style" HilightBack steelblue
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Style "*" UseStyle "default-style"'
[FVWM][LOG]: 00:05:43      0  Style "*" UseStyle "default-style"
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Style "*" UseStyle "default-style"'
[FVWM][LOG]: 00:05:43      0  Style "*" UseStyle "default-style"
[FVWM][ReadSubFunc]: 00:05:43      0 <<DEBUG>> Module switch 1, about to exec: 'Style "*" UseStyle "default-style"'
[FVWM][LOG]: 00:05:43      0  Style "*" UseStyle "default-style"
[FVWM][main]: 00:05:43      0 <<DEBUG>> Done running config_commands

Program received signal SIGSEGV, Segmentation fault.
0x401c9239 in malloc () from /lib/libc.so.6
(gdb) bt
#0  0x401c9239 in malloc () from /lib/libc.so.6
#1  0x401c9094 in malloc () from /lib/libc.so.6
#2  0x40040d9d in IceRegisterForProtocolSetup () from /usr/X11R6/lib/libICE.so.6
#3  0x4002e2ad in SmcOpenConnection () from /usr/X11R6/lib/libSM.so.6
#4  0x0809a84d in SessionInit () at session.c:1197
#5  0x0809e49c in main (argc=6, argv=0xbffffb54) at fvwm.c:712
#6  0x4017465f in __libc_start_main () from /lib/libc.so.6
(gdb)

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 9 Jan 2002 13:25:36 +0100

> Style "*" UseStyle "default-style"

Fixed.

Bye

Dominik ^_^  ^_^

---

From: Dan Espen <[email-masked]>
Date: Tue, 08 Jan 2002 21:42:33 -0500

> don't have ConfigFvwmDefaults installed.

I got a lot of output, I tried to remove some of the duplicate
reports.  I haven't looked at anything in detail, its getting
a bit late for me.

Remember that in the past we've seen a few things that seemed
to be Purify errors, so if something doesn't make sense it might
not be Fvwm at fault.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 9 Jan 2002 17:41:43 +0100

> to be Purify errors, so if something doesn't make sense it might

Don't mind.  I've already committed a fix.  The HilightBack colour
was freed each time it was copies with UseStyle.

Bye

Dominik ^_^  ^_^