Thanks to Paul Seelig for this answer:
You can use the GNU debugger "gdb" to get exact information about how
and where wmaker crashed. Sending this information to the developers
is the most convenient way to help in debugging.
The wmaker binary needs to be compiled with debugging turned on
("./configure --with-debug etc.") for this to work.
Exit wmaker and start a failsafe X session with an open xterm.
First type the command "script" to log the following session into a
file commonly called "~/typescript". Then enter "gdb wmaker" at the
shellprompt:
[shell prompt]~ > script
Script started, output file is typescript
[shell prompt]~ > gdb wmaker
GNU gdb 4.17.m68k.objc.threads.hwwp.fpu.gnat
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 "i486-pc-linux-gnu"...
(gdb)
At the gdb prompt simply type "run" to start the WMaker session:
(gdb) run
Starting program: /usr/bin/X11/wmaker
Try to reproduce the error which has provoked the crash before and if
you succeed the session will simply freeze and you will see something
similiar to following prompt:
Program received signal SIGSEGV, Segmentation fault.
0x809ea0c in WMGetFirstInBag (bag=0x0, item=0x811e170) at bag.c:84
84 for (i = 0; i < bag->count; i++) {
(gdb)
Now you just type "bt" for "backtrace" and gdb will show you where the
crash happened:
(gdb) bt
#0 0x809ea0c in WMGetFirstInBag (bag=0x0, item=0x811e170) at bag.c:84
#1 0x807c542 in wSessionSaveState (scr=0x80c28e8) at session.c:299
#2 0x807bd88 in wScreenSaveState (scr=0x80c28e8) at screen.c:1089
#3 0x807cf54 in Shutdown (mode=WSExitMode) at shutdown.c:111
#4 0x8078101 in exitCommand (menu=0x80f7230, entry=0x80fdb38)
at rootmenu.c:193
#5 0x8078403 in wRootMenuPerformShortcut (event=0xbffff360) at rootmenu.c:401
#6 0x80630f7 in handleKeyPress (event=0xbffff360) at event.c:1492
#7 0x8061c86 in DispatchEvent (event=0xbffff360) at event.c:232
#8 0x8093092 in WMHandleEvent (event=0xbffff360) at wevent.c:585
#9 0x8061dae in EventLoop () at event.c:322
#10 0x806b238 in main (argc=1, argv=0xbffff404) at main.c:594
(gdb)
To quit the debugger just type "quit" and say "y":
(gdb) quit
The program is running. Exit anyway? (y or n) y
[shell prompt]~ >
To quit the script session type "exit" again:
[shell prompt]~ > exit
exit
Script done, output file is typescript
[shell prompt]~ >
Send the resulting "~/typescript" together with a concise explanation
about how to reproduce the bug (please use the included BUGFORM for
instruction) to the developers.