Hi, I use WindowMaker a lot so when I found out about this bug I decided it's time to do something about it :) So, here's some more (hopefully useful) info on the issue.
After
DEB_BUILD_OPTIONS="nostrip debug" fakeroot apt-get --build source wmaker
the backtrace looks much more meaningful and shows that a NULL pointer
is passed to XTextWidth,
(gdb) bt
#0 0x4013877b in XTextWidth () from /usr/X11R6/lib/libX11.so.6
#1 0x0807bf84 in showGeometry (wwin=0x8145a88, x1=179, y1=139, x2=663, y2=455,
direction=10)
at /home/lindi/debian/debian-wmaker/wmaker-0.91.0/src/moveres.c:274
#2 0x08080df5 in wMouseResizeWindow (wwin=0x8145a88, ev=0xbffff9f0) at
/home/lindi/debian/debian-wmaker/wmaker-0.91.0/src/moveres.c:2145
#3 0x08099090 in frameMouseDown (desc=0x0, event=0xbffff9f0) at
/home/lindi/debian/debian-wmaker/wmaker-0.91.0/src/window.c:3166
#4 0x0806b55a in handleButtonPress (event=0xbffff9f0) at
/home/lindi/debian/debian-wmaker/wmaker-0.91.0/src/event.c:754
#5 0x080b2cfb in WMHandleEvent (event=0xbffff9f0) at
/home/lindi/debian/debian-wmaker/wmaker-0.91.0/WINGs/wevent.c:231
#6 0x0806ad19 in EventLoop () at
/home/lindi/debian/debian-wmaker/wmaker-0.91.0/src/event.c:325
#7 0x08073bfb in real_main (argc=2, argv=0xbffffb24) at
/home/lindi/debian/debian-wmaker/wmaker-0.91.0/src/main.c:867
#8 0x08073866 in main (argc=2, argv=0xbffffb24) at
/home/lindi/debian/debian-wmaker/wmaker-0.91.0/src/main.c:638
(gdb) frame 1
#1 0x0807bf84 in showGeometry (wwin=0x8145a88, x1=179, y1=139, x2=663, y2=455,
direction=10)
at /home/lindi/debian/debian-wmaker/wmaker-0.91.0/src/moveres.c:274
274 fw = XTextWidth(scr->tech_draw_font, "8888", 4);
(gdb) print scr->tech_draw_font
$1 = (XFontStruct *) 0x0
Next I did
grep -r tech_draw_font .
to find out where the font is supposed to be loaded. It turns out that
the font loading fails,
Breakpoint 3, wScreenInit (screen_number=0) at
/home/lindi/debian/debian-wmaker/wmaker-0.91.0/src/screen.c:810
810 scr->tech_draw_font= XLoadQueryFont(dpy,
"-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*");
(gdb) n
798 XChangeProperty(dpy, scr->root_win, _XA_WINDOWMAKER_NOTICEBOARD,
(gdb) print scr->tech_draw_font
$1 = (XFontStruct *) 0x0
Grep finds no other occurences of "XLoadQueryFont" so this this
"tech_draw_font" is handled in a different way than all the other
fonts that WindowMaker uses. This change was added in
http://cvs.windowmaker.org/diff.php/wm/src/screen.c?login=2&r1=1.61&r2=1.62&ty=h
Reverting this change seems to fix the segfault. The left resize arrow
is now drawn incorrectly though.
best regards,
Timo Lindfors
pgpKXJBqXWmKV.pgp
Description: PGP signature

